Skip to content

Commit

Permalink
Merge pull request #319 from LSSTDESC/use-qp
Browse files Browse the repository at this point in the history
Switch to using QP for n(z) information throughout
  • Loading branch information
joezuntz authored Oct 31, 2023
2 parents 010ce36 + c692d04 commit aba4a1a
Show file tree
Hide file tree
Showing 51 changed files with 927 additions and 2,226 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand All @@ -61,7 +61,7 @@ jobs:
needs: Download_Data

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
needs: Download_Data

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
needs: Download_Data

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
needs: Download_Data

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
needs: Download_Data

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/lsstdesc/txpipe:v0.7
image: ghcr.io/lsstdesc/txpipe-dev

steps:
- name: Checkout repository
Expand All @@ -272,7 +272,6 @@ jobs:
ceci --dry-run examples/2.2i/pipeline.yml
ceci --dry-run examples/buzzard/pipeline.yml
ceci --dry-run examples/cosmodc2/pipeline.yml
ceci --dry-run examples/dr1b/pipeline.yml
ceci --dry-run examples/skysim/pipeline.yml
Expand Down
2 changes: 1 addition & 1 deletion docs/make-stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
- TXTwoPointPlotsFourier
- TXConvergenceMapPlots
- TXMapPlots
- TXPhotozPlots
- TXPhotozPlot
Diagnostics:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/stages/Plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Plots

These stages make plots out TXPipe output data

* :py:class:`~txpipe.photoz_stack.TXPhotozPlots` - Make n(z) plots of source and lens galaxies
* :py:class:`~txpipe.photoz_stack.TXPhotozPlot` - Make n(z) plots of source and lens galaxies

* :py:class:`~txpipe.map_plots.TXMapPlots` - Make plots of all the available maps

Expand All @@ -15,7 +15,7 @@ These stages make plots out TXPipe output data



.. autoclass:: txpipe.photoz_stack.TXPhotozPlots
.. autoclass:: txpipe.photoz_stack.TXPhotozPlot
:members:


Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies:
- treecorr=4.3.*
- pip
- pip:
- ceci==1.13
- ceci==1.14
- git+https://github.com/jlvdb/hyperbolic@b88b107a291fa16c2006cf971ce610248d58e94c
- git+https://github.com/joezuntz/dask-mpi@31e35759cfb03780a12ad6ffe2b82279b0fab442
- git+https://github.com/LSSTDESC/[email protected]
Expand Down
46 changes: 38 additions & 8 deletions examples/2.2i/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,44 @@ PZPDFMLZ:
zmax: 3.0
chunk_rows: 100000

TXPhotozStack:
chunk_rows: 100000

# Mock version of stacking:
TXLensTrueNumberDensity:
nz: 301
zmax: 3.0
chunk_rows: 100000

TXPhotozPlotLens:
name: TXPhotozPlotLens
aliases:
photoz_stack: lens_photoz_stack
nz_plot: source_nz

TXPhotozPlotSource:
name: TXPhotozPlotSource
aliases:
photoz_stack: shear_photoz_stack
nz_plot: lens_nz


TXTruePhotozStackSource:
name: TXTruePhotozStackSource
aliases:
tomography_catalog: shear_tomography_catalog
catalog: shear_catalog
weights_catalog: shear_catalog
photoz_stack: shear_photoz_stack
weight_col: metacal/weight
redshift_group: metacal
zmax: 2.0
nz: 201

TXTruePhotozStackLens:
name: TXTruePhotozStackLens
aliases:
tomography_catalog: lens_tomography_catalog
catalog: photometry_catalog
weights_catalog: dummy
photoz_stack: lens_photoz_stack
redshift_group: photometry
zmax: 2.0
nz: 201


TXSourceTrueNumberDensity:
nz: 301
zmax: 3.0
Expand Down Expand Up @@ -147,3 +176,4 @@ TXTruthLensSelector:
i_lo_cut: 17.5
i_hi_cut: 21.9
r_i_cut: 2.0

13 changes: 10 additions & 3 deletions examples/2.2i/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,22 @@ stages:
nprocess: 8
- name: TXTruthLensSelector
nprocess: 32
- name: TXLensTrueNumberDensity
- name: TXTruePhotozStackSource
classname: TXTruePhotozStack
nprocess: 32
nodes: 2
- name: TXSourceTrueNumberDensity
- name: TXTruePhotozStackLens
classname: TXTruePhotozStack
nprocess: 32
nodes: 2
- name: TXTwoPointTheoryReal
nprocess: 1
threads_per_process: 8
- name: TXPhotozPlots
- name: TXPhotozPlotSource
classname: TXPhotozPlot
nprocess: 8
- name: TXPhotozPlotLens
classname: TXPhotozPlot
nprocess: 8
- name: TXSourceMaps
nprocess: 16
Expand Down Expand Up @@ -111,6 +117,7 @@ inputs:
calibration_table: /global/projecta/projectdirs/lsst/groups/WL/users/zuntz/data/2.2i-inputs/sample_cosmodc2_w10year_errors.dat
star_catalog: /global/projecta/projectdirs/lsst/groups/WL/users/zuntz/data/2.2i_dr6/star_catalog.hdf5
exposures: /global/projecta/projectdirs/lsst/groups/WL/users/zuntz/data/2.2i-inputs/exposures.hdf5
dummy: none

resume: True
log_dir: data/2.2i_dr6/logs
Expand Down
4 changes: 3 additions & 1 deletion examples/2.2i/pipeline_1tract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ stages:
- name: TXTruthLensSelector
- name: TXLensCatalogSplitter
- name: TXPhotozSourceStack
classname: TXPhotozStack
- name: TXPhotozLensStack
- name: TXPhotozPlots
classname: TXPhotozStack
- name: TXPhotozPlot
- name: TXSourceMaps
- name: TXLensMaps
- name: TXAuxiliarySourceMaps
Expand Down
27 changes: 27 additions & 0 deletions examples/cosmodc2/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,29 @@ TXIngestRedmagic:
lens_zbin_edges: [0.15, 0.3, 0.45, 0.6, 0.75, 0.9]

TXSourceTrueNumberDensity:
name: TXSourceTrueNumberDensity
nz: 601
zmax: 3.0
chunk_rows: 100000
aliases:
tomography_catalog: shear_tomography_catalog
catalog: shear_catalog
weights_catalog: shear_catalog
photoz_stack: shear_photoz_stack
weight_col: metacal/weight
redshift_group: metacal

TXLensTrueNumberDensity:
name: TXLensTrueNumberDensity
nz: 601
zmax: 3.0
chunk_rows: 100000
aliases:
tomography_catalog: lens_tomography_catalog
catalog: photometry_catalog
weights_catalog: none
photoz_stack: lens_photoz_stack
redshift_group: photometry

TXLensMaps:
chunk_rows: 100000
Expand Down Expand Up @@ -184,3 +199,15 @@ TXTruthLensSelector:
i_lo_cut: 17.5
i_hi_cut: 21.9
r_i_cut: 2.0

TXPhotozPlotLens:
name: TXPhotozPlotLens
aliases:
photoz_stack: lens_photoz_stack
nz_plot: lens_nz

TXPhotozPlotSource:
name: TXPhotozPlotSource
aliases:
photoz_stack: shear_photoz_stack
nz_plot: source_nz
2 changes: 1 addition & 1 deletion examples/cosmodc2/pipeline-20deg2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stages:
nprocess: 32
- name: TXLensTrueNumberDensity
- name: TXSourceTrueNumberDensity
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXShearCalibration
nprocess: 32
- name: TXTruthLensCatalogSplitter
Expand Down
9 changes: 7 additions & 2 deletions examples/cosmodc2/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ stages:
- name: TXTruthLensSelector
nprocess: 32
- name: TXLensTrueNumberDensity
classname: TXTruePhotozStack
- name: TXSourceTrueNumberDensity
- name: TXPhotozPlots
classname: TXTruePhotozStack
- name: TXPhotozPlotSource
classname: TXPhotozPlot
- name: TXPhotozPlotLens
classname: TXPhotozPlot
- name: TXShearCalibration
- name: TXTruthLensCatalogSplitter
- name: TXTwoPointFourier
Expand Down Expand Up @@ -83,7 +88,7 @@ inputs:
photoz_trained_model: /global/projecta/projectdirs/lsst/groups/WL/users/zuntz/data/cosmoDC2-1.1.4_oneyear_unit_response/cosmoDC2_trees_i25.3.npy
fiducial_cosmology: data/fiducial_cosmology.yml
calibration_table: /global/projecta/projectdirs/lsst/groups/WL/users/zuntz/data/cosmoDC2-1.1.4_oneyear_unit_response/sample_cosmodc2_w10year_errors.dat

none: none

resume: True
log_dir: data/cosmodc2/logs
Expand Down
2 changes: 1 addition & 1 deletion examples/cosmodc2/pipeline_redmagic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ stages:
nprocess: 5
nodes: 1
- name: TXSourceTrueNumberDensity
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXJackknifeCenters
- name: TXMapPlots
- name: TXTracerMetadata
Expand Down
2 changes: 1 addition & 1 deletion examples/cosmodc2/pipeline_redmagic_full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ stages:
nprocess: 5
nodes: 1
- name: TXSourceTrueNumberDensity
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXJackknifeCenters
- name: TXMapPlots
- name: TXTracerMetadata
Expand Down
2 changes: 1 addition & 1 deletion examples/cosmodc2/pipeline_redmagic_no_shape_noise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ stages:
nprocess: 5
nodes: 1
- name: TXSourceTrueNumberDensity
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXJackknifeCenters
- name: TXMapPlots
- name: TXTracerMetadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ stages:
nprocess: 64
nodes: 2
- name: TXSourceTrueNumberDensity
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXJackknifeCenters
- name: TXMapPlots
- name: TXTracerMetadata
Expand Down
4 changes: 2 additions & 2 deletions examples/desy1/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ global:
# TXShearCalibration
# TXTruthLensCatalogSplitter
# TXStarCatalogSplitter
# TXPhotozPlots
# TXPhotozPlot
# TXSourceMaps
# TXLensMaps
# TXAuxiliarySourceMaps
Expand Down Expand Up @@ -64,7 +64,7 @@ TXSourceSelectorMetacal:
TXShearCalibration: {}
TXTruthLensCatalogSplitter: {}
TXStarCatalogSplitter: {}
TXPhotozPlots: {}
TXPhotozPlot: {}

TXSourceMaps:
sparse: True # Generate sparse maps - faster if using small areas
Expand Down
2 changes: 1 addition & 1 deletion examples/desy1/desy1_input_pz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ modules: txpipe
stages:
- name: TXSelector
nprocess: 1
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXDiagnosticMaps
nprocess: 1
- name: TXRandomCat
Expand Down
2 changes: 1 addition & 1 deletion examples/desy1/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
- name: TXShearCalibration # Calibrate and split the source sample tomographically
- name: TXTruthLensCatalogSplitter
- name: TXStarCatalogSplitter # Split the star catalog into separate bins (psf/non-psf)
- name: TXPhotozPlots
- name: TXPhotozPlot
- name: TXSourceMaps
#nprocess: 6
#threads_per_process: 1
Expand Down
2 changes: 1 addition & 1 deletion examples/dp0.2/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ stages:
- name: TXDensityMaps
- name: TXRealGaussianCovariance
threads_per_process: 32
- name: TXPhotozPlots
- name: TXPhotozPlot

# Where to put outputs
output_dir: data/dp0.2/outputs
Expand Down
Loading

0 comments on commit aba4a1a

Please sign in to comment.