Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R(fx) results using NURBS #17

Open
hayakawa16 opened this issue Aug 10, 2018 · 6 comments
Open

R(fx) results using NURBS #17

hayakawa16 opened this issue Aug 10, 2018 · 6 comments

Comments

@hayakawa16
Copy link
Member

The R(fx) results using the forward solver "Scaled Monte Carlo: Nurbs" appear to be less accurate for fx=0 compared to the results using "Scaled Monte Carlo: Basic". This is perplexing to me because the Nurbs results are generated using the Basic theory and added adaptive spatial and temporal binning and non-uniform rational b-splines to provide improved results.

For example, I ran a conventional Monte Carlo simulation using the optical properties mua=0.00990099/mm, mus=4.95049505/mm, g=0.8, and n=1.4. For fx=0, I determined that R(fx)=0.62, total diffuse reflectance. With the GUI, using these optical properties, I get for Basic R(fx=0)=0.62, however, using Nurbs I get R(fx=0)=0.603.

@dcuccia
Copy link

dcuccia commented Aug 10, 2018

Very generic comment, but the NURBS solution is inherently an interpolated polynomial, and fx=0 is at a boundary. Depending on how it was built and what the boundary conditions/constraints were, it's possible that could be contributing. It's also possible you are pushing the limits of the interpolation at very high scattering and low absorption - does the disagreement decrease if you cut mus' down significantly?

@hayakawa16
Copy link
Member Author

Great feedback David. Thanks. I tried mua=0.01, musp=0.1 and for Nurbs I get R(fx=0)=0.253 and for Basic I get R(fx=0)=0.259. So difference is smaller.

I'm trying to paper trail back in time. The latest SL version of the GUI produces the same results, however, it is hard for me to believe that when the Nurbs was first deployed that this discrepancy existed. Do you know of a way I can try an early version of the SL GUI that included Nurbs? The hunch I'm trying to debug is if a external library update modified the results somehow.

@dcuccia
Copy link

dcuccia commented Aug 10, 2018 via email

@hayakawa16
Copy link
Member Author

Good suggestions. I'll keep you posted.

@hayakawa16
Copy link
Member Author

I used SourceTree to go back in time in one year increments. I was able to checkout and successfully build back to 1/4/2011 and can verify that Nurbs generated R(fx=0)=0.603 then. I'm having trouble building earlier than that. To give reference, Michele's last commit occurred on 10/1/2010, so I'm fairly certain that Nurbs produced this value from the start. I'll continue to try to see if I can build the code earlier than 1/4/2011.

@hayakawa16
Copy link
Member Author

hayakawa16 commented Aug 13, 2018

I have convinced myself that the Nurbs results are not due to some library update. So the lack of accuracy must be coming from our code and has existed for the last 7 years. I first stepped through the R(fx) code. This code is quite complex and the algorithms used are not documented anywhere. So I returned to the R(rho, time) results which are documented in Martinelli's paper. I plotted the results using Basic and Nurbs for R(rho), R(rho=5mm, time), R(fx), plotting the Basic first, then the Nurbs (first row of the attachment). Then I used "Curve" to show their comparison (second row of the attachment).
It looks as though Nurbs is underestimating reflectance compared to the Basic in all solution domains. In Martinelli's paper, Figure 5, the optical properties (mua=0.01/mm, mus'=1/mm) are those I'm using. The Figure shows agreement with conventional MC for rho=5mm at t=0.5ns. In the second row of the attachment the plots shows that Nurbs results are consistently below Basic.

I wanted to know the factor offset value. For the R(fx=0) results the values for Basic 0.620 and 0.603 are off by 2.74%. This number sounded familiar to me. It reminded me of the percentage error that occurs if specular reflection is not factored into the reflectance. For a tissue of n=1.4, the specular reflectance factor value is 0.97222. So for the Nurbs Forward solver code, I quick fix coded that the code for R(rho, time) and R(fx) be divided by a factor 0.97222 before returning the value. The third and fourth row of the attachment show the results with this quick fix.
Comparison.docx

So my conjecture is that the baseline Monte Carlo that was executed for the Nurbs results somehow included a specular reflection factor twice, however, I'm not completely convinced of that. The VP Monte Carlo code was not used back then for these results. I'm not sure if the code that was used was archived anywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants