punchbowl.levelq.limits#

Classes#

Limit

Represents a limit for identifying outliers.

LimitSet

Represents a set of limits.

Module Contents#

class punchbowl.levelq.limits.Limit(xkey: str, xs: numpy.ndarray, ykey: str, ys: numpy.ndarray, comp: str)[source]#

Represents a limit for identifying outliers.

A limit is an x-y curve, with x and y being values from an image’s FITS header. A comparison sense is defined (i.e. ‘<’ or ‘>’, and a given images is considered “good” or “bad” based on how its (x, y) value compares to that curve.

xkey#
xs#
ykey#
ys#
comp#
is_good(point: astropy.io.fits.Header | punchbowl.data.NormalizedMetadata | collections.abc.Iterable) bool | numpy.ndarray[source]#

Check if a point satisfies a limit.

plot(points: list[astropy.io.fits.Header | punchbowl.data.NormalizedMetadata | collections.abc.Iterable] | None = None) None[source]#

Plot the limit.

serialize() tuple[source]#

Convert the limit to a tuple.

static from_serialized(serialized: tuple) Limit[source]#

Convert a tuple to a limit.

__repr__() str[source]#

Repr.

class punchbowl.levelq.limits.LimitSet(limits: list[Limit] | None = None)[source]#

Represents a set of limits.

A given image will be determined to be “good” or “bad” based on whether it satisfies all the limits.

limits = []#
add(limit: Limit) None[source]#

Add a Limit to the set.

is_good(point: astropy.io.fits.Header | punchbowl.data.NormalizedMetadata | collections.abc.Iterable) bool | numpy.ndarray[source]#

Check if a point satisfies all limits.

plot(points: list[astropy.io.fits.Header] | None = None, xkey: str | None = None, ykey: str | None = None) None[source]#

Plot the limits.

to_file(path: str) None[source]#

Write to a file.

static from_file(path: str) LimitSet[source]#

Load from a file.