tardis.energy_input.samplers module¶
- tardis.energy_input.samplers.create_energy_cdf(energy, intensity)[source]¶
Creates a CDF of given intensities
- Parameters:
- energyOne-dimensional Numpy Array, dtype float
Array of energies
- intensityOne-dimensional Numpy Array, dtype float
Array of intensities
- Returns:
- One-dimensional Numpy Array, dtype float
Sorted energy array
- One-dimensional Numpy Array, dtype float
CDF where each index corresponds to the energy in the sorted array
- tardis.energy_input.samplers.sample_decay_time(start_tau, end_tau=0.0, decay_time_min=0.0, decay_time_max=0.0)[source]¶
Samples the decay time from the mean lifetime of the isotopes (needs restructuring for more isotopes)
- Parameters:
- start_taufloat64
Initial isotope mean lifetime
- end_taufloat64, optional
Ending mean lifetime, by default 0 for single decays
- Returns:
- float64
Sampled decay time
- tardis.energy_input.samplers.sample_energy(energy, intensity)[source]¶
Samples energy from energy and intensity
- Parameters:
- energyOne-dimensional Numpy Array, dtype float
Array of energies
- intensityOne-dimensional Numpy Array, dtype float
Array of intensities
- Returns:
- float
Energy