MCCL Getting Started

Lisa Malenfant edited this page Apr 26, 2017 · 6 revisions

Getting Started with the Monte Carlo Command Line (MCCL) application

Getting the MCCL application

Download the application from GitHub:

  • Download latest version from Releases
  • Once the zip file has been downloaded, extract or unzip contents
  • The downloaded files include:
    • mc.exe - the MCCL executable
    • infile_* - several sample input files
    • MATLAB scripts to enable viewing the results using MATLAB

Running a sample input file

The sample input files are named infile_*, where * indicates the source, tissue and detector definitions designated within the file. Note that the default source definition is a point source perpendicular to the tissue surface and when the infile has this source definition, it is not part of the name. For example, the infile "infile_one_layer_all_detectors.txt" designates a point source, one layer tissue and all detectors currently available.

To run on windows:

  • Requirements: .NET Framework 4.0 - download here
  • Open a command window and set the current directory to the folder of the unzipped files
  • Type: "mc.exe infile=infile_one_layer_all_detectors.txt"
  • This sample infile only specifies 100 photons to be launched so should execute quickly
  • Progress of the simulation should be seen on the screen (percentage complete)

MCCL Execution

To run on linux:

  • Requirements: Mono - instructions here
  • Open a command window and set the current directory to the folder of the unzipped files
  • Type: "mono mc.exe infile=infile_one_layer_all_detectors.txt"
  • Output to the screen will be similar to that shown in figure above will be displayed

Viewing the results using MATLAB

For both windows and linux:

  • Requirements: MATLAB R2011b and higher
  • After running a sample infile, a folder will be created in the current directory. For the infile described above, "infile_one_layer_all_detectors.txt", the folder will be named "one_layer_all_detectors"
  • Bring up MATLAB and edit the script file load_results_script.m. Set "datanames = { ' one_layer_all_detectors' };" (see figure below) and save changes
  • Execute this script by typing "load_results_script" at the MATLAB prompt
  • Plots of the all detector results specified in the infile will come to the screen

Load Results Script

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.