Tabular1D¶
- class astropy.modeling.tabular.Tabular1D(points=None, lookup_table=None, method='linear', bounds_error=True, fill_value=nan, **kwargs)¶
Bases:
_TabularTabular model in 1D. Returns an interpolated lookup table value.
- Parameters:
- pointsarray_like of
floatof ndim=1. The points defining the regular grid in n dimensions.
- lookup_tablearray_like, of ndim=1.
The data in one dimensions.
- method
str, optional The method of interpolation to perform. Supported are “linear” and “nearest”, and “splinef2d”. “splinef2d” is only supported for 2-dimensional data. Default is “linear”.
- bounds_errorbool, optional
If True, when interpolated values are requested outside of the domain of the input data, a ValueError is raised. If False, then
fill_valueis used.- fill_value
float, optional If provided, the value to use for points outside of the interpolation domain. If None, values outside the domain are extrapolated. Extrapolation is not supported by method “splinef2d”.
- pointsarray_like of
- Returns:
- value
ndarray Interpolated values at input coordinates.
- value
- Raises:
ImportErrorScipy is not installed.
Notes
Uses
scipy.interpolate.interpn.Attributes Summary
The number of inputs.
The number of outputs.
Methods Summary
__call__(*inputs[, model_set_axis, ...])Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.
Attributes Documentation
- lookup_table = array([0., 0.])¶
- n_inputs = 1¶
The number of inputs.
- n_outputs = 1¶
The number of outputs.
Methods Documentation
- __call__(*inputs, model_set_axis=None, with_bounding_box=False, fill_value=nan, equivalencies=None, inputs_map=None, **new_inputs)¶
Evaluate this model using the given input(s) and the parameter values that were specified when the model was instantiated.