ProductField#

final class lsst.images.fields.ProductField(operands: Iterable[Field])#

Bases: BaseField

A field that multiplies other fields lazily.

Parameters#

operandsIterable [ BaseField ]

The fields to multiply together.

Attributes Summary

bounds

The region over which this field can be evaluated (Bounds).

is_constant

Whether the field is spatially constant (bool).

operands

The fields that are multiplied together (tuple [BaseField, ...]).

unit

The units of the field (astropy.units.UnitBase or None).

Methods Summary

__call__([point, x, y, quantity])

Call self as a function.

from_legacy(legacy[, unit, bounds])

Convert from a legacy lsst.afw.math.ProductBoundedField.

make_legacy_photo_calib(image_unit)

Make a legacy lsst.afw.image.PhotoCalib for 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 field to an output archive.

to_legacy()

Convert to a legacy lsst.afw.math.ProductBoundedField.

to_legacy_photo_calib(image_unit)

Convert to a legacy lsst.afw.image.PhotoCalib.

Attributes Documentation

bounds#
is_constant#
operands#

The fields that are multiplied together (tuple [BaseField, …]).

unit#

Methods Documentation

__call__(point: XY[Any] | YX[Any] | None = None, /, *, x: Any = None, y: Any = None, quantity: bool = False) float | ndarray | Quantity#

Call self as a function.

static from_legacy(legacy: LegacyProductBoundedField, unit: astropy.units.UnitBase | None = None, bounds: Bounds | None = None) ProductField#

Convert from a legacy lsst.afw.math.ProductBoundedField.

Parameters#

legacy

Legacy field to convert.

unit

The units of the returned field (lsst.afw.math.BoundedField objects do not know their units).

bounds

The bounds of the returned field, if they should be different from the bounding box of legacy.

static make_legacy_photo_calib(image_unit: astropy.units.UnitBase) LegacyPhotoCalib | None#

Make a legacy lsst.afw.image.PhotoCalib for an image with the given units, if that is possible without a photometric scaling field.

Parameters#

image_unit

Units of the image the photometric calibration applies to.

render(bbox: Box | None = None, *, dtype: type[Any] | dtype[Any] | _SupportsDType[dtype[Any]] | tuple[Any, Any] | list[Any] | _DTypeDict | str | None = None) Image#

Create an image realization of the field.

Parameters#

bbox

Bounding box of the image. If not provided, self.bounds.bbox will be used.

dtype

Pixel data type for the returned image.

serialize(archive: OutputArchive[Any]) ProductFieldSerializationModel#

Serialize the field to an output archive.

Parameters#

archive

Archive to write to.

to_legacy() LegacyProductBoundedField#

Convert to a legacy lsst.afw.math.ProductBoundedField.

to_legacy_photo_calib(image_unit: astropy.units.UnitBase) LegacyPhotoCalib#

Convert to a legacy lsst.afw.image.PhotoCalib.

Parameters#

image_unit

The units of the pixels the returned PhotoCalib will be associated with.