Comments (1)
We have identified that this abnormal distribution was introduced in this commit (198cd34) on Aug. 3, 2023. All releases since then, including v2023 and v2024.2 contains this defect
specifically, this behavior was caused by this single line of code change
198cd34#diff-a7174ac70bbab6b4d406c2a4ee9adc2c277c27d91c5eb874537219ea62145ddaL1015-R1016
- if (p->w >= 0.f) {
+ if (fabsf(p->w) > 0.f) {
what happened was that the above commit excludes photon-packets that had numerically dropped its weight to 0 after many many scattering/long paths. In the above sample code, there are about 82 photons out of 3811706 detected photons were excluded. Because of this truncation, somehow the distribution became skewed - it is interesting to plot the nscat
histogram in log-y scale, and this shows strange histogram structures, see
despite that this looks strikingly incorrect, in practice, I do not believe this is a big issue (as long as the data are properly analyzed).
First of all, the affected photon packets are small - they are extremely long path photons and float32 weight drops to numerical zero after over 20000 times of scattering calculations;
secondly, when a user analyze such long path or large-scattering-count photons, they should use the corresponding weight to properly weight the contribution; because these packets have nearly zero weight, they literally do not contribute to any of the statistical quantities.
regardless, reverting this line back to >= 0.f
fixed the strange nscat distribution shape.
after fix, now it looks like this (in log-y scale)
from mcx.
Related Issues (20)
- Tissue propoerty for different wavelenght HOT 2
- `pmcx.mcxlab` fails to typecast `traj.id` output from float32 to uint32
- mcx2json unable to export simulations of continuously-varying media
- mcxlab: Where to find "sphdiffusionslab.m" required by "demo_validation_heterogeneous.m"? HOT 1
- Support per voxel mua/mus/g/n continuous medium type
- Different scattering coefficient of water in demo_skinvessel.m compared to mcxyz.c HOT 1
- get absorbed energy by object HOT 8
- svmc is broken after commit 7e1aec0
- pmcx dettpsf overwrites input detp structure HOT 1
- [CRITICAL] double-multiplication of initial weight in single-pattern-source fluence output HOT 3
- Gaussian divergence for slit source HOT 3
- Replay fails when simulating with multiple light sources HOT 6
- Post v2024.2 release actions
- Multi-source simulation fails to return the source ID for detected photons and trajectories
- Using base64 as compression method resulting in double base64 encoding
- mcxsvmc isosurface normal direction is flipped in octave compared to matlab
- nan-padded voxels have g/n=0
- Bug in mcxplotshapes HOT 1
- Computer turns off when using two GPU HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcx.