MCCL Examples - VirtualPhotonics/Vts.MonteCarlo GitHub Wiki
help - displays brief description of parameters described below
infile - the default is infile.txt in the root of the application, accepts relative and absolute paths
outpath - default is the root of the application, accepts relative and absolute paths
outname - default is the infile name, this value is appended if there is a parameter sweep
paramsweep - takes the sweep parameter name and values in the format:
paramsweep=<SweepParameterType>,Start,Stop,Count
paramsweepdelta - takes the sweep parameter name and values in the format:
paramsweepdelta=<SweepParameterType>,Start,Stop,Delta
paramsweeplist - takes the sweep parameter name and values in the format:
paramsweeplist=<SweepParameterType>,number of values,val1,val2,...,valn
geninfiles - generates sample infiles and names them infile_XXX.txt
mua1 - absorption coefficient for tissue layer 1
mus1 - scattering coefficient for tissue layer 1
n1 - refractive index for tissue layer 1
g1 - anisotropy for tissue layer 1
d1 - thickness for tissue layer 1
mua2 - absorption coefficient for tissue layer 2
mus2 - scattering coefficient for tissue layer 2
n2 - refractive index for tissue layer 2
g2 - anisotropy for tissue layer 2
d2 - thickness for tissue layer 2
muai - absorption coefficient for tissue layer i
musi - scattering coefficient for tissue layer i
ni - refractive index for tissue layer i
gi - anisotropy for tissue layer i
di - thickness for tissue layer i
nphot - number of photons to launch from the source
Example: Create a folder called MonteCarlo with 2 sub-folders “Application” and “Simulation”. In Application place all the files needed to run mc.exe (Same files as the zip file). In Simulation place any input files, myinfile.txt.
- MonteCarlo (folder)
- Application (folder)
- Simulation (folder)
- Results (folder)
C:\MonteCarlo\Application\mc infile=C:\MonteCarlo\Simulation\myinfile.txt
Input File: C:\MonteCarlo\Simulation\myinfile.txt with OutputName="results" specified in myinfile.txt
Output Path: C:\MonteCarlo\Results
Results Folder Name: results
C:\MonteCarlo\Application\mc infile=C:\MonteCarlo\Simulation\infile_database.txt outpath=C:\MonteCarlo\NewResults
Input File: C:\MonteCarlo\Simulation\infile_database.txt with OutputName="results" specified in infile_database.txt
Output Path: C:\MonteCarlo\NewResults
Results Folder Name: results
C:\MonteCarlo\Application\mc infile=C:\MonteCarlo\Simulation\myinfile.txt paramsweepdelta=mua1,0.01,0.04,0.01
Input File: C:\MonteCarlo\Simulation\myinfile.txt with OutputName="results" specified in myinfile.txt
Output Path: C:\MonteCarlo\Results
Results Folder Names:
- results_mua1_0.01
- results_mua1_0.02
- results_mua1_0.03
- results_mua1_0.04
C:\MonteCarlo\Application\mc infile=C:\MonteCarlo\Simulation\infile_database.txt outpath=C:\MonteCarlo\NewResults paramsweepdelta=mua1,0.01,0.04,0.01
Input File: C:\MonteCarlo\Simulation\infile_database.txt with OutputName="results" specified in infile_database.txt
Output Path: C:\MonteCarlo\NewResults
Results Folder Names:
- results_mua1_0.01
- results_mua1_0.02
- results_mua1_0.03
- results_mua1_0.04
C:\MonteCarlo\Application\mc infile=C:\MonteCarlo\Simulation\infile_database.txt outpath=C:\MonteCarlo\NewResults outname=myResults paramsweepdelta=mua1,0.01,0.04,0.01
Input File: C:\MonteCarlo\Simulation\infile_database.txt
Output Path: C:\MonteCarlo\NewResults
Output tag: myResults
Results Folder Names:
- myResults_mua1_0.01
- myResults_mua1_0.02
- myResults_mua1_0.03
- myResults_mua1_0.04
Run the simulation specifying one of the txt input files and an output folder and a 3D parameter sweep
C:\MonteCarlo\Application\mc infile=C:\MonteCarlo\Simulation\infile_database.txt outpath=C:\MonteCarlo\NewResults outname=myResults paramsweep=mua1,0.01,0.03,2 paramsweep=g1,0.8,0.9,2 paramsweep=mus1,5.0,6.0,2
Input File: C:\MonteCarlo\Simulation\infile_database.txt
Output Path: C:\MonteCarlo\NewResults
Output tag: myResults
Results Folder Names:
- myResults_mua1_0.01_g1_0.80_mus1_5.00
- myResults_mua1_0.01_g1_0.80_mus1_6.00
- myResults_mua1_0.01_g1_0.90_mus1_5.00
- myResults_mua1_0.01_g1_0.90_mus1_6.00
- myResults_mua1_0.03_g1_0.80_mus1_5.00
- myResults_mua1_0.03_g1_0.80_mus1_6.00
- myResults_mua1_0.03_g1_0.90_mus1_5.00
- myResults_mua1_0.03_g1_0.90_mus1_6.00
All of the above commands described for Windows will also work on linux or Mac by replacing C:\MonteCarlo\Simulation with /home/user/MonteCarlo/Simulation.
Run the simulation from the directory (e.g. /home/user/MonteCarlo/) where the zip file was unzipped:
./mc infile=myinfile.txt
Input File: /home/user/MonteCarlo/myinfile.txt with OutputName="results" specified in myinfile.txt
Output Path: /home/user/MonteCarlo/
Results Folder Name: results
/home/user/MonteCarlo/mc infile=/home/user/MonteCarlo/Simulation/myinfile.txt
Input File: /home/user/MonteCarlo/Simulation/myinfile.txt with OutputName="results" specified in myinfile.txt
Output Path: /home/user/MonteCarlo/
Results Folder Name: results