SumField#

final class lsst.images.fields.SumField(operands)#

Bases: BaseField

A field that sums other fields lazily.

Parameters:

operands (Iterable [ BaseField ]) – The fields to sum 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 summed 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_background(legacy_background[, ...])

Convert from a legacy lsst.afw.math.BackgroundList instance.

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.BoundedField.

to_legacy_photo_calib(image_unit)

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

Attributes Documentation

bounds#
is_constant#
operands#

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

unit#

Methods Documentation

__call__(point=None, /, *, x=None, y=None, quantity=False)#

Call self as a function.

Parameters:
  • point (Union[XY[Any], YX[Any], None], default: None)

  • x (Any, default: None)

  • y (Any, default: None)

  • quantity (bool, default: False)

Return type:

float | ndarray | Quantity

static from_legacy_background(legacy_background, bounds=None, unit=None)#

Convert from a legacy lsst.afw.math.BackgroundList instance.

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 of legacy_background.

  • unit (UnitBase | None, default: None) – The units of the returned field (lsst.afw.math.BackgroundList objects do not know their units).

Return type:

SumField

static 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.

Parameters:

image_unit (UnitBase) – Units of the image the photometric calibration applies to.

Return type:

TypeAliasType | None

render(bbox=None, *, dtype=None)#

Create an image realization of the field.

Parameters:
  • bbox (Box | None, default: None) – Bounding box of the image. If not provided, self.bounds.bbox will be used.

  • dtype (TypeAliasType | None, default: None) – Pixel data type for the returned image.

Return type:

Image

serialize(archive)#

Serialize the field to an output archive.

Parameters:

archive (OutputArchive[Any]) – Archive to write to.

Return type:

SumFieldSerializationModel

to_legacy()#

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

Return type:

TypeAliasType

to_legacy_photo_calib(image_unit)#

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

Parameters:

image_unit (UnitBase) – The units of the pixels the returned PhotoCalib will be associated with.

Return type:

TypeAliasType

This page was last modified on .