The Substamp Class

The Substamp class is a data container that holds all information about a single substamp used for kernel fitting.

Data models for the HOTPANTS wrapper.

class hotpants.models.Substamp(substamp_id: int, stamp_group_id: int, x: int, y: int)

Bases: object

Data class to hold all information about a single substamp.

A substamp is a small cutout of an image centered on a bright, isolated star, used to model the convolution kernel. This class tracks the data and status of each substamp throughout the pipeline.

id

A unique identifier for the substamp.

Type:

int

stamp_group_id

The identifier for the parent stamp region.

Type:

int

x

The x-coordinate of the substamp center.

Type:

float

y

The y-coordinate of the substamp center.

Type:

float

status

The current processing status of the substamp.

Type:

SubstampStatus

image_cutout

The pixel data from the science image.

Type:

np.ndarray

template_cutout

The pixel data from the template image.

Type:

np.ndarray

noise_variance_cutout

The noise variance in the cutout region.

Type:

np.ndarray

fit_results

A dictionary containing results from local fits.

Type:

dict

local_kernel_solution

The kernel solution coefficients derived from this substamp alone.

Type:

np.ndarray

convolved_model_local

The convolved model of this substamp using its local solution.

Type:

np.ndarray

convolved_model_global

The convolved model of this substamp using the final global solution.

Type:

np.ndarray

basis_vectors

A 3D array representing the kernel basis functions convolved with the image data at this location. This is the core component for the linear fit, as described in the Alard & Lupton (1998) paper. Each 2D slice of this array is one of the Gaussian-Laguerre basis functions convolved with the local image data, forming the design matrix for the least-squares fit.

Type:

np.ndarray

class hotpants.models.SubstampStatus(*values)

Bases: Enum

Enumeration for the status of a substamp during the fitting process.

FOUND = 1
PASSED_FOM_CHECK = 2
REJECTED_FOM_CHECK = 3
REJECTED_ITERATIVE_FIT = 5
USED_IN_FINAL_FIT = 4