Repository navigation
Photoz catalogue handling #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
c90ae4f
392461e
8cfe153
0ec3e3f
7f29a8b
7e88b05
9798047
7cdcfdf
bfae665
cd9a13e
82b7b15
055a1d5
6ec03ae
1c88cf2
dfe6ee0
d80e3ef
eaeb5e9
a3cdbab
b2208d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,9 +1,11 @@ | ||||||||
| # Config file for masking and calibration. | ||||||||
| # Standard cuts without halo masks, type v1.X.6. | ||||||||
| # Joint ShapePipe + PhotoPipe catalogue. | ||||||||
| # SP: Standard cuts without halo masks, type v1.X.6. | ||||||||
| # PP" Standard selection. | ||||||||
|
|
||||||||
| # General parameters (can also given on command line) | ||||||||
| params: | ||||||||
| input_path: unions_shapepipe_comprehensive_struc_2024_v1.X.c.hdf5 | ||||||||
| input_path: unions_shapepipe_comprehensive_struc_ugriz_2024_v1.X.c.hdf5 | ||||||||
| cmatrices: False | ||||||||
| sky_regions: False | ||||||||
| verbose: True | ||||||||
|
|
@@ -99,12 +101,44 @@ dat: | |||||||
| kind: equal | ||||||||
| value: False | ||||||||
|
|
||||||||
| # u-band footprint | ||||||||
| - col_name: MASK_16_u | ||||||||
| label: "u-band imaging" | ||||||||
| kind: equal | ||||||||
| value: False | ||||||||
|
|
||||||||
| # g-band footprint | ||||||||
| - col_name: MASK_32_g | ||||||||
| label: "g-band imaging" | ||||||||
| kind: equal | ||||||||
| value: False | ||||||||
|
|
||||||||
| # r-band footprint | ||||||||
| - col_name: MASK_64_r | ||||||||
| label: "r-band imaging" | ||||||||
| kind: equal | ||||||||
| value: False | ||||||||
|
|
||||||||
| # i-band footprint | ||||||||
| - col_name: MASK_128_i | ||||||||
| label: "i-band imaging" | ||||||||
| kind: equal | ||||||||
| value: False | ||||||||
|
|
||||||||
| # z-band footprint, both z surveys: 256_z is WISHES (Subaru HSC), 2048_z2 is | ||||||||
| # Pan-STARRS (the deeper data, not the shallow all-sky survey). Told apart by | ||||||||
| # depth: median MAG_LIM_z = 25.54 vs MAG_LIM_z2 = 24.88. | ||||||||
| # Each bit is only required where its own band has a magnitude: asking for | ||||||||
| # both at once keeps only the overlap of the two surveys, which costs ~85% of | ||||||||
| # the sample. Pairs with the MAG_GAAP_0p7_z / _z2 two-band cut in `dat`. | ||||||||
| - col_name: MASK_256_z | ||||||||
| col_name2: MASK_2048_z2 | ||||||||
| mag_col: MAG_GAAP_0p7_z | ||||||||
| mag_col2: MAG_GAAP_0p7_z2 | ||||||||
| label: "z-band imaging" | ||||||||
| kind: covered_2bands | ||||||||
| value: -99 | ||||||||
|
|
||||||||
| # Maximask | ||||||||
| - col_name: MASK_1024_Maximask | ||||||||
| label: "maximask" | ||||||||
|
|
@@ -135,3 +169,14 @@ metacal: | |||||||
|
|
||||||||
| # Weight for global response matrix, None for unweighted mean | ||||||||
| global_R_weight: w | ||||||||
|
|
||||||||
| # Binned footprint mask | ||||||||
| binned_mask: | ||||||||
| # Resolution | ||||||||
| nside: 8192 | ||||||||
|
|
||||||||
| # Mask value for "good" (observed) area | ||||||||
| good: False | ||||||||
|
|
||||||||
| # Output file path base | ||||||||
| output_base: "footprint_binned" | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this section present,
Suggested change
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -180,9 +180,21 @@ | |||||
| "FLUX_RADIUS", | ||||||
| "MAGERR_AUTO", | ||||||
| "NGMIX_T_NOSHEAR", | ||||||
| "NGMIX_T_PSF_RECONV_NOSHEAR", | ||||||
| "NGMIX_Tpsf_NOSHEAR", | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(The |
||||||
| "fwhm_PSF", | ||||||
| ] | ||||||
|
|
||||||
| # PhotoPipe photo-z and multi-band photometry, when fill_photoz_bands.py has | ||||||
| # put them in the input. Selected against what the input actually holds, for | ||||||
| # two reasons: no catalogue carries every key (v1.6.c.3 has no Z_ML), and the | ||||||
| # image-simulation runs share this script with none of these columns at all. | ||||||
| photoz_cols = [key for key in cat.PHOTOZ_KEYS if key in set(dat.dtype.names or ())] | ||||||
| if photoz_cols: | ||||||
| print(f"Copying {len(photoz_cols)} PhotoPipe columns to the output catalogue") | ||||||
| else: | ||||||
| print("No PhotoPipe columns found in the input; none copied") | ||||||
| add_cols = add_cols + photoz_cols | ||||||
|
|
||||||
| add_cols_data = {} | ||||||
| for key in add_cols: | ||||||
| add_cols_data[key] = cat.get_col(dat, key, mask_combined._mask, mask_metacal) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MASK_256_zis inSPATIAL_CUTSinscripts/masking.py, so withfootprint_only=Truethis cut gets sent toapply_condition(), which only handles single-column cuts. The result isValueError: Unknown mask condition kind: 'covered_2bands'.It's worth deciding what footprint-only should mean for this cut. One option reproduces the catalogue selection, magnitude checks included. The other is purely geometric: the union of the two imaging footprints, with bad =
bad_z & bad_z2.demo_create_footprint_mask.pyhas the same gap, since it ignorescol_name2.