Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions config/calibration/mask_v1.X.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Config file for masking and calibration.
# Standard cuts without halo masks, type v1.X.7.

# General parameters (can also given on command line)
params:
input_path: unions_shapepipe_comprehensive_struc_2024_v1.X.c.hdf5
cmatrices: False
sky_regions: False
verbose: True

# Masks
## Using columns in 'dat' group (ShapePipe flags)
dat:
# SExtractor flags
- col_name: FLAGS
label: SE FLAGS
kind: equal
value: 0

# Duplicate objects
- col_name: overlap
label: tile overlap
kind: equal
value: True

# ShapePipe flags
- col_name: IMAFLAGS_ISO
label: SP mask
kind: equal
value: 0

# Number of epochs
- col_name: N_EPOCH
label: r"$n_{\rm epoch}$"
kind: greater_equal
value: 2

# Magnitude range
- col_name: mag
label: mag range
kind: range
value: [15, 30]

# ngmix flags
- col_name: NGMIX_MOM_FAIL
label: "ngmix moments failure"
kind: equal
value: 0

# invalid PSF ellipticities
- col_name: NGMIX_ELL_PSFo_NOSHEAR_0
label: "bad PSF ellipticity comp 1"
kind: not_equal
value: -10
- col_name: NGMIX_ELL_PSFo_NOSHEAR_1
label: "bad PSF ellipticity comp 2"
kind: not_equal
value: -10

## Using columns in 'dat_ext' group (post-processing flags)
dat_ext:

# Bright star halos
- col_name: 2_Bright_star_halos
label: "Bright star halos"
kind: equal
value: False
# Stars
- col_name: 4_Stars
label: "Stars"
kind: equal
value: False

# Manual mask
- col_name: 8_Manual
label: "manual mask"
kind: equal
value: False

# r-band footprint
- col_name: 64_r
label: "r-band imaging"
kind: equal
value: False

# Maximask
- col_name: 1024_Maximask
label: "maximask"
kind: equal
value: False

# Rough pointing coverage
- col_name: npoint3
label: r"$n_{\rm pointing}$"
kind: greater_equal
value: 3

# Metacal parameters
metacal:
# Ellipticity dispersion
sigma_eps_prior: 0.34

# Signal-to-noise range
gal_snr_min: 10
gal_snr_max: 500

# Relative-size (hlr / hlr_psf) range
gal_rel_size_min: 0.707
gal_rel_size_max: 3

# Correct relative size for ellipticity?
gal_size_corr_ell: False

# Weight for global response matrix, None for unweighted mean
global_R_weight: w
121 changes: 121 additions & 0 deletions config/calibration/mask_v1.X.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Config file for masking and calibration.
# Standard cuts without halo masks, type v1.X.7.

# General parameters (can also given on command line)
params:
input_path: unions_shapepipe_comprehensive_struc_2024_v1.X.c.hdf5
cmatrices: False
sky_regions: False
verbose: True

# Masks
## Using columns in 'dat' group (ShapePipe flags)
dat:
# SExtractor flags
- col_name: FLAGS
label: SE FLAGS
kind: equal
value: 0

# Duplicate objects
- col_name: overlap
label: tile overlap
kind: equal
value: True

# ShapePipe flags
- col_name: IMAFLAGS_ISO
label: SP mask
kind: equal
value: 0

# Number of epochs
- col_name: N_EPOCH
label: r"$n_{\rm epoch}$"
kind: greater_equal
value: 2

# Magnitude range
- col_name: mag
label: mag range
kind: range
value: [15, 30]

# ngmix flags
- col_name: NGMIX_MOM_FAIL
label: "ngmix moments failure"
kind: equal
value: 0

# invalid PSF ellipticities
- col_name: NGMIX_ELL_PSFo_NOSHEAR_0
label: "bad PSF ellipticity comp 1"
kind: not_equal
value: -10
- col_name: NGMIX_ELL_PSFo_NOSHEAR_1
label: "bad PSF ellipticity comp 2"
kind: not_equal
value: -10

## Using columns in 'dat_ext' group (post-processing flags)
dat_ext:

# Faint star halos
- col_name: 1_Faint_star_halos
label: "Faint star halos"
kind: equal
value: False

# Bright star halos
- col_name: 2_Bright_star_halos
label: "Bright star halos"
kind: equal
value: False
# Stars
- col_name: 4_Stars
label: "Stars"
kind: equal
value: False

# Manual mask
- col_name: 8_Manual
label: "manual mask"
kind: equal
value: False

# r-band footprint
- col_name: 64_r
label: "r-band imaging"
kind: equal
value: False

# Maximask
- col_name: 1024_Maximask
label: "maximask"
kind: equal
value: False

# Rough pointing coverage
- col_name: npoint3
label: r"$n_{\rm pointing}$"
kind: greater_equal
value: 3

# Metacal parameters
metacal:
# Ellipticity dispersion
sigma_eps_prior: 0.34

# Signal-to-noise range
gal_snr_min: 10
gal_snr_max: 500

# Relative-size (hlr / hlr_psf) range
gal_rel_size_min: 0.707
gal_rel_size_max: 3

# Correct relative size for ellipticity?
gal_size_corr_ell: False

# Weight for global response matrix, None for unweighted mean
global_R_weight: w
6 changes: 3 additions & 3 deletions notebooks/demo_create_footprint_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

# Set parameters
obj._params["mask_dir"] = f"{os.environ['HOME']}/masks"
obj._params["aux_mask_files"] = f"{obj._params['mask_dir']}/coverage.hsp"
obj._params["aux_mask_files"] = f"{obj._params['mask_dir']}/coverage_v1.4.x.hsp"
obj._params["aux_mask_labels"] = "npoint3"
obj._params["verbose"] = True

Expand All @@ -66,9 +66,9 @@
if mask_params["col_name"] in all_masks_bits:
bits = bits | all_masks_bits[mask_params["col_name"]]

# Check auxillary masks
# Check auxiliary masks
if "npoint3" == mask_params["col_name"]:
auxiliary_masks.append(f"{obj._params['mask_dir']}/coverage.hsp")
auxiliary_masks.append(obj._params["aux_mask_files"])
auxiliary_labels.append("npoint3")

# Update bits for following function call
Expand Down
Loading