Calibration and Splitting

These stages deal with calibrating shear and splitting up catalogs into sub-catalogs.

class txpipe.lens_selector.TXLensCatalogSplitter(*args: Any, **kwargs: Any)[source]

Split a lens catalog file into a new file with separate bins

Splitting up like this helps reduce memory usage in TreeCorr later

class txpipe.lens_selector.TXExternalLensCatalogSplitter(*args: Any, **kwargs: Any)[source]

Split an external lens catalog into bins

Implemented as a subclass of TXLensCatalogSplitter, and changes only file names.

class txpipe.twopoint_null_tests.TXStarCatalogSplitter(*args: Any, **kwargs: Any)[source]

Split a star catalog into bright and dim stars

class txpipe.calibrate.TXShearCalibration(*args: Any, **kwargs: Any)[source]

Split the shear catalog into calibrated bins

This class runs after source selection has been done, because the final calibration factor can only be estimated once we have read the entire catalog and chosen tomographic bins (since it is an ensemble average of cal factors).

Once that stage has run and computed both the tomographic bin for each sample and the calibration factors, this stage takes the full catalog and splits it into one HDF5 group per bin. This has several advantages: - all the calibration can happen in one place rather than

differently in real space and Fourier

  • we can load just the galaxies we want for a single bin in later TreeCorr stages, rather than loading the full catalog and then splitting and calibrating it.

  • the low_mem option in TreeCorr can be used because the catalogs are on disc and contiguous.

  • it opens up other memory saving options planned for TreeCorr.

We are not (yet) saving per-patch catalogs for TreeCorr here. We might want to do that later.