Maps
These stages deal with making different kinds of maps for analysis and plotting.
TXBaseMaps
- A base class for mapping stagesTXSourceMaps
- Make tomographic shear mapsTXLensMaps
- Make tomographic lens number count mapsTXExternalLensMaps
- Make tomographic lens number count maps from external dataTXMainMaps
- Make both shear and number count mapsTXDensityMaps
- 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
- Generate auxiliary maps from the source catalogTXAuxiliaryLensMaps
- 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 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: Any, **kwargs: Any)[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
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- choose_pixel_scheme()[source]
Subclasses can override to instead load pixelization from an existing map
- class txpipe.maps.TXSourceMaps(*args: Any, **kwargs: Any)[source]
Make tomographic shear maps
Make g1, g2, var(g1), var(g2), and lensing weight maps from shear catalogs and tomography.
Should be replaced to use the binned_shear_catalog since that’s calibrated already.
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- class txpipe.maps.TXLensMaps(*args: Any, **kwargs: Any)[source]
Make tomographic lens number count maps
Uses photometry and lens tomography catalogs.
Density maps are made later once masks are generated.
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- class txpipe.maps.TXExternalLensMaps(*args: Any, **kwargs: Any)[source]
Make tomographic lens number count maps from external data
Same as TXLensMaps except it reads from an external lens catalog.
- class txpipe.maps.TXMainMaps(*args: Any, **kwargs: Any)[source]
Make both shear and number count maps
Combined source and photometric lens maps, from the same photometry catalog. This might be slightly faster than running two maps separately, but it only works if the source and lens catalogs are the same set of objects. Otherwise use TXSourceMaps and TXLensMaps.
- class txpipe.maps.TXDensityMaps(*args: Any, **kwargs: Any)[source]
Convert galaxy count maps to overdensity delta maps
delta = (ngal - <ngal>) / <ngal>
This has to be separate from the lens mappers above because it requires the mask, which is created elsewhere (right now in masks.py)
- class txpipe.noise_maps.TXSourceNoiseMaps(*args: Any, **kwargs: Any)[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
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- choose_pixel_scheme()[source]
Subclasses can override to instead load pixelization from an existing map
- class txpipe.noise_maps.TXLensNoiseMaps(*args: Any, **kwargs: Any)[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.
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- choose_pixel_scheme()[source]
Subclasses can override to instead load pixelization from an existing map
- class txpipe.noise_maps.TXExternalLensNoiseMaps(*args: Any, **kwargs: Any)[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.
- class txpipe.noise_maps.TXNoiseMapsJax(*args: Any, **kwargs: Any)[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.
- class txpipe.auxiliary_maps.TXAuxiliarySourceMaps(*args: Any, **kwargs: Any)[source]
Generate auxiliary maps from the source catalog
This stage makes maps of: - the count of different flag values - the mean PSF
These are currently only used for making visualizations in the later TXMapPlots stage, and are not otherwise used directly.
Like most of the mapping stages it inherits most behavior from the TXBaseMaps parent class, which specifies the primary run method. This is because most mapper classes have the same overall structure. See that class for more details.
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- choose_pixel_scheme()[source]
Subclasses can override to instead load pixelization from an existing map
- class txpipe.auxiliary_maps.TXAuxiliaryLensMaps(*args: Any, **kwargs: Any)[source]
Generate auxiliary maps from the lens catalog
- This class generates maps of:
depth
psf
bright object counts
flags
- accumulate_maps(pixel_scheme, data, mappers)[source]
Subclasses must override to supply the next chunk “data” to their mappers
- choose_pixel_scheme()[source]
Subclasses can override to instead load pixelization from an existing map
- class txpipe.auxiliary_maps.TXUniformDepthMap(*args: Any, **kwargs: Any)[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.
- class txpipe.masks.TXSimpleMask(*args: Any, **kwargs: Any)[source]
Make a simple binary mask using a depth cut and bright object cut
- class txpipe.convergence.TXConvergenceMaps(*args: Any, **kwargs: Any)[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.
- class txpipe.map_correlations.TXMapCorrelations(*args: Any, **kwargs: Any)[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.