tardis.energy_input.gamma_ray_interactions module

tardis.energy_input.gamma_ray_interactions.compton_scatter(photon, compton_angle)[source]

Changes the direction of the gamma-ray by the Compton scattering angle

Parameters:
photonGXPhoton object
compton_anglefloat
Returns:
float64

Photon theta direction

float64

Photon phi direction

tardis.energy_input.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.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.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.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.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.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