Two-Point

These stages deal with measuring or predicting two-point statistics.

class txpipe.random_cats.TXRandomCat(args, comm=None, aliases=None)[source]

Generate a catalog of randomly positioned points

This accounts for the depth being different in each pixel, but probably does still need updates, and testing.

Inputs:

  • aux_lens_maps: MapsFile

  • mask: MapsFile

  • lens_photoz_stack: QPNOfZFile

  • fiducial_cosmology: FiducialCosmology

Outputs:

  • random_cats: RandomsCatalog

  • binned_random_catalog: RandomsCatalog

  • binned_random_catalog_sub: RandomsCatalog

Parallel: Yes - MPI

Configuration
  • density: (float) Default=100.0.
  • Mstar: (float) Default=23.0.
  • alpha: (float) Default=-1.25.
  • chunk_rows: (int) Default=100000.
  • method: (str) Default=quadrilateral.
  • sample_rate: (float) Default=0.5.
class txpipe.random_cats.TXSubsampleRandoms(args, comm=None, aliases=None)[source]

Randomly subsample the binned random catalog and save catalog This can be used within the 2-point clustering stage for the RR term, to speed up the calculation without losing precision

The subsampling is already run by default in TXRandomCat Use this subclass if you are loading your randoms from elsewhere and need to subsample

Inputs:

  • binned_random_catalog: HDFFile

Outputs:

  • binned_random_catalog_sub: RandomsCatalog

Parallel: Yes - MPI

Configuration
  • chunk_rows: (int) Default=100000.
  • sample_rate: (float) Default=0.5.
class txpipe.twopoint_fourier.TXTwoPointFourier(args, comm=None, aliases=None)[source]

Make Fourier space 3x2pt measurements using NaMaster

This Pipeline Stage computes all auto- and cross-correlations for a list of tomographic bins, including all galaxy-galaxy, galaxy-shear and shear-shear power spectra. Sources and lenses both come from the same shear_catalog and tomography_catalog objects.

The power spectra are computed after deprojecting a number of systematic-dominated modes, represented as input maps.

In the future we will want to include the following generalizations:

  • TODO: specify which cross-correlations in particular to include (e.g. which bin pairs and which source/lens combinations).

  • TODO: include flags for rejected objects. Is this included in the tomography_catalog?

  • TODO: ell-binning is currently static.

Inputs:

  • shear_photoz_stack: QPNOfZFile

  • lens_photoz_stack: QPNOfZFile

  • fiducial_cosmology: FiducialCosmology

  • tracer_metadata: TomographyCatalog

  • lens_maps: MapsFile

  • source_maps: MapsFile

  • density_maps: MapsFile

  • mask: MapsFile

  • source_noise_maps: LensingNoiseMaps

  • lens_noise_maps: ClusteringNoiseMaps

Outputs:

  • twopoint_data_fourier: SACCFile

Parallel: Yes - MPI

Configuration
  • mask_threshold: (float) Default=0.0.
  • flip_g1: (bool) Default=False.
  • flip_g2: (bool) Default=False.
  • cache_dir: (str) Default=./cache/twopoint_fourier.
  • low_mem: (bool) Default=False.
  • deproject_syst_clustering: (bool) Default=False.
  • systmaps_clustering_dir: (str) Default=.
  • ell_min: (int) Default=100.
  • ell_max: (int) Default=1500.
  • n_ell: (int) Default=20.
  • ell_spacing: (str) Default=log.
  • true_shear: (bool) Default=False.
  • analytic_noise: (bool) Default=False.
  • gaussian_sims_factor: (list) Default=[1.0].
  • b0: (float) Default=1.0.
  • do_shear_shear: (bool) Default=True.
  • do_shear_pos: (bool) Default=True.
  • do_pos_pos: (bool) Default=True.
  • compute_theory: (bool) Default=True.
class txpipe.twopoint.TXTwoPoint(args, comm=None, aliases=None)[source]

Make 2pt measurements using TreeCorr

This stage make the full set of cosmic shear, galaxy-galaxy lensing, and galaxy density measurements on the tomographic catalog using TreeCorr.

Results are saved to a sacc file.

Inputs:

  • binned_shear_catalog: ShearCatalog

  • binned_lens_catalog: HDFFile

  • binned_random_catalog: HDFFile

  • binned_random_catalog_sub: HDFFile

  • shear_photoz_stack: QPNOfZFile

  • lens_photoz_stack: QPNOfZFile

  • patch_centers: TextFile

  • tracer_metadata: HDFFile

Outputs:

  • twopoint_data_real_raw: SACCFile

  • twopoint_gamma_x: SACCFile

Parallel: Yes - MPI

Configuration
  • calcs: (list) Default=[0, 1, 2].
  • min_sep: (float) Default=0.5.
  • max_sep: (float) Default=300.0.
  • nbins: (int) Default=9.
  • bin_slop: (float) Default=0.0.
  • sep_units: (str) Default=arcmin.
  • flip_g1: (bool) Default=False.
  • flip_g2: (bool) Default=True.
  • cores_per_task: (int) Default=20.
  • verbose: (int) Default=1.
  • source_bins: (list) Default=[-1].
  • lens_bins: (list) Default=[-1].
  • reduce_randoms_size: (float) Default=1.0.
  • do_shear_shear: (bool) Default=True.
  • do_shear_pos: (bool) Default=True.
  • do_pos_pos: (bool) Default=True.
  • auto_only: (bool) Default=False.
  • var_method: (str) Default=jackknife.
  • use_randoms: (bool) Default=True.
  • low_mem: (bool) Default=False.
  • patch_dir: (str) Default=./cache/patches.
  • chunk_rows: (int) Default=100000.
  • share_patch_files: (bool) Default=False.
  • metric: (str) Default=Euclidean.
  • gaussian_sims_factor: (list) Default=[1.0].
  • use_subsampled_randoms: (bool) Default=True.
class txpipe.twopoint.TXTwoPointPixel(args, comm=None, aliases=None)[source]

This subclass of the standard TXTwoPoint uses maps to compute pixelized versions of the real space correlation functions. This is useful when the number density of the galaxy samples is too high to use random points to sample the mask.

Inputs:

  • density_maps: MapsFile

  • source_maps: MapsFile

  • binned_shear_catalog: ShearCatalog

  • binned_lens_catalog: HDFFile

  • binned_random_catalog: HDFFile

  • shear_photoz_stack: QPNOfZFile

  • lens_photoz_stack: QPNOfZFile

  • patch_centers: TextFile

  • tracer_metadata: HDFFile

  • mask: MapsFile

Outputs:

  • twopoint_data_real_raw: SACCFile

  • twopoint_gamma_x: SACCFile

Parallel: Yes - MPI

Configuration
  • calcs: (list) Default=[0, 1, 2].
  • min_sep: (float) Default=0.5.
  • max_sep: (float) Default=300.0.
  • nbins: (int) Default=9.
  • bin_slop: (float) Default=0.0.
  • sep_units: (str) Default=arcmin.
  • flip_g1: (bool) Default=False.
  • flip_g2: (bool) Default=True.
  • verbose: (int) Default=1.
  • source_bins: (list) Default=[-1].
  • lens_bins: (list) Default=[-1].
  • reduce_randoms_size: (float) Default=1.0.
  • do_shear_shear: (bool) Default=True.
  • do_shear_pos: (bool) Default=True.
  • do_pos_pos: (bool) Default=True.
  • var_method: (str) Default=jackknife.
  • low_mem: (bool) Default=False.
  • patch_dir: (str) Default=./cache/patches.
  • chunk_rows: (int) Default=100000.
  • share_patch_files: (bool) Default=False.
  • metric: (str) Default=Euclidean.
  • use_randoms: (bool) Default=True.
  • auto_only: (bool) Default=False.
  • gaussian_sims_factor: (list) Default=[1.0].
  • use_subsampled_randoms: (bool) Default=False.
class txpipe.twopoint.TXTwoPointPixelExtCross(args, comm=None, aliases=None)[source]

TXTwoPointPixel - External - Cross correlation This subclass of TXTwoPointPixel uses maps to compute cross correlations between the galaxy density maps and an external set of Survey Property (or other contaminant) maps

Inputs:

  • density_maps: MapsFile

  • source_maps: MapsFile

  • binned_shear_catalog: ShearCatalog

  • binned_lens_catalog: HDFFile

  • binned_random_catalog: HDFFile

  • shear_photoz_stack: QPNOfZFile

  • lens_photoz_stack: QPNOfZFile

  • patch_centers: TextFile

  • tracer_metadata: HDFFile

  • mask: MapsFile

Outputs:

  • twopoint_data_ext_cross_raw: SACCFile

Parallel: Yes - MPI

Configuration
  • supreme_path_root: (str) Default=.
  • do_pos_ext: (bool) Default=True.
  • do_shear_ext: (bool) Default=True.
  • calcs: (list) Default=[0, 1, 2].
  • min_sep: (float) Default=0.5.
  • max_sep: (float) Default=300.0.
  • nbins: (int) Default=9.
  • bin_slop: (float) Default=0.0.
  • sep_units: (str) Default=arcmin.
  • flip_g1: (bool) Default=False.
  • flip_g2: (bool) Default=True.
  • verbose: (int) Default=1.
  • source_bins: (list) Default=[-1].
  • lens_bins: (list) Default=[-1].
  • reduce_randoms_size: (float) Default=1.0.
  • do_shear_shear: (bool) Default=False.
  • do_shear_pos: (bool) Default=False.
  • do_pos_pos: (bool) Default=False.
  • var_method: (str) Default=jackknife.
  • low_mem: (bool) Default=False.
  • patch_dir: (str) Default=./cache/patches.
  • chunk_rows: (int) Default=100000.
  • share_patch_files: (bool) Default=False.
  • metric: (str) Default=Euclidean.
  • use_randoms: (bool) Default=True.
  • auto_only: (bool) Default=False.
  • gaussian_sims_factor: (list) Default=[1.0].
  • use_subsampled_randoms: (bool) Default=False.
class txpipe.theory.TXTwoPointTheoryReal(args, comm=None, aliases=None)[source]

Compute theory predictions for real-space 3x2pt measurements. Uses CCL in real space and saves to a sacc file.

Inputs:

  • twopoint_data_real: SACCFile

  • fiducial_cosmology: FiducialCosmology

Outputs:

  • twopoint_theory_real: SACCFile

Parallel: No - Serial

Configuration
  • galaxy_bias: (list) Default=[0.0].
  • smooth: (bool) Default=False.
class txpipe.theory.TXTwoPointTheoryFourier(args, comm=None, aliases=None)[source]

Compute theory predictions for Fourier-space 3x2pt measurements. Also uses CCL and saves to a sacc file

Inputs:

  • twopoint_data_fourier: SACCFile

  • fiducial_cosmology: FiducialCosmology

Outputs:

  • twopoint_theory_fourier: SACCFile

Parallel: No - Serial

Configuration
  • galaxy_bias: (list) Default=[0.0].
  • smooth: (bool) Default=False.
class txpipe.jackknife.TXJackknifeCenters(args, comm=None, aliases=None)[source]

Generate jack-knife centers from random catalogs.

This uses TreeCorr but cuts down the amount of data by taking only every n’th point.

Inputs:

  • random_cats: RandomsCatalog

Outputs:

  • patch_centers: TextFile

  • jk: PNGFile

Parallel: No - Serial

Configuration
  • npatch: (int) Default=10.
  • every_nth: (int) Default=100.
class txpipe.jackknife.TXJackknifeCentersSource(args, comm=None, aliases=None)[source]

Generate jack-knife centers from a shear catalog.

Inputs:

  • shear_catalog: ShearCatalog

Outputs:

  • patch_centers: TextFile

  • jk: PNGFile

Parallel: No - Serial

Configuration
  • npatch: (int) Default=10.
  • every_nth: (int) Default=100.