Hi Karthik,
I stepped through the code and ATotal being 0 makes sense to me now. Its because you have Mua=0 in the slab. (I should have realized that earlier). I get the following results from load_results_script.m using 10^5 photons:
Total absorption captured by ATotal detector: 0
Standard Deviation captured by ATotal detector: 0
Total reflectance captured by RDiffuse detector: 0.06661
Standard Deviation captured by RDiffuse detector: 0.0007885
Total reflectance captured by RSpecular detector: 0
Total transmittance captured by TDiffuse detector: 0.06808
Standard Deviation captured by TDiffuse detector: 0.00079652
My relative error [SD/Mean] 1.2% for RDiffuse and 1.2% for TDiffuse, however RDiffuse + TDiffuse = 0.1347, not 1.
I forgot to attached my edited version of your infile and also my edits to load_results_script.m to see the error in the estimates.
In Options, I set "TrackStatistics" to true. With this set to true, a statistics.txt file is created after running the simulation. In that file it shows me that 865531 photons were killed because their path length is greater than the maximum path length allowable 60,000mm.
```
"NumberOfPhotonsOutTopOfTissue": 6661,
"NumberOfPhotonsOutBottomOfTissue": 6808,
"NumberOfPhotonsAbsorbed": 0,
"NumberOfPhotonsSpecularReflected": 0,
"NumberOfPhotonsKilledOverMaximumPathLength": 86531,
"NumberOfPhotonsKilledOverMaximumCollisions": 0,
"NumberOfPhotonsKilledByRussianRoulette": 0
```
This accounts for the loss. This amounts to a weight loss of 0.8651, so now 0.8651+0.06661+0.06808=0.9998. These are the photons that are emanating from the isotropic source moving laterally until the maximum path length allowable.
Let me know if you have any further questions.
Best,
Carole