Definition of the psyTackInterp class.
- class posydon.interpolation.interpolation.GRIDInterpolator(path, verbose=False)[source]
Bases:
object
Class to interpolate between single star MESA tracks.
- keys
Contains valid keys for accessing the data.
- Type
tuple of str
Initialize the GRIDInterpolator.
- get(key, M_new)[source]
Perform linear interpolation between specific time-series.
- Parameters
- Returns
The interpolated ZAMS time-series specified by key associated with the initial mass M_new.
- Return type
ndarray
- posydon.interpolation.interpolation.fscale(u, lim=None, inv=False)[source]
Successively perform min-max rescaling on the last dimension of u.
- Parameters
u (array_like) – The array which last dimension requires min-max rescaling.
lim (sequence of tuple) – The tuples have length 2 and contains the limits on the min-max rescaling. There should be one tuple for each array in the last dimension.
inv (bool) – If False then the standard min-max rescaling will be performed. If True then the inverse min-max rescaling to restore and array will be performed.
- Returns
The rescaled/original array with the same shape as u.
- Return type
ndarray
- posydon.interpolation.interpolation.inv_scaler(x, xmin, xmax)[source]
Restore the original array of min-max rescaled array.
- class posydon.interpolation.interpolation.psyTrackInterp(path, in_keys=None, interp_in_q=False, verbose=False)[source]
Bases:
object
Perform track interpolation for POSYDON.
Initialize the psyTrackInterp class.
- Parameters
path (string) – The path to the training grid for the interpolator
in_keys (List of strings) – A list indicating the variables used for defining the input space, default is None
interp_in_q (boolean) – Indicates whether or not mass ratio is to be used, default is false
verbose (boolean) – Indicates whether functionality should be run in verbose mode, default is false
- load(filename)[source]
Load interpolation model to be used for predictions.
- filenamestr
path/name of pickle file to be loaded.