pynucastro.rates.starlib_rate module#
Classes and methods for describing a reaction rate that is tabulated in terms of and temperature.along with corresponding uncertainties as per the StarLib Library
- class pynucastro.rates.starlib_rate.StarLibRate(log_t9_data, log_rate_data, sigma_data, labelprops, rng=None, label='starlib', **kwargs)[source]#
Bases:
TemperatureTabularRateA rate whose temperature dependence and factor uncertainty are tabulated. Upon creation of an instance, rates at all tabulated log(T9) values are sampled.
- Parameters:
log_t9_data (numpy.ndarray) – The temperature (in log(T / 1.e9 K)) where we tabulate the rate
log_rate_data (numpy.ndarray) – The tabulated log(rate) data, N_A <σv>
sigma_data (numpy.ndarray) – The tabulated log(uncertainty) data
rng (numpy.random.Generator) – An rng for rate sampling
- sample_rates(rng=None)[source]#
Sample rate values as median_rate + N(0,1)*sigma for each of the 60 entries in the data for a Starlib rate, given a non-empty seed. Use sampled rates to overwrite interpolator
- Parameters:
rng (numpy.random.Generator) – An rng that draws the gaussian deviate required for rate sampling