Tabular1D

class astropy.modeling.tabular.Tabular1D(points=None, lookup_table=None, method='linear', bounds_error=True, fill_value=nan, **kwargs)

Bases: _Tabular

Tabular model in 1D. Returns an interpolated lookup table value.

Parameters:
pointsnumpy:array_like of python:float of ndim=1.

The points defining the regular grid in n dimensions.

lookup_tablenumpy:array_like, of ndim=1.

The data in one dimensions.

methodpython: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_value is used.

fill_valuepython: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”.

Returns:
valuendarray

Interpolated values at input coordinates.

Raises:
ImportError

Scipy is not installed.

Notes

Uses scipy.interpolate.interpn.

Attributes Summary

lookup_table

n_inputs

The number of inputs.

n_outputs

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.