pyPENELOPE

jobproperties – Properties of the simulation job

Inheritance diagram of penelopetools.api.input.penelope.jobproperties

class penelopetools.api.input.penelope.jobproperties.Dump(resume_filename='dump.dat', dump_filename='dump.dat', dump_interval=60)

Bases: penelopetools.api.input.penelope.option.Option

Store the properties for the dump and resume of a simulation. A simulation will be resumed if the resume filename exists in the simulation folder. The internal counters of the simulation will be dump into a file at the specified interval if a dump filename is specified.

Parameters:
  • resume_filename – filename of the resume file
  • dump_filename – filename of the dump file
  • dump_interval – interval between dumps (s)
ATTR_DUMP_FILENAME = 'dumpFilename'
ATTR_DUMP_INTERVAL = 'dumpInterval_s'
ATTR_RESUME_FILENAME = 'resumeFilename'
KEYWORD_DUMPP = <penelopetools.api.input.penelope.util.Keyword object at 0x5929050>
KEYWORD_DUMPTO = <penelopetools.api.input.penelope.util.Keyword object at 0x5929550>
KEYWORD_RESUME = <penelopetools.api.input.penelope.util.Keyword object at 0x5929c50>
TAG_NAME = 'dump'
dump_filename

Filename of the dump file where the simulation data are saved in case the simulation run is interrupted (DUMPTO). If the attribute is deleted, no dump is performed.

dump_interval

Interval (in seconds) where the simulation results are saved in the dump file (DUMPP). A dump filename must be specified for the dump to occur.

The value is stored in a magnitude.Magnitude.

classmethod from_inputfile(lines)

Creates a Dump from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(root)

Creates a Dump from a XML element.

Parameters:element – XML element
resume_filename

Filename of the dump file to resume the simulation from the point where it was left (RESUME). If the attribute is deleted, the resume from dump function is disabled.

to_html(header_level=1)

Returns a HTML representation of this option.

to_inputfile()

Returns the lines of this option to create a IN file.

to_xml()

Returns a XML representation of this option.

class penelopetools.api.input.penelope.jobproperties.RandomNumberSeeds(seed1=12345, seed2=54321)

Bases: penelopetools.api.input.penelope.option.Option

Store the seeds of the random-number generator (RSEED).

Parameters:
  • seed1 (float) – first seed
  • seed2 (float) – second seed
ATTR_SEED1 = 'seed1'
ATTR_SEED2 = 'seed2'
KEYWORD = <penelopetools.api.input.penelope.util.Keyword object at 0x5929110>
TAG_NAME = 'randomNumberSeeds'
classmethod from_inputfile(lines)

Creates a RandomNumberSeeds from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(root)

Creates a RandomNumberSeeds from a XML element.

Parameters:element – XML element
seed1

First seed of the random number generator. If the seed is deleted, the seed is determined at the execution of the simulation (real random). The value is stored in a magnitude.Magnitude.

seed2

First seed of the random number generator. If the seed is deleted, the seed is determined at the execution of the simulation (real random). The value is stored in a magnitude.Magnitude.

to_html(header_level=1)

Returns a HTML representation of this option.

to_inputfile()

Returns the lines of this option to create a IN file.

to_xml()

Returns a XML representation of this option.

class penelopetools.api.input.penelope.jobproperties.Simulation(showers=2000000000.0, seeds=None, time=100)

Bases: penelopetools.api.input.penelope.option.Option

Parameters of the simulation job.

Parameters:
  • showers – number of showers to simulate
  • randomnumberseeds (RandomNumberSeeds) – seeds for the random number generator
  • time – time of the simulation (s)
ATTR_SHOWERS = 'showers'
ATTR_TIME = 'time_s'
KEYWORD_NSIMSH = <penelopetools.api.input.penelope.util.Keyword object at 0x5929590>
KEYWORD_TIME = <penelopetools.api.input.penelope.util.Keyword object at 0x5929a50>
TAG_NAME = 'simulation'
build(options)
classmethod from_inputfile(lines)

Creates a Simulation from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(root)

Creates a Simulation from a XML element.

Parameters:element – XML element
get_parameters(prefix)
randomnumberseeds

Seeds for the random number generator. The random number seeds is a RandomNumberSeeds.

showers

Desired number of simulated showers (NSIMSH). The number of simulated showers can not be less than 1. If the attribute is deleted, the number of showers is set to 1e38 (i.e. infinity).

The value is stored in a magnitude.Magnitude.

time

Allotted simulation time in seconds (TIME). The time can not be less than 1 second. If the attribute is deleted, the time is set to 1e38 (i.e. infinity).

The value is stored in a magnitude.Magnitude.

to_html(header_level=1)

Returns a HTML representation of this option.

to_inputfile()

Returns the lines of this option to create a IN file.

to_xml()

Returns a XML representation of this option.