Command Line Interface
Top-Level CLI (Module Selection)
- master_cli.main()[source]
Parses module selection (
simulateorrun_tests) and invokes the relevant functions- Arguments
simulate: Used to run the simulator normally. See Simulation CLI below.run_tests: Used to run the installation and accuracy tests. See Testing CLI below.
Simulation CLI
- class src.cli.CLI(subparsers)[source]
- Simulation Arguments
n_walkers: Number of spins to populate voxel. Must be an integer greater than zero. It is recommended to use a sufficient number of spins to achieve a spin density of at least 1.0 spin per cubic micrometer.fiber_fractions: Volume fractions (as a tuple of floats) of each fiber type to populate in simulated voxel. Must be non-negative and sum to less than 1.fiber_radii: Radii of each desired fiber type (as a tuple of floats) in units of micrometers. Length must match the number of entries infiber_fractionsand value must be non-negative.thetas: Angles for each fiber bundle to be rotated (w.r.t. the y-axis)fiber_diffusions: Intrinsic diffusivities (in units of square micrometers per millisecond) of each fiber type. Length must match the number of entries infiber_fractionsand value must be non-negative.cell_fractions: Volume fractions (as a tuple of floats) of each cell type to populate in simulated voxel. Must be non-negative and sum to less than 1.cell_radii: Radii of each desired cell type (as a tuple of floats) in units of micrometers. Length must match the number of entries incell_fractionsand be non-negative.water_diffusivity: Diffusivity of free water (in units of square micrometers per millisecond). Must be non-negative.voxel_dims: Side length for the simulated isotropic voxel, in units of micrometers. Must be a positive float.void_dist: Size of edema-like gap to introduce between the fiber bundles.verbose:yesorno. Selectyesto output detailed information to the terminal. Selectnoto suppress this output.Delta: Diffusion time (or simulation length) in units of milliseconds.dt: Size of time step for simulation.
- add_subparser_args() <module 'argparse' from '/home/docs/.asdf/installs/python/3.9.17/lib/python3.9/argparse.py'>[source]
Defines subparsers for each simulation parameter.
- Returns:
argparse object containing subparsers for each simulation parameter
- Return type:
argparse
Testing CLI
- class tests.cli.CLI(subparsers)[source]
Command line interface for running the simDRIFT test suite
- Arguments
None
- add_subparser_args()[source]
Adds subparser for the
run_testscommand.- Returns:
argparse object containing of subparsers for each input parameter
- Return type:
argparse