pyPENELOPE

inclusion – Spherical inclusion geometry

Inheritance diagram of penelopetools.api.input.pengeom.usergeometry.inclusion

class penelopetools.api.input.pengeom.usergeometry.inclusion.Inclusion(substrate_material_id=0, inclusion_material_id=0, inclusion_diameter=0.0001, title='Inclusion', filename='inclusion.geo', surfaces=None, modules=None)

Bases: penelopetools.api.input.pengeom.usergeometry._UserGeometry

Creates a new Inclusion geometry. A Inclusion is defined by a half-sphere in the middle of a substrate. The surfaces and modules of the geometry are automatically generated when the build is called. The surfaces and modules arguments are therefore optional.

The default value for the depth is 3.0 cm. By default, no rotation and no shift is imposed on the geometry. By default, the diameter is automatically generated from the inclusion diameter.

Parameters:
  • substrate_material_id – id of the material for the substrate
  • inclusion_material_id – id of the material for the inclusion
  • inclusion_diameter – diameter of the inclusion
  • title – title of the geometry
  • filename – filename of the GEO file
ATTR_INCLUSION_DIAMETER = 'inclusionDiameter_cm'
ATTR_INCLUSION_MATERIAL_ID = 'inclusionMaterialId'
ATTR_SUBSTRATE_MATERIAL_ID = 'substrateMaterialId'
build(options)

Build the surfaces and modules of the geometry according to the information stored.

classmethod from_xml(element)

Creates a Inclusion from a XML element.

Parameters:element – XML element
get_parameters(prefix)
inclusion_diameter

Diameter of the inclusion (cm). The diameter must be greater than zero. The value is stored in a magnitude.Magnitude.

inclusion_material_id

Id of the material for the inclusion. The id shall correspond to the id of the material in Materials. The id must be positive.

Note

The inclusion material cannot be Vacuum

substrate_material_id

Id of the material for the substrate. The id shall correspond to the id of the material in Materials. The id must be positive.

Note

The substrate material cannot be Vacuum

to_html(header_level=1)

Returns a HTML representation of this option.

to_xml()

Returns a XML representation of this geometry.

validate()
class penelopetools.api.input.pengeom.usergeometry.inclusion.MaximumStepLengthsHook

Bases: penelopetools.api.input.penelope.hook.Hook

post_build(options)
class penelopetools.api.input.pengeom.usergeometry.inclusion.PhotonDetectorsHook(takeoffangle, energy_low=0.0, energy_high=1000000.0)

Bases: penelopetools.api.input.pengeom.usergeometry.substrate.PhotonDetectorsHook

Creates default photon detectors for a Inclusion geometry. Hemispherical detectors with an opening of 2 to 20 degrees are created from a specified take-off angle.

Parameters:
  • takeoffangle – take off angle (deg)
  • energy_low – lower limit of the energy window (eV)
  • energy_high – upper limit of the energy window (eV)