sp_validation.catalog_builders¶
CATALOG BUILDERS.
Catalogue construction pipeline — the runner classes that create, mask, and
calibrate joint comprehensive catalogues, plus the run_* entry-point
functions. Built on the catalogue data layer in catalog (imported here as
sp_cat), which supplies the read/write/column-access/matching primitives.
- Author:
Martin Kilbinger
- class Mask(col_name, label, kind=None, value=0, col_name2=None, dat=None, verbose=False)[source]¶
Bases:
objectMask.
Class to handle masking of catalogues.
- Parameters:
col_name (str) – name of column to use for mask
label (str) – mask label
kind (str) – operation type; see
apply_condition()for the allowed values, plus “not_equal_2bands”, which keeps objects whose value differs fromvalueincol_nameorcol_name2(two-band OR)value (float or list) – value(s) to be used in mask operation
col_name2 (str, optional) – name of second column; required for (and only used by) kind “not_equal_2bands”
dat (numpy.ndarray, optional) – input data, default is None; apply mask if given
verbose (bool, optional) – verbose output if
True; default isFalse
- get_masks_from_config(config, dat, dat_ext, masks_to_apply=None, verbose=False)[source]¶
Get Masks From Config.
Return mask information from yaml config structure.
- Parameters:
config (dict) – config information
dat (numpy.ndarray) – input data
det_ext (numpy.ndarray) – input extended data
masks_to_apply (list, optional) – masks to apply exclusively; if None (default), use all masks
verbose (bool, optional) – verbose output if
True; default isFalse
- Returns:
list – list of masks
dict – list of indices for given mask column name (label)