pynucastro.nucdata.nucleus module
Classes and methods to interface with files storing rate data.
-
class pynucastro.nucdata.nucleus.Nucleus(name, dummy=False)[source]
Bases: object
A nucleus that participates in a reaction.
- Parameters:
name (str) – name of the nucleus (e.g. “c12”)
dummy (bool) – a dummy nucleus is one that we can use where
a nucleus is needed, but it is not considered
to be part of the network
-
Z
atomic number
- Type:
float
-
N
neutron number
- Type:
float
-
A
atomic mass
- Type:
float
-
short_spec_name
nucleus abbreviation (e.g. “he4”)
- Type:
str
-
caps_name
capitalized short species name (e.g. “He4”)
- Type:
str
-
el
element name (e.g. “he”)
- Type:
str
-
pretty
LaTeX formatted version of the nucleus name
- Type:
str
-
dm
mass excess (MeV)
- Type:
float
-
nucbind
nuclear binding energy (MeV / nucleon)
- Type:
float
-
A_nuc
nuclear mass (amu)
- Type:
float
-
mass
nuclear mass (MeV)
- Type:
float
-
tau
half life (s)
- Type:
float
-
spin_states
the ground state spin
- Type:
int
-
partition_function
the PartitionFunction object for this nucleus, which
allows for the evaluation of the temperature-dependent
partition function.
- Type:
PartitionFunction
-
dummy
is this a dummy nucleus
- Type:
bool
-
nse
an NSE proton has the same properties
as a proton but compares as being distinct
- Type:
bool
-
c()[source]
Return the capitalized-style name
-
classmethod cast(obj)[source]
Create a Nucleus from a string
- Parameters:
obj (str or Nucleus) – the object to cast. If it is a Nucleus, then we simply return
it.
- Return type:
Nucleus
-
classmethod cast_list(lst, *, allow_None=False, allow_single=False)[source]
Convert a list of objects into a list of Nucleus objects
- Parameters:
lst (list) – a list of str or Nucleus
allow_None (bool) – allow lst = None and simply return None
allow_single (bool) – allow lst to be a single str or Nucleus instead
of a list
- Return type:
list
-
cindex()[source]
Return the name for C++ indexing
-
classmethod from_Z_A(Z, A, dummy=False)[source]
Create a nucleus given Z and A
- Parameters:
-
- Return type:
Nucleus
-
classmethod from_cache(name, dummy=False)[source]
Check if we’ve already created this nucleus, and if so,
return a reference to it from the cache.
- Parameters:
name (str) – name of the nucleus (e.g. “c12”)
dummy (bool) – a dummy nucleus is one that we can use where
a nucleus is needed, but it is not considered
to be part of the network
- Return type:
Nucleus
-
summary()[source]
print a summary of the nuclear properties
-
exception pynucastro.nucdata.nucleus.UnsupportedNucleus[source]
Bases: Exception
-
pynucastro.nucdata.nucleus.get_all_nuclei()[source]
Return a list with every Nucleus that has a known mass
- Return type:
list
-
pynucastro.nucdata.nucleus.get_nuclei_in_range(zmin, zmax, amin, amax)[source]
Given a range of Z = [zmin, zmax], and A = [amin, amax],
return a list of Nucleus objects for all nuclei in this range
- Parameters:
zmin (int) – minimum atomic number
zmax (int) – maximum atomic number
amin (int) – minimum atomic weight
amax (int) – maximum atomic weight
- Return type:
list