Getting Started with MCX
- 1.1. example/quicktest
- 1.2. example/validation
To get started with MCX, please check out the examples
under <mcx>/example directory. These examples are meant to run out-of-box (given that your system is properly configured, see Doc/Installation
). For each example, you can find one or more shell scripts (usually ended with ".sh"). Try to run them one by one and get a feel with MCX simulations. You are also encouraged to open these scripts or input files (*.inp) with a text editor to learn the command formats of these files.
The following is a list of examples you may want to get hands on first:
under this folder, you can find three scripts:
- A script to call mcx to print the GPU information. Run this script and find out how many GPUs you have in your graphics card and the related parameters (memory, cores etc)
- This will run MCX for a simple homogeneous media as the example used in the paper. It will launch only ~1 million photons and take roughly half a second.
- This script does the same thing as run_qtest.sh, except it let mcx to print messages to a log file rather than printing on the screen (so called silent mode)
- This script will reproduce the homogeneous simulation case discussed in section 3 of the paper. No boundary reflection is considered in this simulation. A total of 100 million photons will be simulated and the output data will be saved as semi_infinite.mc2.
- This script will run the same simulation as in the above script, except that it enables the boundary reflection. A total of 100 million photons will be simulated. Because photon continues to propagate when it hits a boundary in this case, the total simulation time is >10x longer than the previous case.
- after running the previous two simulations, you can now reproduce Fig. 5 in the paper to validate the output solutions. You need to run Matlab or GNU octave, and add path to <mcx>/utils, and run "plotsimudata". Four figures will be plotted comparing the analytical solution and MCX output.