tardis.transport.montecarlo.packets.radiative_packet module

class tardis.transport.montecarlo.packets.radiative_packet.InteractionType(*values)[source]

Bases: IntEnum

Enumeration for different types of packet interactions.

The values are chosen to enable binary masking operations, allowing multiple interaction types to be combined using bitwise operations. For example, a packet that experienced both line interaction and electron scattering could be represented as LINE | ESCATTERING = 6.

NO_INTERACTIONint

Initial state, packet has not yet interacted (value = -1)

BOUNDARYint

Packet crossed a shell boundary (value = 1)

LINEint

Packet underwent line interaction/absorption (value = 2)

ESCATTERINGint

Packet underwent electron scattering (value = 4)

CONTINUUM_PROCESSint

Packet underwent continuum process interaction (value = 8)

BOUNDARY = 1
CONTINUUM_PROCESS = 8
ESCATTERING = 4
LINE = 2
NO_INTERACTION = -1
class tardis.transport.montecarlo.packets.radiative_packet.PacketStatus(*values)[source]

Bases: IntEnum

ADIABATIC_COOLING = 4
EMITTED = 1
IN_PROCESS = 0
REABSORBED = 2
class tardis.transport.montecarlo.packets.radiative_packet.RPacket(*args, **kwargs)[source]

Bases: RPacket

Initialize radiative packet for Monte Carlo transport.

Parameters:
rfloat

Initial radius [cm].

mufloat

Initial directional cosine.

nufloat

Initial frequency [Hz].

energyfloat

Initial energy. Energy units are scaled with time_simulation. Adds all up to 1 in a single run.

seedint

Random number seed.

indexint, optional

Packet index, by default 0.

class_type = jitclass.RPacket#7f362eb28830<r:float64,mu:float64,nu:float64,energy:float64,next_line_id:int64,current_shell_id:int64,status:int64,seed:int64,index:int64,last_interaction_type:int64,last_interaction_in_nu:float64,last_interaction_in_r:float64,last_line_interaction_in_id:int64,last_line_interaction_out_id:int64,last_line_interaction_shell_id:int64>
tardis.transport.montecarlo.packets.radiative_packet.print_r_packet_properties(r_packet)[source]

Print all packet information.

Parameters:
r_packetRPacket

RPacket object.