tardis.energy_input.main_gamma_ray_loop module

tardis.energy_input.main_gamma_ray_loop.get_effective_time_array(time_start, time_end, time_space, time_steps)[source]

Function to get the effective time array for the gamma-ray loop.

Parameters:
time_startfloat

start time in days.

time_endfloat

end time in days.

time_spacestr

linear or log.

time_stepsint

number of time steps.

Returns:
timesnp.ndarray

array of times in secs.

effective_time_arraynp.ndarray

effective time array in secs.

tardis.energy_input.main_gamma_ray_loop.get_packet_properties(number_of_shells, times, time_steps, packets)[source]

Function to get the properties of the packets.

Parameters:
packetslist

List of packets.

Returns:
packets_nu_cmf_arraynp.ndarray

Array of packets in cmf.

packets_nu_rf_arraynp.ndarray

Array of packets in rf.

packets_energy_cmf_arraynp.ndarray

Array of packets energy in cmf.

packets_energy_rf_arraynp.ndarray

Array of packets energy in rf.

packets_positron_energy_arraynp.ndarray

Array of packets positron energy.

tardis.energy_input.main_gamma_ray_loop.run_gamma_ray_loop(model, isotope_decay_df, cumulative_decays_df, num_decays, times, effective_time_array, seed, positronium_fraction, spectrum_bins, grey_opacity, photoabsorption_opacity='tardis', pair_creation_opacity='tardis')[source]

Main loop to determine the gamma-ray propagation through the ejecta.

Parameters:
modeltardis.model.Radial1DModel

Tardis model object.

plasmatardis.plasma.standard_plasmas.BasePlasma

Tardis plasma object.

isotope_decay_dfpd.DataFrame

DataFrame containing the cumulative decay data.

cumulative_decays_dfpd.DataFrame

DataFrame containing the time evolving mass fractions.

num_decaysint

Number of packets to decay.

timesnp.ndarray

Array of times in days.

effective_time_arraynp.ndarray

Effective time array in days.

seedint

Seed for the random number generator.

positronium_fractionfloat

Fraction of positronium.

spectrum_binsint

Number of spectrum bins.

grey_opacityfloat

Grey opacity.

photoabsorption_opacitystr

Photoabsorption opacity.

pair_creation_opacitystr

Pair creation opacity.

Returns:
escape_energypd.DataFrame

DataFrame containing the energy escaping the ejecta.

packets_df_escapedpd.DataFrame

DataFrame containing the packets info that escaped the ejecta.