Skip to content

Commit

Permalink
Updated sources_select_compute to use true shear and other things
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Nov 8, 2024
1 parent a3266bf commit 3c085bc
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 605 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ inputs:
# See README for paths to download these files
shear_catalog: ./data/cosmodc2/20deg2/shear_catalog.hdf5
cluster_catalog: ./data/cosmodc2/20deg2/cluster_catalog.hdf5
shear_tomography_catalog: ./data/example/outputs_metadetect shear_tomography_catalog.hdf5
shear_tomography_catalog: ./data/example/outputs_metadetect/shear_tomography_catalog.hdf5
source_photoz_pdfs: ./data/example/inputs/photoz_pdfs.hdf5
fiducial_cosmology: ./data/fiducial_cosmology.yml

Expand Down
9 changes: 5 additions & 4 deletions examples/cosmodc2/Cluster_pipelines/config-20deg2-CL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,21 @@ CLClusterShearCatalogs:
redshift_cut_criterion: zmode
redshift_weight_criterion: zmode
redshift_cut_criterion_pdf_fraction: 0.9
subtract_mean_shear: true
subtract_mean_shear: false
coordinate_system: celestial #euclidean or celestial
use_true_shear: true


CLClusterEnsembleProfiles:
#radial bin definition
r_min: 0.2 #in Mpc
r_max: 3.0 #in Mpc
nbins: 4 # number of bins
r_max: 5.0 #in Mpc
nbins: 10 # number of bins
#type of profile
delta_sigma_profile: true
shear_profile: false
magnification_profile: false
coordinate_system: euclidean #euclidean or celestial
coordinate_system: celestial #euclidean or celestial



Expand Down
10 changes: 8 additions & 2 deletions txpipe/data_types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,14 @@ def get_primary_catalog_group(self):

def get_primary_catalog_names(self, true_shear=False):
if true_shear:
shear_cols = ["true_g1", "true_g2", "ra", "dec", "weight"]
rename = {"true_g1": "g1", "true_g2": "g2"}
if self.catalog_type == "metadetect":
shear_cols = ["00/true_g1", "00/true_g2", "00/ra", "00/dec", "00/weight"]
rename = {c: c[3:] for c in shear_cols}
rename["00/true_g1"] = "g1"
rename["00/true_g2"] = "g2"
else:
rename = {"true_g1": "g1", "true_g2": "g2"}
rename = {}
elif self.catalog_type == "metacal":
shear_cols = ["mcal_g1", "mcal_g2", "ra", "dec", "weight"]
rename = {"mcal_g1": "g1", "mcal_g2": "g2"}
Expand Down
Loading

0 comments on commit 3c085bc

Please sign in to comment.