You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m working on creating a Look-Up Table for a Monte Carlo simulation to model light propagation in tissue. This has been done before using MATLAB, now I’m looking to transition to Python and considering using the pyxopto library for the simulation. Has anyone tried doing something similar before? Appreciate any insights or advice to direct me to my goal.
The text was updated successfully, but these errors were encountered:
The dataset submodule can be used to render example Python scripts for various configurations and then customize the code: https://xopto.github.io/pyxopto/docs/html/source/dataset/description.html
Utilities for sampling of scattering phase function parameters in native or gamma-delta space are available in xopto.pf.util submodule.
Utilities for random sampling of parameters and creating statistical models are available in xopto.util.sampler submodule.
The general idea is to create a single Mc instance and then update the instance/model parameters before each call to the run method. For a simple 2D lookup table of a semi-infinite sample this would require updating of the absorption and scattering coefficients:
g=0.8formuinmua_values:
formusrinmusr_values:
mc_instance.layers[1].mua=mumc_instance.layers[1].mus=musr/(1.0-g)
results=mc.run(10e6)
# extract and save the desired data such as reflectance, transmittance, fluence, trace - see the examples
I’m working on creating a Look-Up Table for a Monte Carlo simulation to model light propagation in tissue. This has been done before using MATLAB, now I’m looking to transition to Python and considering using the pyxopto library for the simulation. Has anyone tried doing something similar before? Appreciate any insights or advice to direct me to my goal.
The text was updated successfully, but these errors were encountered: