Szanyi et al. (2025) nucleosynthesis models
Model reader for Szanyiet al. (2025) models.
The models are available to download from here: https://zenodo.org/records/14981333 Set 2 contains the latest nuclear reaction rates.
Szanyi25Reader
Reader for Szanyi et al. (2025) nucleosynthesis models.
Load a given mass, metallicity, and rate set model and provide methods to access the data. This routine will load the closest available model. Please see the example on how to check which model was loaded.
Example usage:
from rttools.nucmod.szanyi25 import Szanyi25Reader
model = Szanyi25Reader(mass=3.0, metallicity=0.014, rate_set=2)
# print mass, metallicity and rate set of the loaded model
print(f"Loaded model: mass={model.mass}, z={model.z}, rate_set={model.rate_set}")
Source code in src/rttools/nucmod/szanyi25.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | |
mass
property
Stellar mass in solar masses.
rate_set
property
Nuclear reaction rate set number.
y
property
Helium mass fraction.
z
property
Metallicity.
__init__(mass, metallicity, rate_set=2)
Initialize the reader with the closest model file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mass
|
float
|
Stellar mass in solar masses. |
required |
metallicity
|
float
|
Stellar metallicity. |
required |
rate_set
|
int
|
Model set number (0, 1, or 2), defaults to 2 (if not given or invalid). |
2
|
Source code in src/rttools/nucmod/szanyi25.py
get_co_ratio()
Get the C/O ratio for all thermal pulses (as number ratio).
Source code in src/rttools/nucmod/szanyi25.py
get_delta(nominator, denominator)
Get the delta value for the two isotopes across all thermal pulses.
Source code in src/rttools/nucmod/szanyi25.py
plot_mod(ax, xisos, yisos, marker='o', color='tab:blue', label=None, linestyle='-', **kwargs)
Plot Lugaro Model curve onto a plot.
Note that **kwargs are passed along to both plotting routines. For C/O < 1, the marker is set to 'None'.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ax
|
Axes
|
Matplotlib axis to plot on. |
required |
xisos
|
[str, str]
|
Two-element list of isotopes for x-axis (nominator, denominator). |
required |
yisos
|
[str, str]
|
Two-element list of isotopes for y-axis (nominator, denominator). |
required |
marker
|
str
|
Marker of the plot, defaults to 'o' |
'o'
|
color
|
str
|
Color of the plot, defaults to 'tab:blue' |
'tab:blue'
|
linestyle
|
str
|
Linestyle of the plot, defaults to '-' |
'-'
|
Returns:
| Type | Description |
|---|---|
None
|
Nothing |
Source code in src/rttools/nucmod/szanyi25.py
get_closest_model(mass, metallicity, rate_set=2)
Get the closest model file for a given mass, metallicity, and set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mass
|
float
|
Stellar mass in solar masses. |
required |
metallicity
|
float
|
Stellar metallicity. |
required |
rate_set
|
int
|
Model set number (0, 1, or 2), defaults to 2 (if not given or invalid). |
2
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to the closest model file. |