pystellibs.interpolator package#
Submodules#
pystellibs.interpolator.interpolator module#
Base interpolator: a dummy class is derived by the different interpolator schemes
pystellibs.interpolator.lejeune module#
Lejeune interpolator is basically a linear interpolator for a Lejeune grid based spectral library.
This is the simplest interpolator but most commonly used.
It takes care of boundary conditions by imposing limits to extrapolation on a given grid.
- class LejeuneInterpolator[source]#
Bases:
BaseInterpolatorInterpolation for grid based on the Lejeune library definition
The interpolation is N-D linear in log-temperature, log-gravity, and linear in metallicity Z. Preference is always given to the temperature over the gravity when needed.
This version is translated from Pegase
- dT_max#
If, T2 (resp. T1) is too far from T compared to T1 (resp. T2), i2 (resp. i1) is not used. (see below for namings)
- Type:
float, optional
- eps#
temperature sensitivity under which points are considered to have the same temperature
- Type:
float
- interp(aps, weights=None, **kwargs)[source]#
Interpolate spectra
- Parameters:
aps (ndarray) – (logT, logg, logZ) sequence. Or appropriately defined similarly to self.osl.get_interpolation_data
weights (ndarray) – optional weights of each ap vector to apply during the interpolation
- Returns:
s0 – interpolated spectra
- Return type:
ndarray (len(aps), len(l0))
- interp_other(aps, other, weights=None, **kwargs)[source]#
Interpolate other grid values
Basically do a weighted sum on the grid using the interpolation weights
- Parameters:
aps (ndarray) – (logT, logg, logZ) sequence. Or appropriately defined similarly to self.osl.get_interpolation_data
weights (ndarray) – optional weights of each ap vector to apply during the interpolation
- Returns:
interpolated – interpolated values
- Return type:
ndarray (size(node_weights), )
pystellibs.interpolator.ndlinear module#
N-D linear interpolation