pyPENELOPE

source – Options for the incident particle source

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

class penelopetools.api.input.penelope.source.Position(x=0.0, y=0.0, z=0.0)

Bases: object

Store the coordinate (x, y, z) of a point in space.

Parameters:
  • x (float) – x coordinate (cm)
  • y (float) – y coordinate (cm)
  • z (float) – z coordinate (cm)
ATTR_X = 'x_cm'
ATTR_Y = 'y_cm'
ATTR_Z = 'z_cm'
KEYWORD = <penelopetools.api.input.penelope.util.Keyword object at 0x51b1c50>
TAG_NAME = 'position'
classmethod from_inputfile(lines)

Creates a Position from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(element)

Creates a Position from a XML element.

Parameters:element – XML element
get_parameters(prefix)
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.

x

x coordinate of the position (cm). The value is stored in a magnitude.Magnitude.

y

z coordinate of the position (cm). The value is stored in a magnitude.Magnitude.

z

z coordinate of the position (cm). The value is stored in a magnitude.Magnitude.

class penelopetools.api.input.penelope.source.Source(beam_energy=20000.0, position=None, polar_angle=0.0, azimuthal_angle=0.0, aperture=0.0)

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

Option to specify the parameters of the source beam.

Parameters:
  • beam_energy – energy of the source beam (eV)
  • position (Position) – location of the source beam in space
  • polar_angle – polar angle of the source beam axis direction (deg)
  • azimuthal_angle – azimuthal angle of the source beam axis direction (deg)
  • aperture – angular aperture of the source beam (deg)
ATTR_APERTURE = 'aperture_deg'
ATTR_AZIMUTHAL_ANGLE = 'azimuthalAngle_deg'
ATTR_BEAM_ENERGY = 'beamEnergy_eV'
ATTR_POLAR_ANGLE = 'polarAngle_deg'
KEYWORD_SAPERT = <penelopetools.api.input.penelope.util.Keyword object at 0x51b1d10>
KEYWORD_SDIREC = <penelopetools.api.input.penelope.util.Keyword object at 0x51b1dd0>
KEYWORD_SENERG = <penelopetools.api.input.penelope.util.Keyword object at 0x51b1cd0>
TAG_NAME = 'source'
aperture

Angular aperture of the primary particle beam in degrees (SAPERT). The angle must be between 0 and 180 degrees.

The value is stored in a magnitude.Magnitude.

azimuthal_angle

Azimuthal angle \phi_0 of the primary particle The angle must be between 0 and 360 degrees.

The value is stored in a magnitude.Magnitude.

beam_energy

Initial energy of the primary particle in eV (SENERG). The energy must be between 100 and 1e6 eV.

The value is stored in a magnitude.Magnitude.

classmethod from_inputfile(lines)

Creates a Source from lines of a IN file.

Parameters:lines – lines
classmethod from_xml(root)

Creates a Source from a XML element.

Parameters:element – XML element
get_parameters(prefix)
polar_angle

Polar angle \theta_0 of the primary particle beam in degrees (STHETA of SDIREC). The angle must be between 0 and 180 degrees.

The value is stored in a magnitude.Magnitude.

position

Coordinates of the source centre in cm (SPOSIT). The position is a Position.

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.