sp_validation.galaxy

GALAXY.

Name:

galaxy.py

Description:

This script contains methods to deal with galaxy and star images.

Author:

Martin Kilbinger <martin.kilbinger@cea.fr> Axel Guinot

T_to_fwhm(T)[source]

T to fwhm.

Transform from size T to FWHM. This interprets T as the RMS (sigma) of a Gaussian.

Parameters:

T ((array of) float) – input size(s)

Returns:

fwhm – output fwhm(s)

Return type:

(array of) float

sigma_to_fwhm(sigma, pixel_size=1)[source]

Sigma to fwhm.

Transform from size sigma to FWHM.

Parameters:
  • sigma ((array of) float) – input size(s)

  • pixel_size (float, optional, default=1) – pixel size in arcsec, set to 1 if no scaling required

Returns:

fwhm – output fwhm(s)

Return type:

(array of) float

classification_galaxy_overlap_ra_dec(dd, ra_key='XWIN_WORLD', dec_key='YWIN_WORLD')[source]

Classification Galaxy Overlap Ra Dec.

Return mask corresponding to non-overlapping tile areas using simple cuts in RA and Dec.

Parameters:
  • dd (FITS.record) – input data

  • ra_key (str, optional) – key name for right ascension column, default is ‘XWIN_WORLD’

  • dec_key (str, optional) – key name for declination column, default is ‘YWIN_WORLD’

Returns:

mask where True indicates galaxy to retain, and False being in overlapping region, to remove

Return type:

list of bool

classification_galaxy_base(dd, cut_overlap, gal_mag_bright=20, gal_mag_faint=26, flags_keep=None, n_epoch_min=1, do_spread_model=True)[source]

Classification Galaxy Base.

Return mask corresponding to basic classification for galaxies.

classification_galaxy_ngmix(dd, cut_common, stats_file=None, verbose=False)[source]

Classification Galaxy Ngmx.

Return mask corresponding to ngmix classification of galaxies

classification_galaxy_galsim(dd, cut_common, stats_file, verbose=False)[source]

Classification Galaxy Galsim.

Return mask corresponding to galsim classification of galaxies

mask_overlap(ra, dec, tile_id_in, region_file_path, n_jobs=-1)[source]

Mask Overlap.