SkyGroup

class stcal.skymatch.skyimage.SkyGroup(images, sky_id=None)[source]

Bases: object

Collection of SkyImage objects.

Holds multiple SkyImage objects whose sky background values must be adjusted together.

SkyGroup provides methods for obtaining bounding polygon of the group of SkyImage objects and to compute sky value of the group.

Attributes Summary

sky

Sky background value.

Methods Summary

calc_sky([overlap, delta])

Compute sky background value.

Attributes Documentation

sky

Sky background value. See calc_sky for more details.

Methods Documentation

calc_sky(overlap=None, delta=True)[source]

Compute sky background value.

Parameters:
  • overlap (SkyImage, SkyGroup, None, optional) – This parameter is used to indicate that sky statistics should computed only in the region of intersection of this image with the SkyImage or SkyGroup indicated by overlap. When overlap is None, sky statistics will be computed over the entire image.

  • delta (bool, optional) – Should this function return absolute sky value or the difference between the computed value and the value of the sky stored in the sky property.

Returns:

  • skyval (float, None) – Computed sky value (absolute or relative to the sky attribute). If there are no valid data to perform this computations (e.g., because this image does not overlap with the image indicated by overlap), skyval will be set to None.

  • npix (int) – Number of pixels used to compute sky statistics.

  • polyarea (float) – Area (in srad) of the polygon that bounds data used to compute sky statistics.