2014 Laboratory B: Monte Carlo Simulations of Radiative Transport
GOALS: Gain familiarity with the use of Monte Carlo Simulations to provide fluence and reflectance predictions
Open VTS_MATLAB folder and click on file short_course_lab_B.m.
I. Dependence of Fluence Predictions on Number of Photons Simulated
Goal: This exercise explores how fluence estimates change with the number of photons simulated.
- Go to the section Example 1a. This example sets up a Monte Carlo simulation for a system with a collimated source impinging on a slab of tissue. The tissue optical properties are specified in the "tissueInput.LayerRegions" struct under "RegionOP".
tissueInput.LayerRegions = struct(... 'ZRange', ... {... [-Inf, 0], ... % air "z" range [0, 100], ... % tissue "z" range [100, +Inf] ... % air "z" range }, ... 'RegionOP', ... {... [0.0, 1e-10, 1.0, 1.0], ... % air optical properties [0.01, 1.0, 0.8, 1.4], ... % tissue OPs [ua, us', g, n] [0.0, 1e-10, 1.0, 1.0] ... % air optical properties } ... );
The vector with comment "tissue OPs" specifies μa mm-1, μs' mm-1, g and n of the tissue slab. Fluence is calculated in a cylindrical coordinate system (ρ, z) for increasing number of photons launched from the source, N = 10, 100, 1000, 10000.
- Configure an Analog simulation by setting "options.AbsorptionWeightingType" to 'Analog' (Line 17).
options.AbsorptionWeightingType = 'Analog';
- Set the tissue absorption to μa=0.01 mm-1.
- Execute Example 1a by right clicking on the cell so that it turns a pale yellow color and selecting "Evaluate Current Cell" or typing Ctrl+Enter.
- How do the fluence results change as N is increased?
- The relative error (RE) for the fluence is determined by dividing the standard deviation by the mean. For N=10,000, why does the relative error increase with distance from the source?
- Change the Monte Carlo estimator to Discrete Absorption Weighting (DAW) by setting "options.AbsorptionWeightingType" to 'Discrete'.
options.AbsorptionWeightingType = 'Discrete';
Execute the Example 1a cell with this new setting.
- How do the results using Analog and DAW compare for a given number of launched photons N?
- For N=10000 which estimator provides fluence results with the least RE?
- Now move down to Example 1b. This cell plots the difference in the relative error (RE) between Analog and DAW estimators.
- Execute this cell. In what spatial regions does DAW show smaller RE than Analog? Can you explain why?
II. Spatially-Resolved Reflectance Predictions for Analog versus CAW Simulations
Goal: This exercise compares error estimates of spatially-resolved reflectance using Analog versus Continuous Absorption Weighting (CAW) simulations.
- Example 2 sets up two Monte Carlo simulations using: 1) Analog, and 2) Continuous Absorption Weighting (CAW). The source is collimated and the tissue has optical properties [μa, μ's, g, n] = [0.01, 1.0, 0.8, 1.4]. Spatially-resolved reflectance is calculated in ρ bins. The number of photons launched for each simulation is N=10,000.
- Set the tissue absorption to μa=0.01 mm-1
[0.01, 1.0, 0.8, 1.4], ... % tissue OPs [ua, us', g, n]
and execute this cell.
- What span of source-detector separations (ρ) does Analog have smaller standard deviations (SDs) than CAW? Where does CAW have smaller SDs? Can you explain why?
- Note the time each took to execute in the Matlab command window. Why does Analog run so much faster?
- Determine the Analog relative standard deviation in the last ρ bin (ρ=9.9 mm) by typing "d1SD(100)/d1.Mean(100)" in the matlab command window. Do the same for CAW "d2SD(100)/d2.Mean(100)". Which method, Analog or CAW, has the smaller relative standard deviation?
- The efficiency of an estimator is calculated as Efficiency =1/(R^2 T) where R is the relative standard deviation and T is the time it took for the simulation to execute. Which estimator has the larger efficiency for detector estimates at ρ=9.9 mm?
- Set the tissue absorption to μa=0.1 mm-1
[0.1, 1.0, 0.8, 1.4], ... % tissue OPs [ua, us', g, n]
and execute the cell again.
- Looking at the results for μa=0.01 mm-1 with μa=0.1 mm-1, how do the two methods RE compare as absorption is increased?
Bring up the GUI
III. Monte Carlo Simulations of Narrow Collimated Beam Irradiation
Goal: This portion of the lab is to examine the impact of optical properties on the amplitude and axial/lateral dispersion of the light in turbid tissues.
- Select the Monte Carlo Solver Panel.
- Click Download Prototype Input Files button. This download sample infiles in a zip file. Extract the contents of the zip file.
- In the Input File Specification, click the Load Input File button. Select the file: infile_one_layer_ROfRho_FluenceOfRhoAndZ.txt. This is a Monte Carlo simulation input file that specifies a Discrete Absorption Weighting (DAW) simulation to produce reflectance as a function of source-detector (ρ) separation, R(ρ) and fluence in cylindrical coordinates (ρ,z).
- Set the optical properties of the tissue layer to be μa = 0.01mm-1, μ's = 1mm-1, g=0.8.
- Set Number of Photons to 1000.
- Click the Run Simulation button.
- On the Map View plot, note the Mean Depth magnitude, axial and lateral penetration depths of the fluence distribution.
- Increase the absorption coefficient to μa = 1mm-1, keeping all other properties constant.
- Click the Run Monte Carlo Simulation button.
- Note the magnitude of the Mean Depth, axial and lateral penetration depths of the fluence distribution.
- Now repeat this exercise keeping μa constant at 0.1mm-1 and μ's values of 0 and 1mm-1, noting the mean depth of penetration.
Questions:
- How does increasing absorption change the magnitude, axial and lateral penetration depths?
- How does increasing scattering change the magnitude, axial and lateral penetration depths?
IV. Visualizing Radiance versus Fluence distributions using the Monte Carlo CommandLine Application
Goal: This portion of the lab exercise is to examine the directional aspect of radiance in turbid tissues.
- On the Desktop, holding down the shift key, right click the MCCL folder and select Open command window here.
- Execute the Monte Carlo Command Line Application using the command is mc infile=infile_one_layer_FluenceOfRhoAndZ_RadianceOfRhoAndZAndAngle.txt. This infile specifies a perpendicular point source impinging on the tissue at (0,0,0). The tissue is homogeneous with optical properties μa = 0.01mm-1, μ's = 1mm-1, g=0.8 and n = 1.4. N=10,000 photons are launched. Executing this command creates a folder called "one_layer_FluenceOfRhoAndZ_RadianceOfRhoAndZAndAngle" in the MCCL directory with fluence and radiance detector results.
- Go into the MCCL folder.
- Click on load_results_script. This will bring up MATLAB and also a window to edit load_results_script.m. Change datanames to be one_layer_FluenceOfRhoAndZ_RadianceOfRhoAndZAndAngle. Enter load_results_script at the MATLAB prompt.
- Three figures should appear, one plot of Fluence, and two plots of radiance in the lower and upper hemispheres. Note that the lower hemisphere is notated as [0-pi/2] and the upper hemisphere as [pi/2-pi]. These angles are with reference to the positive z-axis which is into the tissue.
Questions:
- In what way can the angular information shown in the radiance plots be useful?
- Which plot of radiance looks most like Fluence and why?
Additional Questions: Consider the situation where you using a laser-based therapy to treat an embedded tumor. For this application, it is critical that you maximize the axial penetration of the light field. However during the treatment, the tissue absorption may increase due to increased blood flow and scattering may decrease due to morphological changes in the tissue. In this context comment on the following:
- How does an increase in absorption impact (a) the axial penetration of the light field and (b) the lateral dispersion of the light field?
- How does a decrease in scattering impact (a) the axial penetration of the light field and (b) the lateral dispersion of the light field?
- Would increasing the beam diameter improve (a) the axial penetration of the light field and/or (b) the lateral dispersion of the light field? Is this impact the same regardless of the optical properties?