pynucastro.rates.temperature_tabular_rate module#

Classes and methods for describing a reaction rate that is tabulated in terms of electron density and temperature.

class pynucastro.rates.temperature_tabular_rate.TempTableInterpolator(*args, **kwargs)[source]#

Bases: TempTableInterpolator

A class that holds a pointer to the rate data and methods that allow us to interpolate the rate

Parameters:
  • log_temp_points (numpy.ndarray) – an array giving the temperature at the points where we tabulate the rate — this is log10(T9)

  • log_rate_data (numpy.ndarray) – an array giving the tabulated log10(rate) data

class_type = jitclass.TempTableInterpolator#7f1916fd1370<log_temp_points:array(float64, 1d, A),log_rate_data:array(float64, 1d, A)>#
class pynucastro.rates.temperature_tabular_rate.TemperatureTabularRate(log_t9_data, log_rate_data, rate_source=None, label='temptab', **kwargs)[source]#

Bases: Rate

A rate whose temperature dependence is tabulated.

Note: presently this only supports strong-mediated rates.

Parameters:
  • log_t9_data (numpy.ndarray) – The temperature (in log10(T / 1.e9 K)) where we tabulate the rate

  • log_rate_data (numpy.ndarray) – The tabulated log10(rate) data, N_A <σv>

eval(T, *, rho=None, comp=None, screen_func=None)[source]#

Evaluate the reaction rate.

Parameters:
  • T (float) – the temperature to evaluate the rate at

  • rho (float) – the density to evaluate the rate at.

  • comp (float) – the composition (of type Composition) to evaluate the rate with.

  • screen_func (Callable) – one of the screening functions from pynucastro.screening – if provided, then the rate will include screening correction.

Return type:

float

function_string_py()[source]#

Construct the python function that computes the rate.

Return type:

str

plot(*, Tmin=None, Tmax=None, figsize=(6, 6), rho=None, comp=None, screen_func=None)[source]#

Plot the rate as a function of temperature.

Parameters:
  • Tmin (float) – minimum temperature for the plot

  • Tmax (float) – maximum temperature for the plot

  • figsize (tuple) – the horizontal, vertical size (in inches) for the plot

  • rho (float) – the density to evaluate the screening effect.

  • comp (float) – the composition (of type Composition) to evaluate the screening effect.

  • screen_func (Callable) – one of the screening functions from pynucastro.screening – if provided, then the rate will include the screening correction.

Return type:

matplotlib.figure.Figure