write_table
write_table(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, format="auto", include_all=False, verbose=False)
General-purpose version of to_hdf5 / to_txt. Tabulates reaction rate coefficients on a temperature grid and writes to a text or HDF5 file. Format is inferred from the file extension when format="auto".
Parameters
- fname : str or Path
- Output file path. When
format="auto",.txt→ text,.hdf/.hdf5→ HDF5. - 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 rather thanlog10space. DefaultFalse. - format : str, optional
"hdf5","txt", or"auto"(inferred from extension). Default"auto".- 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.
Raises
- ValueError
- If format is not one of the supported strings, or if
format="auto"and the file extension is not recognised.