Developer Guide#

Getting Started#

You will need conda/mamba and CUDA installed, see the Installation instructions. If you are a Linux user, you will also need to complete step 6 of the installation instructions.

Note that the Python commands given below are for Linux only. To run the commands on Windows, replace python3 with python.

First download the Mantid Imaging source code using Git:

git clone https://github.com/mantidproject/mantidimaging.git

If you have a github account you can use ssh access (See Github docs for details):

git clone git@github.com:mantidproject/mantidimaging.git

To set up a developer environment, from with in the cloned directory run:

python3 ./setup.py create_dev_env

This will create a conda environment containing all the packages needed to run and develop Mantid Imaging. The activate command will activate the environment.

Afterwards the environment can be activated by running:

mamba activate mantidimaging-dev

To check that the set up was successful, try running the tests from the source directory:

python3 -m pytest

Mantid Imaging can be run directly from the checked-out git directory:

python3 -m mantidimaging

or to run with additional diagnostics:

python3 -X faulthandler -m mantidimaging --log-level DEBUG

Command Line Arguments#

  • --log-level - Set the log verbosity level. Available options are: TRACE, DEBUG, INFO, WARN, CRITICAL

  • --version - Print the version number and exit.

  • --path - Set the path for the data you wish to load.

  • -lv –live-view - Set the directory to open the live view window on start up. The live view window will automatically update when new images are added to the directory.

The following command line arguments will only work if a valid path containing images has been given:

  • --operation - Opens the operation window on start up with the given operation selected in the combo box. The operation name should the same was what appears in Mantid Imaging but joined with hyphens in place of spaces. Case insensitive.

  • --recon - Shows the recon window on start up.

  • -sv –spectrum_viewer - Opens the spectrum viewer window on start up. A path to a dataset must be provided with the --path argument for the spectrum viewer to open.