Maps Files
Various TXPipe stages generate maps of different kinds. They should be written and read using the MapsFile class, or, for the noise maps, a subclass.
The general HDF5 structure of a TXPipe map file is:
Group |
Name |
Kind |
Meaning |
|
|---|---|---|---|---|
maps |
map_name |
pixel |
1D int64 |
|
maps |
map_name |
value |
1D float64 |
|
… |
The pixel index and value sparsely store the map, and metadata in the maps/map_name.attrs group stores the pixelization information (nside integer and nest bool).
Specific map file types are described below.
Mask
A map of the mask quantifying coverage for each pixel. There are several ways to do this, and we do not have a final candidate method yet. We are currently using either binary masks or fraction detection masks. The name is just:
mask
Source maps
Maps of source sample properties. All the maps are named in the form {name}_{bin} where bin is the tomographic bin number, starting at zero, or the string “2D” for a non-tomographic sample. The names are:
count_{bin}: the number of selected source galaxiesg1_{bin}: the weighted mean g1 shear in the pixel, in whatever coordinate system is provided in the input catalogsg2_{bin}: the weighted mean g2 shear in the pixel, in whatever coordinate system is provided in the input catalogslensing_weight_{bin}: the total weight of the source galaxies in the pixelvar_g1_{bin}: the weighted variance in g1var_g2_{bin}: the weighted variance in g2var_e_{bin}: the weighted mean of \((g1^2 + g2^2)/2\)
Auxiliary Source Maps
Auxiliary maps related to the source sample. There are two sub-groups of maps, “psf” and “flags”.
The PSF maps exactly match the source maps, but are for galaxy PSF shape values (note this is not the same as star PSF values) in the pixel. There is some redundancy here with the source maps. So the names are:
psf/count_{bin}: the number of selected source galaxiespsf/g1_{bin}: the weighted mean g1 PSF shear in the pixel, in whatever coordinate system is provided in the input catalogspsf/g2_{bin}: the weighted mean g2 PSF shear in the pixel, in whatever coordinate system is provided in the input catalogspsf/lensing_weight_{bin}: the total weight of the source galaxies in the pixelpsf/var_g1_{bin}: the weighted variance in PSF g1psf/var_g2_{bin}: the weighted variance in PSF g2psf/var_{bin}: the weighted mean of PSF \((g1^2 + g2^2)/2\)
The flag maps are of the form:
- flags/flag_{i}
where i is the flag value, which are 1, 2, 4, 8, 16, 32, etc, stored as powers of two because the flags are bitwise. The value is the number of galaxies in the pixel with that flag set.
Lens maps
Maps of the lens sample properties, in the same format as the source maps. The names are:
ngal_{bin}: the number of selected lens galaxiesweighted_ngal_{bin}: the weighted number of selected lens galaxies (the total weight of the selected galaxies in the pixel)
Density maps
The density map file stores the computed over-density in each pixel, accounting for the mask. This is the quantity that is used in the 2pt calculation. It is stored as:
delta_{bin}
The value is given by \(\frac{N^g_p}{M_p} \cdot \frac{\bar{M}}{\bar{N}} - 1\) where \(N^g_{p}\) is the weighted number of galaxies in pixel p, \(M_p\) is the mask value in pixel p, \(\bar{M}\) is the mean mask value, and \(\bar{N}\) is the mean number of galaxies per pixel.
Auxiliary Lens Maps
The auxiliary lens maps contain information related to the lens sample. The names are:
bright_objects/count: a count of the number of bright objects in the pixeldepth/depth: the mean magnitude at 5 sigma signal-to-noise in the pixel in a reference banddepth/depth_var: the variance in depth
Convergence Maps
The reconstructed convergence in each pixel, in the form:
/maps/kappa_E_{bin}: The E-mode convergence in each pixel/maps/kappa_B_{bin}: The B-mode convergence in each pixel
LSS Weight Maps
Systematics weights calculated using a regression or similar method and used to generate the weights.
/maps/weight_map_bin_{bin}: The systematics weight map for the lens sample in each pixel
Source Noise Maps
Noise realizations for g1 and g2 in each pixel, generated by randomly rotating the galaxy shapes. The names are:
/maps/rotation_{r}/g1_{bin}: The noise realization for g1 in each pixel for realization number r/maps/rotation_{r}/g2_{bin}: The noise realization for g1 in each pixel for realization number r
Lens Noise Maps
Counts and density for random halves of the lens sample, for use in a noise calculation. The names are:
/maps/split_{s}/ngal1_{bin}: Count in the first half of split number s./maps/split_{s}/ngal2_{bin}: Count in the second half of split number s./maps/split_{s}/rho1_{bin}: Density in the first half of split number s./maps/split_{s}/rho2_{bin}: Density in the second half of split number s.