tardis.energy_input.transport.gamma_ray_interactions module

tardis.energy_input.transport.gamma_ray_interactions.compton_scatter(packet: GXPacket, compton_angle: float) ndarray[tuple[Any, ...], dtype[float64]][source]

Change a packet direction by a Compton-scattering angle.

Parameters:
packetGXPacket

Gamma-ray packet whose direction is being scattered.

compton_anglefloat

Compton-scattering angle in radians.

Returns:
numpy.ndarray

Scattered packet direction as a three-component unit vector.

tardis.energy_input.transport.gamma_ray_interactions.get_compton_angle(energy)[source]

Computes the compton angle from the Klein-Nishina equation. Computes the lost energy due to this angle

Parameters:
energyfloat

Photon energy

Returns:
compton_anglefloat

Compton scattering angle

lost_energyfloat

Energy lost based on angle

new_energyfloat

Photon energy

tardis.energy_input.transport.gamma_ray_interactions.get_compton_fraction(energy)[source]

Computes the compton angle from the Klein-Nishina equation. Determines the probability of absorption from this angle.

Parameters:
energyfloat

Photon energy

Returns:
compton_anglefloat

Compton scattering angle

compton_fractionfloat

Fraction of energy lost

tardis.energy_input.transport.gamma_ray_interactions.get_compton_fraction_artis(energy)[source]

Gets the Compton scattering/absorption fraction and angle following the scheme in ARTIS

Parameters:
energyfloat

Energy of the gamma-ray

Returns:
float

Scattering angle

float

Compton scattering fraction

tardis.energy_input.transport.gamma_ray_interactions.get_compton_fraction_urilight(energy)[source]

Gets the Compton scattering/absorption fraction and angle following the scheme in Urilight

Parameters:
energyfloat

Energy of the gamma-ray

Returns:
float

Scattering angle

float

Compton scattering fraction

tardis.energy_input.transport.gamma_ray_interactions.pair_creation_packet(packet)[source]

Pair creation randomly scatters the packet or destroys it, based on the frequency

Parameters:
packetGXPacket

incoming packet

Returns:
GXPacket

outgoing packet

tardis.energy_input.transport.gamma_ray_interactions.scatter_type(compton_opacity, photoabsorption_opacity, total_opacity)[source]

Determines the scattering type based on process opacities

Parameters:
compton_opacityfloat
photoabsorption_opacityfloat
total_opacityfloat
Returns:
statusGXPacketStatus

Scattering process the photon encounters