punchbowl.level1.psf#

Functions#

build_psf_transform(→ regularizepsf.ArrayPSFTransform)

Build the PSF transform for Level 1 processing from a list of images.

generate_projected_psf(→ regularizepsf.ArrayPSF)

Create a varying PSF reflecting how a true circle looks in the mosaic image projection.

correct_psf(→ ndcube.NDCube)

Correct the PSF.

correct_psf_task(→ ndcube.NDCube)

Prefect Task to correct the PSF of an image.

Module Contents#

punchbowl.level1.psf.build_psf_transform(image_paths: list[str] | list[pathlib.Path], alpha: float = 0.7, epsilon: float = 0.515, target_sigma: float = 3.3, psf_size: int = 64) regularizepsf.ArrayPSFTransform[source]#

Build the PSF transform for Level 1 processing from a list of images.

Parameters:
  • image_paths (List[str] | List[Path]) – images to use in building the PSF model

  • alpha (float) – alpha parameter of the PSF transform, see Coma Off It paper

  • epsilon (float) – epsilon parameter of the PSF transform, see Coma Off It paper

  • target_sigma (float) – the target sigma of the PSF model in pixels

  • psf_size (int) – size of the grid in the PSF model in pixels

Returns:

the PSF transform that corresponds to the input images

Return type:

ArrayPSFTransform

punchbowl.level1.psf.generate_projected_psf(source_wcs: astropy.wcs.WCS, psf_width: int = 64, star_gaussian_sigma: float = 3.3 / 2.355) regularizepsf.ArrayPSF[source]#

Create a varying PSF reflecting how a true circle looks in the mosaic image projection.

punchbowl.level1.psf.correct_psf(data: ndcube.NDCube, psf_transform: regularizepsf.ArrayPSFTransform, max_workers: int | None = None) ndcube.NDCube[source]#

Correct the PSF.

Parameters:
  • data (NDCube) – The input image

  • psf_transform (ArrayPSFTransform) – The PSF transform that corresponds to the input images

  • max_workers (int | None) – The maximum number of concurrent processes to use when performing the PSF transform

Returns:

The corrected image

Return type:

NDCube

punchbowl.level1.psf.correct_psf_task(data_object: ndcube.NDCube, model_path: str | collections.abc.Callable | None = None, max_workers: int | None = None) ndcube.NDCube[source]#

Prefect Task to correct the PSF of an image.

Parameters:
  • data_object (NDCube) – data to operate on

  • model_path (str) – path to the PSF model to use in the correction

  • max_workers (int) – the maximum number of worker threads to use

Returns:

modified version of the input with the PSF corrected

Return type:

NDCube