morphfits.products#

Create J-HIVE MorphFITS GalWrap products for GALFIT usage.

Attributes#

logger

Logger object for this module.

KRON_FACTOR

Factor by which to multiply Kron radius to determine image size for each

MINIMUM_IMAGE_SIZE

Minimum square stamp pixel dimensions.

BUNIT

Numerical value of flux unit per pixel, 10nJy.

AB_ZEROPOINT

Monochromatic AB magnitude zeropoint, in Jy.

Functions#

generate_stamps(→ tuple[list[int], ...)

Generate stamps (science frame cutouts) for all objects in a FICL.

generate_sigmas(input_root, product_root, field, ...)

Generate sigma maps for all objects in a FICL.

generate_psfs(input_root, product_root, field, ...[, ...])

Generate PSF crops for all frames in a filter.

generate_masks(input_root, product_root, field, ...[, ...])

Generate masks for all objects in a FICL.

generate_products(morphfits_config[, ...])

Generate all products for a given configuration.

Module Contents#

morphfits.products.logger#

Logger object for this module.

morphfits.products.KRON_FACTOR = 3#

Factor by which to multiply Kron radius to determine image size for each object.

morphfits.products.MINIMUM_IMAGE_SIZE = 32#

Minimum square stamp pixel dimensions.

morphfits.products.BUNIT = 1e-08#

Numerical value of flux unit per pixel, 10nJy.

morphfits.products.AB_ZEROPOINT = 3631#

Monochromatic AB magnitude zeropoint, in Jy.

morphfits.products.generate_stamps(input_root: pathlib.Path, product_root: pathlib.Path, field: str, image_version: str, catalog_version: str, filter: str, objects: list[str], pixscale: tuple[float, float], regenerate: bool = False, display_progress: bool = False) tuple[list[int], list[astropy.coordinates.SkyCoord], list[int]]#

Generate stamps (science frame cutouts) for all objects in a FICL.

Parameters:
  • input_root (Path) – Path to root GalWrap input directory.

  • product_root (Path) – Path to root GalWrap products directory.

  • field (str) – Field of observation.

  • image_version (str) – Version of image processing used on observation.

  • catalog_version (str) – Version of cataloguing used for field.

  • filter (str) – Filter used for observation.

  • objects (list[str]) – List of object IDs in catalog to stamp from observation.

  • pixscale (tuple[float, float]) – Pixel scale along x and y axes, in arcseconds per pixel.

  • regenerate (bool, optional) – Regenerate existing stamps, by default False.

  • display_progress (bool, optional) – Display progress on terminal screen via tqdm, by default False.

Returns:

List of object IDs, positions, and image sizes for successful stamps.

Return type:

tuple[list[int], list[SkyCoord], list[int]]

morphfits.products.generate_sigmas(input_root: pathlib.Path, product_root: pathlib.Path, field: str, image_version: str, catalog_version: str, filter: str, objects: list[int], positions: list[astropy.coordinates.SkyCoord], image_sizes: list[int], regenerate: bool = False, display_progress: bool = False)#

Generate sigma maps for all objects in a FICL.

Parameters:
  • input_root (Path) – Path to root GalWrap input directory.

  • product_root (Path) – Path to root GalWrap products directory.

  • field (str) – Field of observation.

  • image_version (str) – Version of image processing used on observation.

  • catalog_version (str) – Version of cataloguing used for field.

  • filter (str) – Filter used for observation.

  • objects (list[str]) – List of object IDs in catalog for which to generate sigma maps.

  • positions (list[SkyCoord]) – List of positions of objects in the sky, from catalog.

  • image_sizes (list[int]) – List of image sizes corresponding to each object’s stamp.

  • regenerate (bool, optional) – Regenerate existing sigma maps, by default False.

  • display_progress (bool, optional) – Display progress on terminal screen via tqdm, by default False.

See also

This

morphfits.products.generate_psfs(input_root: pathlib.Path, product_root: pathlib.Path, field: str, image_version: str, catalog_version: str, filter: str, objects: list[int], image_sizes: list[int], pixscale: tuple[float, float], regenerate: bool = False, display_progress: bool = False)#

Generate PSF crops for all frames in a filter.

Parameters:
  • input_root (Path) – Path to root GalWrap input directory.

  • product_root (Path) – Path to root GalWrap products directory.

  • field (str) – Field of observation.

  • image_version (str) – Version of image processing used on observation.

  • catalog_version (str) – Version of cataloguing used for field.

  • filter (str) – Filter used for observation.

  • objects (list[str]) – List of object IDs in catalog for which to generate masks.

  • image_sizes (list[int]) – List of image sizes corresponding to each object’s stamp.

  • pixscale (tuple[float, float]) – Pixel scale along x and y axes, in arcseconds per pixel.

  • regenerate (bool, optional) – Regenerate existing crops, by default False.

  • display_progress (bool, optional) – Display progress on terminal screen via tqdm, by default False.

morphfits.products.generate_masks(input_root: pathlib.Path, product_root: pathlib.Path, field: str, image_version: str, catalog_version: str, filter: str, objects: list[int], positions: list[astropy.coordinates.SkyCoord], image_sizes: list[int], regenerate: bool = False, display_progress: bool = False)#

Generate masks for all objects in a FICL.

Parameters:
  • input_root (Path) – Path to root GalWrap input directory.

  • product_root (Path) – Path to root GalWrap products directory.

  • field (str) – Field of observation.

  • image_version (str) – Version of image processing used on observation.

  • catalog_version (str) – Version of cataloguing used for field.

  • filter (str) – Filter used for observation.

  • objects (list[str]) – List of object IDs in catalog for which to generate masks.

  • positions (list[SkyCoord]) – List of positions of objects in the sky, from catalog.

  • image_sizes (list[int]) – List of image sizes corresponding to each object’s stamp.

  • regenerate (bool, optional) – Regenerate existing masks, by default False.

  • display_progress (bool, optional) – Display progress on terminal screen via tqdm, by default False.

morphfits.products.generate_products(morphfits_config: morphfits.config.MorphFITSConfig, regenerate_products: bool = False, regenerate_stamps: bool = False, regenerate_sigmas: bool = False, regenerate_psfs: bool = False, regenerate_masks: bool = False, keep_feedfiles: bool = False, display_progress: bool = False)#

Generate all products for a given configuration.

Parameters:
  • morphfits_config (MorphFITSConfig) – Configuration object for this MorphFITS run.

  • regenerate_products (bool, optional) – Regenerate all products, by default False.

  • regenerate_stamps (bool, optional) – Regenerate stamps, by default False.

  • regenerate_sigmas (bool, optional) – Regenerate sigma maps, by default False.

  • regenerate_psfs (bool, optional) – Regenerate PSF crops, by default False.

  • regenerate_masks (bool, optional) – Regenerate masks, by default False.

  • keep_feedfiles (bool, optional) – Reuse existing feedfiles, by default False.

  • display_progress (bool, optional) – Display progress on terminal screen via tqdm, by default False.