to_txt
to_txt(fname, label=None, T_min=None, T_max=None, nT=64, err_tol=0.01, rate_min=1e-30, rate_max=1e100, fast_log=False, include_all=False, verbose=False)
Tabulates reaction rate coefficients on a temperature grid and writes to a quokka-compatible plain-text file. Parameters are identical to to_hdf5.
The text layout is:
1 # table dimensionality
<nReact> # number of outputs per entry
2 or 3 # axis spacing (2 = log10, 3 = fast_log)
<nTemp> # number of temperature points
<T_min> <T_max>
<coeff row 0>
...
Parameters
- fname : str or Path
- Output file path. The
.txtextension is recommended. - label : str or None, optional
- Dataset label written into the file header. Defaults to
self.label. - T_min : float or None, optional
- Minimum temperature in Kelvin. Inferred from
reaction.tminvalues when not supplied. - T_max : float or None, optional
- Maximum temperature in Kelvin. Inferred from
reaction.tmaxvalues when not supplied. - nT : int, optional
- Initial number of temperature grid points. Adaptive refinement may increase this significantly. Default
64. - err_tol : float or None, optional
- Maximum permitted relative interpolation error.
Noneskips adaptive refinement and returns exactlynTpoints. Default0.01. - rate_min : float, optional
- Small positive floor used in the relative-error denominator to avoid division by zero for near-zero rates. Default
1e-30. - rate_max : float, optional
- Upper clamp applied to each rate before storing; prevents overflow in log-rate arithmetic. Default
1e100. - fast_log : bool, optional
- If
True, temperature grid is uniform infast_log2space (axis spacing code3) rather thanlog10space (code2). DefaultFalse. - include_all : bool, optional
- If
True, include all reactions even if they containNaNvalues or have a constant rate. DefaultFalse. - verbose : bool, optional
- Print tabulation progress. Default
False.