|
|
*******DISCUSSION THUS FAR*********
Original Question:
Hi Everyone,
I am trying to figure out how much my photon reflectance (and momentum transfer) drops if my medium is only about 1cm thick. When I run this using your online application, I specify the air layer from -Infinity to 0mm, then the 1st
and 2nd layers I make the same optical properties and from 0mm-5mm, 5mm-10mm, respectively. The last layer is air from 10mm to Infinity. Optical properties set to 0.0019mua 1musp, which by my calculation, would give 1/e attenuation at 1cm thickness
using the typical 1/(n*3*mua*musp). When I do this with the Monte Carlo I hardly see any change in reflectance from the case where the tissue is infinitely thick. To test this limitation, I even made the thickness of the tissue layers only 0.1mm thick,
and the reflectance still only dropped by about 15% when I did this vs infinitely thick. Do you guys know what might be going on here? Does the transmitted photons get counted in the detector? Thanks for your help,
Tyler
Response from Carole
If you add TDiffuseDetectorInput to your list of DetectorInputs
in the input xml file, it will tally everything that exits the
bottom of the tissue. After you execute the MC, a TDiffuse.xml
will get created that will show how many photons contributed
to this tally (TallyCount) and the average weight (Mean).
My Response
I tried this, but when I load an XML using the VTS website and rerun the simulation, the saved settings XML doesn't reflect any of the changes. It's like it is not even loading it. Do I have to run the simulation separate from
the website? Perhaps I did not format the TDiffuseDetectorInput correctly when entering it in the XML?
|
|
|
Coordinator
Feb 15 at 7:49 PM
|
Hi Tyler,
I was trying to reproduce the issue you were having and I noticed that the GUI did lock up after I modified the XML file to add the TDiffuse detector input. When I went to debug it seems to have been resolved. I will push a new version of the GUI out to
the web this week and hopefully this will resolve your issue.
Thanks,
Lisa
|
|
|
|
|
ok thanks. Also, is there a tally list in the .xml? Is there a way I can ask it to tally momentum transfer?
On Wed, Feb 15, 2012 at 12:49 PM, lmalenfant <notifications@codeplex.com> wrote:
From: lmalenfant
Hi Tyler,
I was trying to reproduce the issue you were having and I noticed that the GUI did lock up after I modified the XML file to add the TDiffuse detector input. When I went to debug it seems to have been resolved. I will push a new version of the GUI out to
the web this week and hopefully this will resolve your issue.
Thanks,
Lisa
|
|
|
Coordinator
Feb 15 at 8:12 PM
|
Tyler - Momentum Transfer is implemented but not exposed...if you ran it now, you'd get zeros. Carole wanted to follow up with you to determine what you'd actually need, and we'd get this out. Can you describe here what features you'd like (reflectance vs
fluence vs radiance, solution domain - fx vs rho vs time)?
|
|
|
|
|
Sure - what would be useful for me is the histogram of total momentum transfer as a function of rho and/or frequency in each layer. The per photon tally of momentum transfer and rho/fx in each layer and weight would also do. Let me know if you guys make
any progress in this area. Thanks!
Tyler
On Wed, Feb 15, 2012 at 1:12 PM, dcuccia <notifications@codeplex.com> wrote:
From: dcuccia
Tyler - Momentum Transfer is implemented but not exposed...if you ran it now, you'd get zeros. Carole wanted to follow up with you to determine what you'd actually need, and we'd get this out. Can you describe here what features you'd like (reflectance vs
fluence vs radiance, solution domain - fx vs rho vs time)?
|
|
|
Coordinator
Feb 16 at 10:44 PM
Edited Feb 16 at 10:56 PM
|
The new version of the GUI is now available on the website, let me know if you are still having issues with this version and I can take a look at your XML file.
|
|
|
Developer
Feb 22 at 9:39 PM
|
Concerning a new Momentum Transfer detector: I plan to add that this detector would be a nice feature to the Monte Carlo code to the codeplex Issues page and it will get tracked/discussed there.
|
|
|
Developer
Feb 22 at 10:36 PM
Edited Feb 29 at 7:34 PM
|
Just to close loop, here is link to Issues page:
http://virtualphotonics.codeplex.com/workitem/33
|
|
|
Coordinator
Feb 23 at 12:30 AM
|
Tyler - we had an interesting discussion around this topic today and we've come up with a game plan. Out of scientific curiosity, we were curious why specifically a mean and second moment aren't sufficient for the computation, and a true histogram in MT
is required (vs just adding more bins to capture a finer representation of MT mean and second moment).
|
|
|
|
|
Hi David,
I haven't thought too much about using the moments of the distribution. I think the main thing is that the quantity of interest in the end is not the weighted average MT but the weighted average decorrelation exponential (=exp(-1/3*k^2*MT*msdisplacement)).
Thus I need the full probability distribution of MT to calculate this. If I wanted to use moments I think we would have to tally the decorrelation exponential itself and use the moments of
this quantity. This would be OK but then I think we would have to assume some mean square displacement during the monte carlo - not ideal since this is the quantity to be fit and would be nice to have this outside the monte carlo. I may be way off here
though, let me know if I am not understanding you right.
Tyler
On Wed, Feb 22, 2012 at 5:31 PM, dcuccia <notifications@codeplex.com> wrote:
From: dcuccia
Tyler - we had an interesting discussion around this topic today and we've come up with a game plan. Out of scientific curiosity, we were curious why specifically a mean and second moment aren't sufficient for the computation, and a true histogram in MT
is required (vs just adding more bins to capture a finer representation of MT mean and second moment).
|
|
|
Coordinator
Feb 23 at 6:59 PM
|
That makes sense - I always forget that expectation values of nonlinear functions aren't the same as nonlinear operations on expected values. In the more familiar cases to us (say reflectance or fluence), finer space-time bins result in "flatter" distributions,
where the distribution is pretty well represented by a mean. In your case, the histogram is probably highly nonlinear. (Aside: Is there a good reference paper that shows these distributions as a function of radial distance from the source?)
Re: implementation:
- Do you typically set bounds of [0, 1] for your MT histograms, or do you narrow it down (and/or make the bounds spatially-dependent)?
- How many bins do you typically use?
|
|
|
|
|
Hi David,
The histogram is indeed non-linear, and also varies quite a bit depending on radial distance from source. It doesn't look like any of the typical distributions (i.e. Gaussian, Chi2, etc) that I know of. Thus, I don't think we could accurately reconstruct
the distribution with only a couple moments. Incidentally, since you are asking my paper shows this histogram at a couple of source detector separations!
http://www.opticsinfobase.org/abstract.cfm?URI=josaa-28-10-2108 . If you are looking for references outside BLI, I know that David Boas has a couple of these plots in his thesis.
I see similar distributions to him, with a peak at dimensionless MT = 2, which would be hard backscattering. Typically my histograms range from [0-300] (note we histogram the total momentum transfer after it's scattered a bunch so it will usually be above
1). I use 3000 bins with a spacing of 0.1. For radial bins, I use about 300 with a spacing of 0.05mm. I messed around with it quite a bit and found this to accurately represent the distribution, but there is probably some room for optimization still.
Tyler
On Thu, Feb 23, 2012 at 12:00 PM, dcuccia <notifications@codeplex.com> wrote:
From: dcuccia
That makes sense - I always forget that expectation values of nonlinear functions aren't the same as nonlinear operations on expected values. In the more familiar cases to us (say reflectance or fluence), finer space-time bins result in "flatter"
distributions, where the distribution is pretty well represented by a mean. In your case, the histogram is probably highly nonlinear. (Aside: Is there a good reference paper that shows these distributions as a function of radial distance from the source?)
Re: implementation:
- Do you typically set bounds of [0, 1] for your MT histograms, or do you narrow it down (and/or make the bounds spatially-dependent)?
- How many bins do you typically use?
|
|
|
Developer
Mar 2 at 3:32 AM
|
Hi Tyler,
I've implemented a momentum transfer detector in our code and would like to test it out with some data that you typically use. If possible, could you please let me know:
- tissue optical properties (e.g. mua, mus, g, n)
- tissue top and bottom layer thicknesses
- rho bins (e.g. start, stop, delta)
- MT bins (start, stop, delta)
- how many photons you run
Thanks!
Carole
|
|
|
Developer
Apr 12 at 12:42 AM
|
Hi Tyler,
Since the momentum transfer results agrees with yours, I have pushed the latest Monte Carlo code to codeplex. It is version 1.0.4 Beta and can be downloaded from http://virtualphotonics.codeplex.com/releases/view/85890
A couple of notes about this new capability:
- The detector results are now divided by N, the number of photons launched. While debugging I gave you results that were not normalized by N, but with this release this normalization is included so that the second moment results make
sense.
- A sample input file specifying this detector is bundled with download, "infile_two_layer_ReflectedMTOfRhoAndSubRegionHist.xml".
- After running the simulation using the command "mc.exe infile=infile_two_layer_ReflectedMTOfRhoAndSubRegionHist.xml", you can view the results using bundled matlab files. By editing the field "datanames" in load_results_script.m to 'two_layer_ReflectedMTOfRhoAndSubRegionHist"and
running it, you should be able to view the MT results. Note that the sample infile specifies a 4-layer system, with air above and below a two-layer slab, so 4 plots will come up showing MT and a 5th plot showing R(rho).
Also, in SimulationOptions in the infile you can set "track statistics" to true. This will output a 'statistics.xml' that will let you know how many photons exited out the bottom of the tissue. I think you had a question about this earlier.
Please let me know how you're doing and if you have any questions/comments/requests.
Thanks,
Carole
|
|
|
|
|
Hi Carole,
Testing this out a bit now. Can you tell me how the histograms are created on a layer by layer basis? Do you tally the total MT in layer 1 and layer 2 then put the weight of the photon in each histogram in the appropriate bin? Shouldn't all photon weight
be accounted for in each histogram in this case? In the ones I am looking at, the total weight of each histogram changes depending on layer thickness, etc. What happens if the MT for a layer is 0?
On Wed, Apr 11, 2012 at 5:42 PM, hayakawa <notifications@codeplex.com> wrote:
From: hayakawa
Hi Tyler,
Since the momentum transfer results agrees with yours, I have pushed the latest Monte Carlo code to codeplex. It is version 1.0.4 Beta and can be downloaded from
http://virtualphotonics.codeplex.com/releases/view/85890
A couple of notes about this new capability:
- The detector results are now divided by N, the number of photons launched. While debugging I gave you results that were not normalized by N, but with this release this normalization is included so that the second moment results make sense.
- A sample input file specifying this detector is bundled with download, "infile_two_layer_ReflectedMTOfRhoAndSubRegionHist.xml".
- After running the simulation using the command "mc.exe infile=infile_two_layer_ReflectedMTOfRhoAndSubRegionHist.xml", you can view the results using bundled matlab files. By editing the field "datanames" in load_results_script.m to 'two_layer_ReflectedMTOfRhoAndSubRegionHist"and
running it, you should be able to view the MT results. Note that the sample infile specifies a 4-layer system, with air above and below a two-layer slab, so 4 plots will come up showing MT and a 5th plot showing R(rho).
Also, in SimulationOptions in the infile you can set "track statistics" to true. This will output a 'statistics.xml' that will let you know how many photons exited out the bottom of the tissue. I think you had a question about this earlier.
Please let me know how you're doing and if you have any questions/comments/requests.
Thanks,
Carole
|
|
|
|
|
OK I believe the algorithm is just getting the MT from each layer, moving to the appropriate bin, and putting the weight of the photon there. The problem is that we lose some information this way because I can't tell which photons hit both and how much
each photon deposits in the first/second layer, respectively. Is there any way I can access the individual photon histories? I would need to histogram the total MT transfer, and histogram the fraction of that total MT transfer deposited in the first and second
layer. I could achieve this with access to the photon histories.
Tyler
On Thu, Apr 26, 2012 at 1:03 PM, Tyler Bywaters Rice <tybyrice@gmail.com> wrote:
Hi Carole,
Testing this out a bit now. Can you tell me how the histograms are created on a layer by layer basis? Do you tally the total MT in layer 1 and layer 2 then put the weight of the photon in each histogram in the appropriate bin? Shouldn't all photon weight
be accounted for in each histogram in this case? In the ones I am looking at, the total weight of each histogram changes depending on layer thickness, etc. What happens if the MT for a layer is 0?
On Wed, Apr 11, 2012 at 5:42 PM, hayakawa <notifications@codeplex.com> wrote:
From: hayakawa
Hi Tyler,
Since the momentum transfer results agrees with yours, I have pushed the latest Monte Carlo code to codeplex. It is version 1.0.4 Beta and can be downloaded from
http://virtualphotonics.codeplex.com/releases/view/85890
A couple of notes about this new capability:
- The detector results are now divided by N, the number of photons launched. While debugging I gave you results that were not normalized by N, but with this release this normalization is included so that the second moment results make sense.
- A sample input file specifying this detector is bundled with download, "infile_two_layer_ReflectedMTOfRhoAndSubRegionHist.xml".
- After running the simulation using the command "mc.exe infile=infile_two_layer_ReflectedMTOfRhoAndSubRegionHist.xml", you can view the results using bundled matlab files. By editing the field "datanames" in load_results_script.m to 'two_layer_ReflectedMTOfRhoAndSubRegionHist"and
running it, you should be able to view the MT results. Note that the sample infile specifies a 4-layer system, with air above and below a two-layer slab, so 4 plots will come up showing MT and a 5th plot showing R(rho).
Also, in SimulationOptions in the infile you can set "track statistics" to true. This will output a 'statistics.xml' that will let you know how many photons exited out the bottom of the tissue. I think you had a question about this earlier.
Please let me know how you're doing and if you have any questions/comments/requests.
Thanks,
Carole
|
|
|
Developer
Apr 27 at 10:50 PM
|
Hi Tyler,
I was just about to respond to your previous post. Lets consider one rho bin in the
one tissue layer system. For each photon, the cumulative MT is determined for the entire tissue (one region), if it is >0, the appropriate MT bin is found, and the exiting photon weight is deposited into this MT bin. So here
you can imagine a histogram plot with MT along x-axis and photon weight along y-axis for one rho. If you integrate this plot over MT you should get the reflected photon weight out this rho bin.
Now lets look at the two layer tissue system. The way the code works is similar. For each photon, the cumulative MT
for each layer is determined, if it is >0, the appropriate MT bin is found, and the exiting photon weight is deposited in these two region bins. So here again you get two histogram plots with MT along x-axis and photon weight along
y-axis. But when you integrate these plots over MT you do not get the reflected photon weight out this rho bin because many weights are double counted if there is MT in both layers.
So from your most recent post, it appears you would like to have the exiting photon weight appropriately spread across the layers such that the integration over MT, over both layers gives you back the reflected photon weight. If this is what you want,
lets meet to discuss this.
Carole
|
|
|
|
|
Hello,
I am not sure how the photon weight spreading would work, but what I believe I need is the overall MT histogram (for all layers) and then the fraction of contribution from bottom and top as a function of radius. Would this be possible? Could also do it
post analysis with access to individual photon histories. I would be happy to meet any time this week,
Tyler
On Fri, Apr 27, 2012 at 3:50 PM, hayakawa <notifications@codeplex.com> wrote:
From: hayakawa
Hi Tyler,
I was just about to respond to your previous post. Lets consider one rho bin in the
one tissue layer system. For each photon, the cumulative MT is determined for the entire tissue (one region), if it is >0, the appropriate MT bin is found, and the exiting photon weight is deposited into this MT bin. So here you can imagine
a histogram plot with MT along x-axis and photon weight along y-axis for one rho. If you integrate this plot over MT you should get the reflected photon weight out this rho bin.
Now lets look at the two layer tissue system. The way the code works is similar. For each photon, the cumulative MT
for each layer is determined, if it is >0, the appropriate MT bin is found, and the exiting photon weight is deposited in these two region bins. So here again you get two histogram plots with MT along x-axis and photon weight along y-axis.
But when you integrate these plots over MT you do not get the reflected photon weight out this rho bin because many weights are double counted if there is MT in both layers.
So from your most recent post, it appears you would like to have the exiting photon weight appropriately spread across the layers such that the integration over MT, over both layers gives you back the reflected photon weight. If this is what you want, lets
meet to discuss this.
Carole
|
|
|
Coordinator
Apr 30 at 9:04 PM
|
Not sure if you guys have met yet, but I'd be interested in listening in...perhaps Friday? I'm at the OSA BIOMED until Wed night. -DC
|
|
|
Developer
May 2 at 8:53 PM
|
Friday 9-10 or 11-12 works with me. David, I'd also like to talk to you about the detector for acerussi.
|
|
|
|
|
Hi Carole, let's meet at 11then !
On Wed, May 2, 2012 at 1:53 PM, hayakawa <notifications@codeplex.com> wrote:
From: hayakawa
Friday 9-10 or 11-12 works with me. David, I'd also like to talk to you about the detector for acerussi.
|
|
|
|
|
Hi Carole,
So sorry running late ill be in about 20minutes. Can you still meet?
On Thu, May 3, 2012 at 4:47 PM, Tyler Bywaters Rice <tybyrice@gmail.com> wrote:
Hi Carole, let's meet at 11then !
On Wed, May 2, 2012 at 1:53 PM, hayakawa <notifications@codeplex.com> wrote:
From: hayakawa
Friday 9-10 or 11-12 works with me. David, I'd also like to talk to you about the detector for acerussi.
|
|