TransportStatus

This class serves as a namespace for return codes from the transport method. All attributes and methods described below are defined at the class level. For instance,

>>> goupil.TransportStatus.EXIT
5

Constructor

class TransportStatus

Note

This class is not meant to be instantiated. Attempting to do so will result in a TypeError.

Attributes

TransportStatus.ABSORBED

Indicates that the photon was absorbed, e.g. in a photo-electric interaction.

TransportStatus.BOUNDARY

Indicates that the photon reached an inner transport boundary.

TransportStatus.ENERGY_CONSTRAINT

Indicates that the photon reached the energy constraint of a potential volume source, during backward transport.

TransportStatus.ENERGY_MAX

Indicates that the photon energy exceeded its maximum allowed value, e.g. according to material tables.

TransportStatus.ENERGY_MIN

Indicates that the photon energy dropped below its minimum allowed value, e.g. according to material tables.

TransportStatus.EXIT

Indicates that the photon exit the simulation geometry.

TransportStatus.LENGTH_MAX

Indicates that the photon path length reached a limit value, as specified by TransportSettings.length_max.

Methods

TransportStatus.str(code: int) str

Returns a string representation of a transport status code. For instance,

>>> goupil.TransportStatus.str(5)
'Exit'