Division of Nuclear Medicine

SimSETAppendix VI:
Parameter File Specification

 [News] [Installation guide] [User guide] [Programmers' info] [Resources] [Contacts]

Contents

  1. Introduction
  2. Description

 

Introduction

The parameter file format is a general purpose format created to facilitate the use of simple text files for specifying large numbers of parameters to a variety of different programs. This document will describe the format along with the data types that it supports and the syntax that it requires.

[top of page]

 

Description

Parameter files may be used by anyone who writing a program that requires user-specified values that may change each time the program is run. The format supports the specification of integer, floating-point, character, enum, and list parameters. Enum parameters allow you to use SimSET text labels for enumerated lists, for example "simple_spect, simple_pet, planar, dual_headed, cylindrical" for detector type. List parameters are used for grouping together an arbitrary number of parameters under a common label. Figure 6.1 illustrates a portion of a PHG run-time parameter file.

  • REAL photon_energy = 511.0

    LONGLONG num_to_simulate = 15000000

    REAL weight_window_ratio = 3.0

    BOOL point_source_voxels = false

    INT random_seed = 442598

     

    # OBJECT GEOMETRY VALUES

    NUM_ELEMS_IN_LIST object = 2

    INT num_slices = 1

    NUM_ELEMS_IN_LIST slice = 9

    INT slice_number = 0

    REAL zMin = -50.00

     

    REAL zMax = 0.00

    REAL xMin = -5.00

    REAL xMax = 5.00

    REAL yMin = -5.00

    REAL yMax = 5.00

    INT num_x_bins = 1

    INT num_y_bins = 1

    # PHOTON HISTORY FILE

    STRING "history.file"

  •  

    Figure A6.1

     

    Parameter specifications consist of a type, label, and value. In the first line of figure 6.1 the parameter type is REAL (corresponding to floating point), the label is photon_energy, and the value is 511.0.

    White space is ignored. Everything following the last non white-space character of the value is ignored as well (so you can put comments at the end of a parameter line). For STRING parameters the value is delimited with double quotation marks.

    Lines that begin with the '#' character are considered comments and are ignored. Blank lines are also ignored. Any line that does not have a '#' character as the first non white-space character must begin with one of the following:

    • BOOL: Indicates boolean parameter, value must be 'TRUE' or 'FALSE'. Note that values are case insensitive.
    • INT: Indicates integer parameter, value must be 32 bit integer value.
    • LONGLONG: Indicates integer parameter, value must be 64 bit integer value.
    • REAL: Indicates 64 bit floating point value.
    • STRING: Indicates character string parameter, value must fit on a single line and be delimeted with double quote marks. There is no support for embeding double quotes within the string.
    • ENUM: Indicates a text label that corresponds to an enumerated list of options.
    • NUM_ELEMENTS_IN_LIST: Indicates a list parameter, the value specifies the number of elements in the list. Lists may be embedded within lists, in which case they represent a single element. Figure A6.1 illustrates this use: the first list (label is "object") contains two elements, the first is "num_slices" and the second is a list representing a slice.

     

    For further information on parameter files, including information on how to create your own, refer to the User Guide.

    [top of page]

    Last revised by: Robert Harrison
    Revision date: 15 June 2010