SplineField#
- final class lsst.images.fields.SplineField(bounds, data, *, y, x, unit=None)#
Bases:
BaseFieldA 2-d Akima spline interpolation of data on a regular grid.
- Parameters:
bounds (
Bounds) – The region where this field can be evaluated.data (
ndarray) – The data points to be interpolated. Missing values (indicated by NaN) are allowed. Will be set to read-only in place.y (
ndarray) – Coordinates for the first dimension ofdata. Will be set to read-only in place.x (
ndarray) – Coordinates for the second dimension ofdata. Will be set to read-only in place.
Notes
This field is much faster to evaluate on a grid via
renderthan at arbitrary points via the function-call operator.Attributes Summary
The region over which this field can be evaluated (
Bounds).The data points to be interpolated (
numpy.ndarray).Whether the field is spatially constant (
bool).The units of the field (
astropy.units.UnitBaseorNone).Coordinates for the second dimension of
data(numpy.ndarray).Coordinates for the first dimension of
data(numpy.ndarray).Methods Summary
__call__([point, x, y, quantity])Call self as a function.
from_legacy_background(legacy_background[, ...])Convert from a legacy
lsst.afw.math.BackgroundMIinstance.make_legacy_photo_calib(image_unit)Make a legacy
lsst.afw.image.PhotoCalibfor an image with the given units, if that is possible without a photometric scaling field.render([bbox, dtype])Create an image realization of the field.
serialize(archive)Serialize the spline field to an output archive.
Convert to a legacy
lsst.afw.math.BoundedField.to_legacy_photo_calib(image_unit)Convert to a legacy
lsst.afw.image.PhotoCalib.Attributes Documentation
- bounds#
- data#
The data points to be interpolated (
numpy.ndarray).May have missing values indicated by NaNs.
- is_constant#
- unit#
- x#
Coordinates for the second dimension of
data(numpy.ndarray).
- y#
Coordinates for the first dimension of
data(numpy.ndarray).
Methods Documentation
- __call__(point=None, /, *, x=None, y=None, quantity=False)#
Call self as a function.
- static from_legacy_background(legacy_background, bounds=None, unit=None)#
Convert from a legacy
lsst.afw.math.BackgroundMIinstance.- Parameters:
legacy_background (
TypeAliasType) – Legacy background object to convert.bounds (
Bounds|None, default:None) – The bounds of the returned field, if they should be different from the bounding box oflegacy_background.unit (
UnitBase|None, default:None) – The units of the returned field (lsst.afw.math.Backgroundobjects do not know their units).
- Return type:
Notes
SplineField.renderand thelsst.afwbackground interpolator both use Akima splines, but with slightly different boundary conditions. They should produce equivalent to single-precision round-off error when evaluated within the region enclosed by bin centers (i.e. where no extrapolation is necessary) and when there are five or more points to be interpolated in each row and column.
- static make_legacy_photo_calib(image_unit)#
Make a legacy
lsst.afw.image.PhotoCalibfor an image with the given units, if that is possible without a photometric scaling field.
- render(bbox=None, *, dtype=None)#
Create an image realization of the field.
- serialize(archive)#
Serialize the spline field to an output archive.
- Parameters:
archive (
OutputArchive[Any]) – Archive to write to.- Return type:
- to_legacy()#
Convert to a legacy
lsst.afw.math.BoundedField.- Return type:
TypeAliasType