tardis.transport.montecarlo.physics module
Explicit host physics selections and the scalar compiled representation.
- class tardis.transport.montecarlo.physics.Kinematics(*values)[source]
Bases:
StrEnumSelect the explicit ejecta velocity law.
- HOMOLOGOUS = 'homologous'
- NONHOMOLOGOUS = 'nonhomologous'
- class tardis.transport.montecarlo.physics.LineInteraction(*values)[source]
Bases:
StrEnumSelect the bound-bound interaction treatment.
- DOWNBRANCH = 'downbranch'
- MACROATOM = 'macroatom'
- NONE = 'none'
- SCATTER = 'scatter'
- class tardis.transport.montecarlo.physics.NumbaTransportPhysics(*args, **kwargs)[source]
Bases:
NumbaTransportPhysicsStore the four scalar selections consumed by compiled transport.
- Parameters:
- relativityRelativityType
Compiled relativity selection.
- line_interactionLineInteractionType
Compiled line-interaction selection.
- electron_scattering_enabledbool
Whether electron scattering contributes opacity and events.
- continuum_processes_enabledbool
Whether continuum processes contribute opacity and events.
Notes
Kinematics is represented by the selected packet propagator, not a scalar. Numba lowers each enum field to an integer scalar while retaining its type.
- class_type = jitclass.NumbaTransportPhysics#790264aa3540<relativity:IntEnum<int64>(RelativityType),line_interaction:IntEnum<int64>(LineInteractionType),electron_scattering_enabled:bool,continuum_processes_enabled:bool>
- class tardis.transport.montecarlo.physics.Relativity(*values)[source]
Bases:
StrEnumSelect the relativistic transport treatment.
- FULL = 'full'
- PARTIAL = 'partial'
- class tardis.transport.montecarlo.physics.ResolvedTransportKernel(driver: CPUDispatcher, packet_propagator: CPUDispatcher, numba_physics: NumbaTransportPhysics)[source]
Bases:
objectBundle selected compiled dispatchers and physics on the host only.
- Parameters:
- drivernumba.core.registry.CPUDispatcher
Compiled real-packet transport driver.
- packet_propagatornumba.core.registry.CPUDispatcher
Compiled propagator selected for the explicit kinematics.
- numba_physicsNumbaTransportPhysics
Four scalar physics fields passed to compiled transport.
- driver: CPUDispatcher
- numba_physics: NumbaTransportPhysics
- packet_propagator: CPUDispatcher
- class tardis.transport.montecarlo.physics.TransportPhysics(kinematics: Kinematics, relativity: Relativity, line_interaction: LineInteraction, electron_scattering: bool, continuum_processes: bool)[source]
Bases:
objectStore all five explicitly required host physics selections.
- Parameters:
- kinematicsKinematics
Ejecta velocity law.
- relativityRelativity
Relativistic transport treatment.
- line_interactionLineInteraction
Bound-bound interaction treatment.
- electron_scatteringbool
Whether electron scattering is enabled.
- continuum_processesbool
Whether continuum processes are enabled.
- kinematics: Kinematics
- line_interaction: LineInteraction
- relativity: Relativity
- tardis.transport.montecarlo.physics.validate_transport_physics(physics: TransportPhysics) None[source]
Check component types and the supported real-transport capabilities.
- Parameters:
- physicsTransportPhysics
Explicit transport selections to validate.
- Raises:
- TypeError
If the object, an enum component, or a boolean component is malformed.
- NotImplementedError
If a well-typed combination is unsupported.