pyPENELOPE

maximumsteplengths – Maximum step length parameters

Inheritance diagram of penelopetools.api.input.penepma.maximumsteplengths

Maximum step length DSMAX of electrons and positrons in each body. This parameter is important only for thin bodies; it should be given a value of the order of one tenth of the body thickness or less.

class penelopetools.api.input.penepma.maximumsteplengths.MaximumStepLength(module_id=1, length=1e+20)

Bases: object

Creates a new MaximumStepLength. One instantiated the module id cannot be changed.

Parameters:
  • module_id – id of the module/body. First module as an id of 1.
  • length – maximum step length (in cm)
ATTR_LENGTH = 'length_cm'
ATTR_MODULE_ID = 'moduleId'
KEYWORD = <penelopetools.api.input.penelope.util.Keyword object at 0x70bf7d0>
TAG_NAME = 'maximumStepLength'
classmethod from_inputfile(lines)

Creates a MaximumStepLength from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(element)

Creates a MaximumStepLength from a XML element.

Parameters:element – XML element
length

Maximum step length in cm. The length must be between 0 and 1e20 cm.

The value is stored in a magnitude.Magnitude.

module_id

Id of the module.

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.penepma.maximumsteplengths.MaximumStepLengths(data=[])

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

Store the maximum step lengths of each body.

The object MaximumStepLengths is a dictionary where the keys are the body ids and the values, the MaximumStepLength.

TAG_NAME = 'maximumStepLengths'
append(value)

Appends an MaximumStepLength to the list of maximum step lengths.

clear()

Removes all the maximum step lengths from the list.

extend(values)

Extends the list of maximum step lengths by another list of maximum step lengths.

classmethod from_inputfile(lines)

Creates a MaximumStepLengths from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(root)

Creates a MaximumStepLengths from a XML element.

Parameters:element – XML element
insert(index, value)

Inserts a maximum step length at index.

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.

penelopetools.api.input.penepma.maximumsteplengths.apply_on_all_modules(geometry, dsmax)

Apply a maximum step length to all modules in the geometry.

Parameters:
  • geometry – options of the geometry
  • dsmax – maximum step length for all modules
Return type:

MaximumStepLengths