pynucastro.nucdata.partition_function module#
Classes and methods for dealing with nuclear partition functions.
- class pynucastro.nucdata.partition_function.PartitionFunction(nucleus, name, T9_points, log_pf_data, interpolant_order=3)[source]#
Bases:
objectStore the tabulated data for the partition function for a specific nucleus, which can be combined with other (non-overlapping) partition functions by addition and evaluated for different temperature values.
Adding two PartitionFunction objects is implemented by simply appending the temperature and partition function arrays of the higher-temperature partition function to those of the lower-temperature partition function. If the temperature ranges overlap, however, an exception is generated.
If either of the PartitionFunction objects added have already had a spline interpolant constructed, then construct a new spline interpolant for the returned PartitionFunction of order equal to the maximum order of the added PartitionFunction objects.
- Parameters:
nucleus (str) – The nucleus (e.g.
"ni56")name (str) – The name of the table on which the nucleus is read
T9_points (numpy.ndarray) – A sorted array of all the temperatures involved. This is in GK.
log_pf_data (numpy.ndarray) – An array with all the partition function values given in the same order as
temperature. This is log(pf)interpolant_order (int) – The interpolation spline order, must be between 1 and 5, inclusive
- eval(T)[source]#
Compute the interpolated partition function value for the temperature T. Note this returns log(pf)
- class pynucastro.nucdata.partition_function.PartitionFunctionCollection(use_high_temperatures=True, use_set='frdm')[source]#
Bases:
objectA collection of
PartitionFunctionTableobjects in a dictionary keyed by the name of the tables.In our discussion we have two different sets of tables: FRDM and ETFSI-Q.
- Variables:
use_high_temperatures – whether to incorporate the high-temperature data tables
use_set – selects between the FRDM (
'frdm') and ETFSI-Q ('etfsiq') data sets.
- get_partition_function(nuc)[source]#
Return the
PartitionFunctionobject for a specific nucleus.
- class pynucastro.nucdata.partition_function.PartitionFunctionTable(file_name)[source]#
Bases:
objectManage a partition function table file. A
PartitionFunctionobject is constructed for each nucleus and stored in a dictionary keyed by the lowercase nucleus name in the form e.g. “ni56”. The table files are stored in thePartitionFunctionsubdirectory.- Variables:
name – the name of the table (as defined in the data file)
T9_points – an array of temperature values in [GK]
- get_partition_function(nuc)[source]#
Return the
PartitionFunctionobject for a specific nucleus.