tardis.transport.montecarlo.single_packet_loop module¶
- tardis.transport.montecarlo.single_packet_loop.set_packet_props_full_relativity(r_packet: RPacket, time_explosion: float) None[source]¶
Set packet properties using full relativistic corrections.
This function applies inverse Doppler corrections to the packet frequency, energy, and direction cosine based on full relativistic treatment, including aberration effects on the direction cosine.
- Parameters:
- r_packet
The radiative packet whose properties will be modified.
- time_explosion
Time since explosion in seconds, used to calculate velocity.
- Returns:
- Modifies r_packet.nu, r_packet.energy, and r_packet.mu in-place.
- tardis.transport.montecarlo.single_packet_loop.set_packet_props_partial_relativity(r_packet: RPacket, time_explosion: float) None[source]¶
Set packet properties using partial relativistic corrections.
This function applies inverse Doppler corrections to the packet frequency and energy based on partial relativistic treatment (first-order in v/c).
- Parameters:
- r_packet
The radiative packet whose properties will be modified.
- time_explosion
Time since explosion in seconds, used to calculate velocity.
- Returns:
- Modifies r_packet.nu and r_packet.energy in-place.
- tardis.transport.montecarlo.single_packet_loop.single_packet_loop(r_packet: RPacket, numba_radial_1d_geometry: NumbaRadial1DGeometry, time_explosion: float, opacity_state: OpacityStateNumba, estimators_bulk: EstimatorsBulk, estimators_line: EstimatorsLine, estimators_continuum: EstimatorsContinuum, vpacket_collection: VPacketCollection, rpacket_tracker, montecarlo_configuration: MonteCarloConfiguration) None[source]¶
Execute Monte Carlo transport for a single radiative packet.
This function performs the complete Monte Carlo transport simulation for a single r-packet, handling all interactions including line scattering, electron scattering, and continuum processes. The packet is traced through the ejecta until it escapes or is absorbed.
- Parameters:
- r_packet
The radiative packet to transport through the ejecta.
- numba_radial_1d_geometry
The spherically symmetric geometry of the supernova ejecta.
- time_explosion
Time since explosion in seconds.
- opacity_state
Current opacity state containing line and continuum opacities.
- estimators_bulk
Monte Carlo estimators for cell-level bulk radiation field quantities.
- estimators_line
Monte Carlo estimators for line-level radiation field quantities.
- estimators_continuum
Monte Carlo estimators for continuum interaction quantities.
- vpacket_collection
Collection for storing virtual packets when enabled.
- rpacket_tracker
Tracker for recording packet interactions and trajectories.
- montecarlo_configuration
Configuration parameters for the Monte Carlo simulation.
- Returns:
- This function modifies the r_packet object in-place and updates
- estimators and collections. No return value.