Skip to content

Commit febcd5f

Browse files
martinkilbingermartinkilbinger
andauthored
V1.4.7 (#161)
* summer_2025 * footprint script: using mask variable consistently * added v1.X.8 config mask file --------- Co-authored-by: martinkilbinger <martinkilbinger@cea.fr>
1 parent ff72380 commit febcd5f

File tree

4 files changed

+385
-157
lines changed

4 files changed

+385
-157
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Config file for masking and calibration.
2+
# Standard cuts without halo masks, type v1.X.7.
3+
4+
# General parameters (can also given on command line)
5+
params:
6+
input_path: unions_shapepipe_comprehensive_struc_2024_v1.X.c.hdf5
7+
cmatrices: False
8+
sky_regions: False
9+
verbose: True
10+
11+
# Masks
12+
## Using columns in 'dat' group (ShapePipe flags)
13+
dat:
14+
# SExtractor flags
15+
- col_name: FLAGS
16+
label: SE FLAGS
17+
kind: equal
18+
value: 0
19+
20+
# Duplicate objects
21+
- col_name: overlap
22+
label: tile overlap
23+
kind: equal
24+
value: True
25+
26+
# ShapePipe flags
27+
- col_name: IMAFLAGS_ISO
28+
label: SP mask
29+
kind: equal
30+
value: 0
31+
32+
# Number of epochs
33+
- col_name: N_EPOCH
34+
label: r"$n_{\rm epoch}$"
35+
kind: greater_equal
36+
value: 2
37+
38+
# Magnitude range
39+
- col_name: mag
40+
label: mag range
41+
kind: range
42+
value: [15, 30]
43+
44+
# ngmix flags
45+
- col_name: NGMIX_MOM_FAIL
46+
label: "ngmix moments failure"
47+
kind: equal
48+
value: 0
49+
50+
# invalid PSF ellipticities
51+
- col_name: NGMIX_ELL_PSFo_NOSHEAR_0
52+
label: "bad PSF ellipticity comp 1"
53+
kind: not_equal
54+
value: -10
55+
- col_name: NGMIX_ELL_PSFo_NOSHEAR_1
56+
label: "bad PSF ellipticity comp 2"
57+
kind: not_equal
58+
value: -10
59+
60+
## Using columns in 'dat_ext' group (post-processing flags)
61+
dat_ext:
62+
63+
# Bright star halos
64+
- col_name: 2_Bright_star_halos
65+
label: "Bright star halos"
66+
kind: equal
67+
value: False
68+
# Stars
69+
- col_name: 4_Stars
70+
label: "Stars"
71+
kind: equal
72+
value: False
73+
74+
# Manual mask
75+
- col_name: 8_Manual
76+
label: "manual mask"
77+
kind: equal
78+
value: False
79+
80+
# r-band footprint
81+
- col_name: 64_r
82+
label: "r-band imaging"
83+
kind: equal
84+
value: False
85+
86+
# Maximask
87+
- col_name: 1024_Maximask
88+
label: "maximask"
89+
kind: equal
90+
value: False
91+
92+
# Rough pointing coverage
93+
- col_name: npoint3
94+
label: r"$n_{\rm pointing}$"
95+
kind: greater_equal
96+
value: 3
97+
98+
# Metacal parameters
99+
metacal:
100+
# Ellipticity dispersion
101+
sigma_eps_prior: 0.34
102+
103+
# Signal-to-noise range
104+
gal_snr_min: 10
105+
gal_snr_max: 500
106+
107+
# Relative-size (hlr / hlr_psf) range
108+
gal_rel_size_min: 0.707
109+
gal_rel_size_max: 3
110+
111+
# Correct relative size for ellipticity?
112+
gal_size_corr_ell: False
113+
114+
# Weight for global response matrix, None for unweighted mean
115+
global_R_weight: w
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Config file for masking and calibration.
2+
# Standard cuts without halo masks, type v1.X.7.
3+
4+
# General parameters (can also given on command line)
5+
params:
6+
input_path: unions_shapepipe_comprehensive_struc_2024_v1.X.c.hdf5
7+
cmatrices: False
8+
sky_regions: False
9+
verbose: True
10+
11+
# Masks
12+
## Using columns in 'dat' group (ShapePipe flags)
13+
dat:
14+
# SExtractor flags
15+
- col_name: FLAGS
16+
label: SE FLAGS
17+
kind: equal
18+
value: 0
19+
20+
# Duplicate objects
21+
- col_name: overlap
22+
label: tile overlap
23+
kind: equal
24+
value: True
25+
26+
# ShapePipe flags
27+
- col_name: IMAFLAGS_ISO
28+
label: SP mask
29+
kind: equal
30+
value: 0
31+
32+
# Number of epochs
33+
- col_name: N_EPOCH
34+
label: r"$n_{\rm epoch}$"
35+
kind: greater_equal
36+
value: 2
37+
38+
# Magnitude range
39+
- col_name: mag
40+
label: mag range
41+
kind: range
42+
value: [15, 30]
43+
44+
# ngmix flags
45+
- col_name: NGMIX_MOM_FAIL
46+
label: "ngmix moments failure"
47+
kind: equal
48+
value: 0
49+
50+
# invalid PSF ellipticities
51+
- col_name: NGMIX_ELL_PSFo_NOSHEAR_0
52+
label: "bad PSF ellipticity comp 1"
53+
kind: not_equal
54+
value: -10
55+
- col_name: NGMIX_ELL_PSFo_NOSHEAR_1
56+
label: "bad PSF ellipticity comp 2"
57+
kind: not_equal
58+
value: -10
59+
60+
## Using columns in 'dat_ext' group (post-processing flags)
61+
dat_ext:
62+
63+
# Faint star halos
64+
- col_name: 1_Faint_star_halos
65+
label: "Faint star halos"
66+
kind: equal
67+
value: False
68+
69+
# Bright star halos
70+
- col_name: 2_Bright_star_halos
71+
label: "Bright star halos"
72+
kind: equal
73+
value: False
74+
# Stars
75+
- col_name: 4_Stars
76+
label: "Stars"
77+
kind: equal
78+
value: False
79+
80+
# Manual mask
81+
- col_name: 8_Manual
82+
label: "manual mask"
83+
kind: equal
84+
value: False
85+
86+
# r-band footprint
87+
- col_name: 64_r
88+
label: "r-band imaging"
89+
kind: equal
90+
value: False
91+
92+
# Maximask
93+
- col_name: 1024_Maximask
94+
label: "maximask"
95+
kind: equal
96+
value: False
97+
98+
# Rough pointing coverage
99+
- col_name: npoint3
100+
label: r"$n_{\rm pointing}$"
101+
kind: greater_equal
102+
value: 3
103+
104+
# Metacal parameters
105+
metacal:
106+
# Ellipticity dispersion
107+
sigma_eps_prior: 0.34
108+
109+
# Signal-to-noise range
110+
gal_snr_min: 10
111+
gal_snr_max: 500
112+
113+
# Relative-size (hlr / hlr_psf) range
114+
gal_rel_size_min: 0.707
115+
gal_rel_size_max: 3
116+
117+
# Correct relative size for ellipticity?
118+
gal_size_corr_ell: False
119+
120+
# Weight for global response matrix, None for unweighted mean
121+
global_R_weight: w

notebooks/demo_create_footprint_mask.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
# Set parameters
4141
obj._params["mask_dir"] = f"{os.environ['HOME']}/masks"
42-
obj._params["aux_mask_files"] = f"{obj._params['mask_dir']}/coverage.hsp"
42+
obj._params["aux_mask_files"] = f"{obj._params['mask_dir']}/coverage_v1.4.x.hsp"
4343
obj._params["aux_mask_labels"] = "npoint3"
4444
obj._params["verbose"] = True
4545

@@ -66,9 +66,9 @@
6666
if mask_params["col_name"] in all_masks_bits:
6767
bits = bits | all_masks_bits[mask_params["col_name"]]
6868

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

7474
# Update bits for following function call

0 commit comments

Comments
 (0)