regularizepsf.image_processing#

Functions#

calculate_background(→ numpy.ndarray)

Fits a planar background to input patch data to use for central star isolation.

_scale_image(image, interpolation_scale, hdu_choice)

_find_patches(image, star_threshold, star_mask, ...[, ...])

process_single_image(args)

Process a single image to extract patches.

Module Contents#

regularizepsf.image_processing.calculate_background(patch: numpy.ndarray) numpy.ndarray[source]#

Fits a planar background to input patch data to use for central star isolation. Patch boundaries are ignored, along with the central peak star. Remaining pixels are fit to a plan with a least squares method, with values of zero marked as nans.

Parameters:

patch (np.ndarray) – Input patch array to use for background subtraction

Returns:

Planar background fit array

Return type:

np.ndarray

regularizepsf.image_processing._scale_image(image, interpolation_scale, hdu_choice)[source]#
regularizepsf.image_processing._find_patches(image, star_threshold, star_mask, interpolation_scale, psf_size, i, saturation_threshold: float = np.inf, image_mask: numpy.ndarray | None = None, star_minimum: float = 0, star_maximum: float = np.inf)[source]#
regularizepsf.image_processing.process_single_image(args)[source]#

Process a single image to extract patches.

Parameters:

args (tuple) – Tuple containing (i, image, star_mask, interpolation_scale, psf_size, star_threshold, saturation_threshold, image_mask)

Returns:

Dictionary of patches found in the image

Return type:

dict