Skip to content
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

Issue #311 create cl make bin stage #314

Merged
merged 25 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
63b671c
Created config and pipeline placeholder files for CL Pipeline
marina-ricci Jul 19, 2023
557c225
Created placeholder files to run full CL pipeline
marina-ricci Jul 19, 2023
ab4e393
Merge branch 'master' of https://github.com/LSSTDESC/TXPipe into issu…
marina-ricci Jul 19, 2023
934c643
Merge branch 'master' of https://github.com/LSSTDESC/TXPipe into issu…
marina-ricci Jul 20, 2023
1d82e90
added placeholders
marina-ricci Jul 20, 2023
b4f2099
Make cl related import explicit
marina-ricci Jul 20, 2023
4b80cb5
Initial cluster binning stage
marina-ricci Jul 20, 2023
1e98fb2
small modif to cluster bin stage
marina-ricci Jul 21, 2023
90d7019
finalized CLbinning stage
marina-ricci Jul 22, 2023
4e84956
Change filename
marina-ricci Jul 22, 2023
b2a3f06
added imports
marina-ricci Jul 22, 2023
ad86998
update notebook?
marina-ricci Oct 17, 2023
74f260c
Merge branch 'master' of https://github.com/LSSTDESC/TXPipe into issu…
marina-ricci Oct 17, 2023
bbd3f62
add rlens in the import to not break test
marina-ricci Oct 17, 2023
68fad00
make NERSC vs CC more clear
marina-ricci Oct 18, 2023
c3d1b70
small modif notebook
marina-ricci Oct 18, 2023
737f6fb
separated the in2p3 vs. the nersc yml versions for the 1deg2-cl so th…
cavestruz Oct 19, 2023
1924ac3
separated the in2p3 vs. the nersc yml versions for the 20deg2-cl so t…
cavestruz Oct 19, 2023
7eb84e9
added minor comment/uncomment lines and markdown text to disambiguate…
cavestruz Oct 19, 2023
3169a04
corrected file name in sub files
marina-ricci Oct 19, 2023
5fc4bf2
corrected typos in pipeline files
marina-ricci Oct 19, 2023
f26c32e
corrected config file for 20deg2, now exact same as 1de2
marina-ricci Oct 19, 2023
47183c1
updated notebook to clarify jupyer vs pipeline process
marina-ricci Oct 19, 2023
0ef05ee
remove old png
marina-ricci Oct 19, 2023
4d18014
Rename Run_CL_pipeline.ipynb to Run_CL_counts_pipeline.ipynb
marina-ricci Oct 19, 2023
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
Binary file added 20deg2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CL_pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions examples/cosmodc2/1deg2-in2p3.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/bash
#SBATCH --time=01:00:00
#SBATCH --partition=hpc
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=128000

source /pbs/throng/lsst/users/jzuntz/txpipe-environments/setup-txpipe
ceci examples/cosmodc2/pipeline-1deg2-CL.yml
11 changes: 11 additions & 0 deletions examples/cosmodc2/1deg2-nersc.sub
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this submission in NERSC.

sbatch examples/cosmodc2/1deg2-nersc.sub

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
#SBATCH -A m1727
#SBATCH -C cpu
#SBATCH --qos=debug
#SBATCH --time=00:30:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32

source $CFS/lsst/groups/WL/users/zuntz/setup-txpipe

tx ceci examples/cosmodc2/pipeline-1deg2-clmm-nersc.yml
87 changes: 87 additions & 0 deletions examples/cosmodc2/config-1deg2-CL.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this file to two separate config-1deg2-CL-{in2p3,nersc}.yml and put each option in the notebook, Run_CL_pipeline.ipynb so the comment/uncommenting happens at the notebook level as opposed to inside the yml file.

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
TXSourceSelectorMetadetect:
input_pz: False
bands: riz #used for selection
T_cut: 0.5
s2n_cut: 10.0
max_rows: 1000
delta_gamma: 0.02
source_zbin_edges: [0.1, 3.0]
chunk_rows: 100000
true_z: False
shear_prefix: ''

Inform_BPZ_lite:
aliases:
input: spectroscopic_catalog
model: photoz_model
zmin: 0.0
zmax: 3.0
nzbins: 301
columns_file: ./data/bpz_riz.columns
data_path: ./data/example/rail-bpz-inputs
spectra_file: CWWSB4.list
prior_band: i
ref_band: i
# Not sure about this
prior_file: hdfn_gen
p_min: 0.005
gauss_kernel: 0.0
mag_err_min: 0.005
inform_options: {'save_train': False, 'load_model': False, 'modelfile': 'BPZpriormodel.out'}
madau_reddening: no
bands: riz
zp_errors: [0.01, 0.01, 0.01]
hdf5_groupname: photometry



BPZ_lite:
aliases:
model: photoz_model
input: shear_catalog
output: source_photoz_pdfs
zmin: 0.0
zmax: 3.0
dz: 0.01
nzbins: 301
data_path: ./data/example/rail-bpz-inputs
bands: [mag_r, mag_i, mag_z]
err_bands: [mag_err_r, mag_err_i, mag_err_z]
hdf5_groupname: shear/00
nondetect_val: .inf
columns_file: ./data/bpz_riz.columns
spectra_file: CWWSB4.list
ref_band: mag_i
prior_file: hdfn_gen
p_min: 0.005
gauss_kernel: 0.0
zp_errors: [0.01, 0.01, 0.01]
mag_err_min: 0.005
madau_reddening: false
mag_limits:
mag_r: 29.06
mag_i: 28.62
mag_z: 27.98

CLClusterBinningRedshiftRichness:
zedge : [0.1, 0.4, 0.6, 0.8]
richedge : [5., 10., 20.,25.]

CLClusterShearCatalogs:
max_radius: 5.0 # Mpc
delta_z: 0.2 # redshift buffer

CLClusterEnsembleProfiles:
#radial bin definition
r_min : 0.2 #in Mpc
r_max : 5.0 #in Mpc
#type of profile
delta_sigma_profile : True
shear_profile : False
magnification_profile : False
#stacking step or not
stack_profile : True




Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made minor change here, so there are separate yaml files depending on where the user is running the notebook.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this out now with the squeue submission. Will then check if latter portion of notebook runs on NERSC with the output of the 20deg2 submission that uses this yaml file.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,27 @@ BPZ_lite:
mag_i: 28.62
mag_z: 27.98

CLClusterBinning:
z_min : 0
z_max : 1.2
lambda_min : 5
lambda_max : 1e3

CLClusterShearCatalogs:
max_radius: 5.0 # Mpc
delta_z: 0.2 # redshift buffer

CLClusterEnsembleProfiles:
#radial bin definition
r_min : 0.2 #in Mpc
r_max : 5.0 #in Mpc
#type of profile
delta_sigma_profile : True
shear_profile : False
magnification_profile : False
#stacking step or not
stack_profile : True




57 changes: 57 additions & 0 deletions examples/cosmodc2/pipeline-1deg2-CL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#this step depends on where you run
#for CCin2p3
site:
name: cc-parallel
mpi_command: "mpirun -n"

#for NERSC
#site:
# name: cori-batch
# image: ghcr.io/lsstdesc/txpipe-dev


#all the following steps should not depend on where you run
launcher:
name: mini
interval: 3.0

modules: >
txpipe
rail.estimation.algos.bpz_lite

python_paths: []

stages:
- name: TXSourceSelectorMetadetect
nprocess: 1
- name: Inform_BPZ_lite
nprocess: 1
- name: BPZ_lite
nprocess: 1
- name: CLClusterBinningRedshiftRichness
nprocess: 1
- name: CLClusterShearCatalogs
nprocess: 1
# - name: CLClusterEnsembleProfiles
# nprocess: 1
# - name: CLClusterDataVector
# nprocess: 1



output_dir: data/cosmodc2/outputs-1deg2-CL
config: examples/cosmodc2/config-1deg2-CL.yml

inputs:
# See README for paths to download these files
shear_catalog: ./data/example/inputs/metadetect_shear_catalog.hdf5
photometry_catalog: ./data/example/inputs/photometry_catalog.hdf5
fiducial_cosmology: data/fiducial_cosmology.yml
calibration_table: ./data/example/inputs/sample_cosmodc2_w10year_errors.dat
spectroscopic_catalog: ./data/example/inputs/mock_spectroscopic_catalog.hdf5
cluster_catalog: ./data/example/inputs/cluster_catalog.hdf5

resume: True
log_dir: data/cosmodc2/logs
pipeline_log: data/cosmodc2/log_1deg2.txt

Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
launcher:
name: mini
interval: 3.0

#this step depends on where you run
#for CCin2p3
site:
name: cc-parallel
mpi_command: "mpirun -n"

#for NERSC
#site:
# name: cori-batch
# image: ghcr.io/lsstdesc/txpipe-dev


#all the following steps should not depend on where you run
launcher:
name: mini
interval: 3.0
modules: >
txpipe
rail.estimation.algos.bpz_lite
Expand All @@ -20,13 +27,19 @@ stages:
nprocess: 1
- name: BPZ_lite
nprocess: 30
- name: CLClusterBinning
nprocess: 1
- name: CLClusterShearCatalogs
nprocess: 30
- name: CLClusterEnsembleProfiles
nprocess: 30
- name: CLClusterDataVector
nprocess: 1



output_dir: data/cosmodc2/outputs-20deg2
config: examples/cosmodc2/config-20deg2-clmm.yml
output_dir: data/cosmodc2/outputs-20deg2-CL
config: examples/cosmodc2/config-20deg2-CL.yml

inputs:
# See README for paths to download these files
Expand All @@ -39,5 +52,5 @@ inputs:

resume: True
log_dir: data/cosmodc2/logs
pipeline_log: data/cosmodc2/log.txt
pipeline_log: data/cosmodc2/log_20deg2.txt

43 changes: 0 additions & 43 deletions examples/cosmodc2/pipeline-20deg2-clmm-nersc.yml

This file was deleted.

Loading
Loading