Showing revision 1

MCX Documentation

Command Line Options

Required option

-f / --input

read an input file in .json or .inp format

MC options

-n / --photon

total photon number (exponential form accepted)

-r / --repeat

divide photons into r groups (1 per GPU call)

-b / --reflect

1 to reflect photons at ext. boundary;0 to exit

-B / --reflectin

1 to reflect photons at int. boundary; 0 do not

-u / --unitinmm

defines the length unit for the grid edge

-U / --normalize

1 to normalize flux to unitary; 0 save raw

-E / --seed

set random-number-generator seed, -1 to generate if an mch file is followed, MCX "replays" the detected photon; the replay mode can be used to calculate the mua/mus Jacobian matrices

-z / --srcfrom0

1 volume origin is [0 0 0]; 0: origin at [1 1 1]

-R / --skipradius

-2: use atomics for the entire domain (default) 0: vanilla MCX, no atomic operations >0: radius in which use shared-memory atomics -1: use crop0/crop1 to determine atomic zone

-k / --voidtime

when src is outside, 1 enables timer inside void

-Y / --replaydet

replay only the detected photons from a given detector (det ID starts from 1), used with -E

-P / --shapes

a JSON string for additional shapes in the grid

-N / --reseed

number of scattering events before reseeding RNG

-F / --faststep

1-use fast 1mm stepping, [0]-precise ray-tracing

-e / --minenergy

minimum energy level to terminate a photon

-g / --gategroup

number of time gates per run

-a / --array

1 for C array (row-major); 0 for Matlab array

GPU options

-L / --listgpu

print GPU information only

-t / --thread

total thread number

-T / --blocksize

thread number per block

-A / --autopilot

auto thread config:1 dedicated GPU;2 non-dedica.

-G / --gpu

specify which GPU to use, list GPU by -L; 0 auto or

-G / --gpu

using multiple devices (1 enable, 0 disable)

-W / --workload

workload for active devices; normalized by sum

-I / --printgpu

print GPU information and run program

Output options

-s / --session

a string to label all output file names

-d / --savedet

1 to save photon info at detectors; 0 not save

-x / --saveexit

1 to save photon exit positions and directions setting -x to 1 also implies setting '-d' to 1

-X / --saveref

1 to save diffuse reflectance at the air-voxels right outside of the domain; if non-zero voxels appear at the boundary, pad 0s before using -X

-q / --saveseed

1 to save photon RNG seed for replay; 0 not save

-M / --dumpmask

1 to dump detector volume masks; 0 do not save

-H / --maxdetphoton

max number of detected photons

-S / --save2pt

1 to save the flux field; 0 do not save

-O / --outputtype

X - output flux, F - fluence, E - energy deposit J - Jacobian (replay mode), P - scattering event counts at each voxel (replay mode only)

User IO options

-h / --help

print this message

-v / --version

print MCX revision number

-l / --log

print messages to a log file instead

-i / --interactive

interactive mode

Debug options

-D / --debug

print debug information (you can use an integer or or a string by combining the following flags)

-D [''|RMP]

1 R debug RNG 2 M store photon trajectory info 4 P print progress bar combine multiple items by using a string, or add selected numbers together

Additional options

--gscatter

after a photon completes the specified number of scattering events, mcx then ignores anisotropy g and only performs isotropic scattering for speed

--maxvoidstep

maximum distance (in voxel unit) of a photon that can travel before entering the domain, if launched outside (i.e. a widefield source)

--maxjumpdebug

when trajectory is requested (i.e. -D M), use this parameter to set the maximum positions stored (default: 1e6)
Powered by Habitat