tardis.energy_input.transport.gamma_ray_grid module
- tardis.energy_input.transport.gamma_ray_grid.calculate_distance_radial(photon: GXPacket, r_inner: float, r_outer: float) tuple[float, int][source]
Calculate the 3D distance to a gamma-ray shell boundary.
- Parameters:
- photonGXPhoton object
- r_innerfloat
- r_outerfloat
- Returns:
- distancefloat
Distance to the selected shell boundary in centimeters.
- shell_changeint
Change in radial-shell index at the selected boundary.
Notes
A zero inner radius does not define a boundary. Packets in that central shell continue through the origin to the far-side outer boundary.
- tardis.energy_input.transport.gamma_ray_grid.distance_trace(photon: GXPacket, inner_velocity: ndarray[tuple[Any, ...], dtype[float64]], outer_velocity: ndarray[tuple[Any, ...], dtype[float64]], total_opacity: float, current_time: float, next_time: float) tuple[float, float, float, int][source]
Trace distances to the next gamma-ray event.
Calculate the distances to an interaction, shell boundary, and time-bin boundary.
- Parameters:
- photonGXPhoton object
- inner_velocityOne dimensional Numpy array, dtype float
- outer_velocityOne dimensional Numpy array, dtype float
- total_opacityfloat
- current_timefloat
- next_timefloat
- Returns:
- distance_interactionfloat
- distance_boundaryfloat
- distance_timefloat
- shell_changeint
Notes
The first high-energy transport shell extends to the origin. Its geometric inner boundary is ignored so that inward packets cross the center without leaving the radial grid.