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
- MASK_COLUMNS = ('MASK_1_Faint_star_halos', 'MASK_2_Bright_star_halos', 'MASK_4_Stars', 'MASK_8_Manual', 'MASK_16_u', 'MASK_32_g', 'MASK_64_r', 'MASK_128_i', 'MASK_256_z', 'MASK_1024_Maximask', 'MASK_2048_z2')¶
All mask columns written by ShapePipe v2 (bool,
True= masked), one per bit of the UNIONS healsparse mask product (grammar.MASK_LABELS; v2 does not write bit 512). Post-processed v1 comprehensive catalogues carry the same columns, presented under these names bysp_validation.grammar.The r-band default bitmask uses bits 1 (faint star halos), 2 (bright star halos), 4 (star bodies), 8 (manual galaxy mask), 64 (r-band coverage) and 1024 (MaxiMask). The per-band coverage flags are 16 (u), 32 (g), 64 (r), 128 (i) and 256 (HSC z); 2048 is
Truewhere Pan-STARRS z-band (z2) coverage is absent.
- DEFAULT_MASK_COLUMNS = ('MASK_4_Stars', 'MASK_1_Faint_star_halos', 'MASK_2_Bright_star_halos', 'MASK_8_Manual', 'MASK_64_r', 'MASK_1024_Maximask')¶
Mask columns OR’d together for the default galaxy selection. This set is the ShapePipe r-band default bitmask: their OR matches
mask_ron covered granules (verified on the P3 sky area), with differences at footprint edges without map coverage. Deliberately not a blanket OR over MASK_COLUMNS: the other coverage flags (bits 16, 32, 128, 256) and bit 2048 would mask essentially the whole catalogue.
- mask_cut(dd, mask_columns=None)[source]¶
Mask Cut.
Return a boolean mask that is
Truefor objects not flagged by any of the requested ShapePipe mask columns.- Parameters:
dd (numpy.ndarray or dict) – input catalogue
mask_columns (list of str, optional) – mask columns to OR together; default is
DEFAULT_MASK_COLUMNS
- Returns:
boolean mask,
True= keep- Return type:
- Raises:
KeyError – if any requested mask column is absent from the catalogue
- 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:
- Returns:
mask where True indicates galaxy to retain, and False being in overlapping region, to remove
- Return type:
- classification_galaxy_base(dd, cut_overlap, gal_mag_bright=20, gal_mag_faint=26, flags_keep=None, n_epoch_min=1, mask_columns=None)[source]¶
Classification Galaxy Base.
Return mask corresponding to basic classification for galaxies.