Maps
These stages deal with making different kinds of maps for analysis and plotting.
TXBaseMaps- A base class for mapping stagesTXSourceMaps- Generate source maps directly from binned, calibrated shear catalogs.TXLensMaps- Make tomographic lens number count mapsTXExternalLensMaps- Make tomographic lens number count maps from external dataTXDensityMaps- Convert galaxy count maps to overdensity delta mapsTXSourceNoiseMaps- Generate realizations of shear noise maps with random rotationsTXLensNoiseMaps- Generate lens density noise realizations using random splitsTXExternalLensNoiseMaps- Generate lens density noise realizations using random splits of an external catalogTXNoiseMapsJax- Generate noise realisations of lens and source maps using JAXTXAuxiliarySourceMaps- Stage TXAuxiliarySourceMapsTXAuxiliaryLensMaps- Generate auxiliary maps from the lens catalogTXUniformDepthMap- Generate a uniform depth map from the maskTXSimpleMask- Make a simple binary mask using a depth cut and bright object cutTXSimpleMaskFrac- Make a simple mask using a depth cut and bright object cutTXConvergenceMaps- Make a convergence map from a source map using Kaiser-SquiresTXMapCorrelations- Plot shear, density, and convergence correlations with survey property maps
- class txpipe.maps.TXBaseMaps(args, comm=None, aliases=None)[source]
A base class for mapping stages
This is an abstract base class, which other subclasses inherit from to use the same basic structure, which is: - select pixelization - prepare some mapper objects - iterate through selected columns - update each mapper with each chunk - finalize the mappers - save the maps
Inputs: None
Outputs: None
Parallel: Yes - MPI
Configuration
- class txpipe.maps.TXSourceMaps(args, comm=None, aliases=None)[source]
Generate source maps directly from binned, calibrated shear catalogs.
This implementation uses DASK, which offers a numpy-like syntax and hides the complicated parallelization details.
Inputs:
binned_shear_catalog: HDFFile
Outputs:
source_maps: MapsFile
Parallel: Yes - Dask
Configuration
- block_size: (int) Default=0.
- chunk_rows: (int) Default=100000.
- pixelization: (str) Default=healpix.
- nside: (int) Default=0.
- sparse: (bool) Default=True.
- ra_cent: (float) Default=nan.
- dec_cent: (float) Default=nan.
- npix_x: (int) Default=-1.
- npix_y: (int) Default=-1.
- pixel_size: (float) Default=nan.
- class txpipe.maps.TXLensMaps(args, comm=None, aliases=None)[source]
Make tomographic lens number count maps
Uses photometry and lens tomography catalogs.
Density maps are made later once masks are generated.
Inputs:
photometry_catalog: HDFFile
lens_tomography_catalog: TomographyCatalog
Outputs:
lens_maps: MapsFile
Parallel: Yes - Dask
Configuration
- block_size: (int) Default=0.
- chunk_rows: (int) Default=100000.
- pixelization: (str) Default=healpix.
- nside: (int) Default=0.
- sparse: (bool) Default=True.
- ra_cent: (float) Default=nan.
- dec_cent: (float) Default=nan.
- npix_x: (int) Default=-1.
- npix_y: (int) Default=-1.
- pixel_size: (float) Default=nan.
- class txpipe.maps.TXExternalLensMaps(args, comm=None, aliases=None)[source]
Make tomographic lens number count maps from external data
Same as TXLensMaps except it reads from an external lens catalog.
Inputs:
lens_catalog: HDFFile
lens_tomography_catalog: TomographyCatalog
Outputs:
lens_maps: MapsFile
Parallel: Yes - Dask
Configuration
- block_size: (int) Default=0.
- chunk_rows: (int) Default=100000.
- pixelization: (str) Default=healpix.
- nside: (int) Default=0.
- sparse: (bool) Default=True.
- ra_cent: (float) Default=nan.
- dec_cent: (float) Default=nan.
- npix_x: (int) Default=-1.
- npix_y: (int) Default=-1.
- pixel_size: (float) Default=nan.
- class txpipe.maps.TXDensityMaps(args, comm=None, aliases=None)[source]
Convert galaxy count maps to overdensity delta maps
delta = ngal / (weight * <ngal>/<weight>) - 1
This has to be separate from the lens mappers above because it requires the mask, which is created elsewhere (right now in masks.py)
Inputs:
lens_maps: MapsFile
mask: MapsFile
Outputs:
density_maps: MapsFile
Parallel: No - Serial
Configuration
- mask_threshold: (float) Default=0.0.
- class txpipe.noise_maps.TXSourceNoiseMaps(args, comm=None, aliases=None)[source]
Generate realizations of shear noise maps with random rotations
This takes the shear catalogs and tomography and randomly spins the shear values in it, removing the shear signal and leaving only shape noise
Inputs:
shear_catalog: ShearCatalog
shear_tomography_catalog: TomographyCatalog
mask: MapsFile
Outputs:
source_noise_maps: LensingNoiseMaps
Parallel: Yes - MPI
Configuration
- chunk_rows: (int) Default=100000.
- lensing_realizations: (int) Default=30.
- true_shear: (bool) Default=False.
- class txpipe.noise_maps.TXLensNoiseMaps(args, comm=None, aliases=None)[source]
Generate lens density noise realizations using random splits
This randomly assigns each galaxy to one of two bins and uses the different between the halves to get a noise estimate.
Inputs:
lens_tomography_catalog: TomographyCatalog
photometry_catalog: HDFFile
mask: MapsFile
Outputs:
lens_noise_maps: ClusteringNoiseMaps
Parallel: Yes - MPI
Configuration
- chunk_rows: (int) Default=100000.
- clustering_realizations: (int) Default=1.
- mask_in_weights: (bool) Default=False.
- class txpipe.noise_maps.TXExternalLensNoiseMaps(args, comm=None, aliases=None)[source]
Generate lens density noise realizations using random splits of an external catalog
This randomly assigns each galaxy to one of two bins and uses the different between the halves to get a noise estimate.
Inputs:
lens_tomography_catalog: TomographyCatalog
lens_catalog: HDFFile
mask: MapsFile
Outputs:
lens_noise_maps: ClusteringNoiseMaps
Parallel: Yes - MPI
Configuration
- chunk_rows: (int) Default=100000.
- clustering_realizations: (int) Default=1.
- mask_in_weights: (bool) Default=False.
- class txpipe.noise_maps.TXNoiseMapsJax(args, comm=None, aliases=None)[source]
Generate noise realisations of lens and source maps using JAX
This is a JAX/GPU version of the noise map stages.
Need to update to stop assuming lens and source are the same and split into two stages.
Inputs:
shear_catalog: ShearCatalog
lens_tomography_catalog: TomographyCatalog
shear_tomography_catalog: TomographyCatalog
mask: MapsFile
lens_maps: MapsFile
Outputs:
source_noise_maps: LensingNoiseMaps
lens_noise_maps: ClusteringNoiseMaps
Parallel: Yes - MPI
Configuration
- chunk_rows: (int) Default=4000000.
- lensing_realizations: (int) Default=30.
- clustering_realizations: (int) Default=1.
- seed: (int) Default=0.
- class txpipe.auxiliary_maps.TXAuxiliarySourceMaps(args, comm=None, aliases=None)[source]
Stage TXAuxiliarySourceMaps
Inputs:
shear_catalog: ShearCatalog
shear_tomography_catalog: HDFFile
source_maps: MapsFile
Outputs:
aux_source_maps: MapsFile
Parallel: Yes - Dask
Configuration
- block_size: (int) Default=0.
- flag_exponent_max: (int) Default=8.
- psf_prefix: (str) Default=psf_.
- chunk_rows: (int) Default=100000.
- pixelization: (str) Default=healpix.
- nside: (int) Default=0.
- sparse: (bool) Default=True.
- ra_cent: (float) Default=nan.
- dec_cent: (float) Default=nan.
- npix_x: (int) Default=-1.
- npix_y: (int) Default=-1.
- pixel_size: (float) Default=nan.
- class txpipe.auxiliary_maps.TXAuxiliaryLensMaps(args, comm=None, aliases=None)[source]
Generate auxiliary maps from the lens catalog
- This class generates maps of:
depth
bright object counts
Inputs:
photometry_catalog: HDFFile
Outputs:
aux_lens_maps: MapsFile
Parallel: Yes - Dask
Configuration
- block_size: (int) Default=0.
- bright_obj_threshold: (float) Default=22.0.
- depth_band: (str) Default=i.
- snr_threshold: (float) Default=10.0.
- snr_delta: (float) Default=1.0.
- class txpipe.auxiliary_maps.TXUniformDepthMap(args, comm=None, aliases=None)[source]
Generate a uniform depth map from the mask
This is useful for testing on uniform patches. It doesn’t generate all the other maps that the other stages that make aux_lens_maps do, so may not always be useful.
Inputs:
mask: MapsFile
Outputs:
aux_lens_maps: MapsFile
Parallel: No - Serial
Configuration
- depth: (float) Default=25.0.
- class txpipe.masks.TXSimpleMask(args, comm=None, aliases=None)[source]
Generate a simple binary mask using cuts on depth and bright object maps.
Inputs:
aux_lens_maps: MapsFile
Outputs:
mask: MapsFile
Parallel: No - Serial
Configuration
- depth_cut: (float) Default=23.5.
- bright_object_max: (float) Default=10.0.
- class txpipe.masks.TXSimpleMaskSource(args, comm=None, aliases=None)[source]
Generate a binary mask for source galaxies using positive lensing weights across source bins.
Inputs:
source_maps: MapsFile
Outputs:
mask: MapsFile
Parallel: No - Serial
Configuration
- class txpipe.masks.TXSimpleMaskFrac(args, comm=None, aliases=None)[source]
Make a simple mask using a depth cut and bright object cut Include the fractional coverage of each pixel using a high-res survey property map (e.g. N-exposures for given band(s) )
#NOTE: This assumes all cuts to the mask are being done within TXpipe at the config Nside #if we want to apply cuts on the survey property map nside (potentially higher resolution), we will need to add this feature
Inputs:
aux_lens_maps: MapsFile
Outputs:
mask: MapsFile
Parallel: No - Serial
Configuration
- depth_cut: (float) Default=23.5.
- bright_object_max: (float) Default=10.0.
- supreme_map_file: (str) Required.
- class txpipe.convergence.TXConvergenceMaps(args, comm=None, aliases=None)[source]
Make a convergence map from a source map using Kaiser-Squires
This uses the wlmassmap library, which is included as a submodule in TXPipe.
Inputs:
source_maps: MapsFile
Outputs:
convergence_maps: MapsFile
Parallel: No - Serial
Configuration
- lmax: (int) Default=0.
- smoothing_sigma: (float) Default=10.0.
- class txpipe.map_correlations.TXMapCorrelations(args, comm=None, aliases=None)[source]
Plot shear, density, and convergence correlations with survey property maps
The Supreme code generates survey property maps; this stage makes plots of the correlations with those maps with a simple linear fit.
Since the Supreme maps are loaded from a directory, outside the pipeline, we don’t know in advance what plots will be generated, so the formal output is a directory.
Inputs:
lens_maps: MapsFile
convergence_maps: MapsFile
source_maps: MapsFile
mask: MapsFile
Outputs:
map_systematic_correlations: FileCollection
Parallel: No - Serial
Configuration
- supreme_path_root: (str) Default=/global/cscratch1/sd/erykoff/dc2_dr6/supreme/supreme_dc2_dr6d_v2.
- nbin: (int) Default=20.
- outlier_fraction: (float) Default=0.05.