VirtualPhotonics / VTS

Virtual Tissue Simulator
https://virtualphotonics.org
Other
34 stars 9 forks source link

Scaled Monte Carlo Options #11

Closed ccampb19 closed 5 years ago

ccampb19 commented 6 years ago

Hi all,

I'm working with water/intralipid and could really use some quick, accurate data for an n of ~1.33. I hear NURBS might be difficult to adapt for this, but perhaps scaled Monte Carlo is easy enough?

If I wanted to build this myself and simply swap out the current reference data, it looks like I could generate some new data in MCCL and change the "folder" variable in MonteCarloLoader.cs accordingly, or is there more to it than that?

Thanks, Chris

hayakawa16 commented 6 years ago

Hi Chris,

I wanted to go through the steps myself to check what is needed. It is pretty easy. Yes, I just changed the "folder" name to an alternate in MonteCarloLoader. However, this class expects to load reference ROfRhoAndTime and ROfFxAndTime data files, so you'll need to generate both and put them into your alternate folder. So I created an alternate folder "test" and then copied the 4 files from Resources/ReferenceData/N1e8mua0musp1g0p8dr0p2dt0p005/ into test/. Then I ran a MC using only 100 photons and the data I wanted. I took the resulting binary files ROfRhoAndTime and ROfFxAndTime and copied them over the existing files in test/. I didn't copy over the *.txt files because the MonteCarloLoader is expecting a simpler format for these files and the original ones will work. Also, I tested my result using Visual Studio (VS) 2017 and to load these files successfully, you need to change them to an "Embedded Resource". You do this in VS by right clicking file->Properties->Build Action->Embedded Resource. I should note that we have a "tasks" folder in our solution that has a Vts.MonteCarlo.GenerateReferenceData program. You can use the Program.cs to run the MC. You need to update tissue with the OPs of interest and uncomment lines 65-72 of this file so that the output is generated and you'll find the output in the bin/Debug/ folder of this folder.

I hope that sounded easy. Let me know if you have any problems. Best, Carole

ccampb19 commented 6 years ago

Awesome, Thanks Carole! I'll try this tomorrow. It should, I hope, help immensely.