galsbi.ucat.plugins package
Submodules
galsbi.ucat.plugins.apply_shear module
Created on Mar 27, 2019 author: Joerg Herbel
- class galsbi.ucat.plugins.apply_shear.Plugin(ctx, **kwargs)[source]
Bases:
BasePlugin
Apply a potentially redshift-dependent shear from input shear maps specified by ctx.parameters.path_shear_map. Only first-order effects due to gamma are applied, kappa is completely ignored. There are three options:
The path is None, which will result in zero shear.
- The path is a file readable by healpy. The file is then assumed to contain 3
healpix maps (kappa, gamma1, gamma2).
- The path is and hdf5-file containing multiple, kappa-, gamma1- and gamma2-maps at
given redshifts. The shear values are computed by interpolating linearly between the maps.
- galsbi.ucat.plugins.apply_shear.evaluate_hdf5_shear_maps(path, ra, dec, z)[source]
Evaluate hdf5 shear maps given at multiple redshifts for given redshifts and angular positions.
- Parameters:
path – path to hdf5 file containing shear maps; assumes that this file contains four datasets: - z: redshifts of maps - kappa: kappa-maps - gamma1: gamma1-maps - gamma2: gamma2-maps
ra – right ascensions where maps will be evaluated
dec – declinations where maps will be evaluated
z – redshifts to which maps will be interpolated
- Returns:
kappa, gamma1 and gamma2
- galsbi.ucat.plugins.apply_shear.evaluate_healpix_shear_map(path, ra, dec)[source]
Reads in a healpix map and evaluates it at given positions.
- Parameters:
path – path where map is stored, assumes that file contains three maps (kappa, gamma1, gamma2)
ra – right ascension where map is evaluated
dec – declinations where map is evaluated
- Returns:
kappa, gamma1 and gamma2 evaluated at input positions
- galsbi.ucat.plugins.apply_shear.interpolate_maps(z_maps, maps, z, pixel_ind, ind_intervals)[source]
Linearly interpolate to input redshifts between healpix maps at given redshifts.
- Parameters:
z_maps – redshifts of input maps, assumed to be ordered
maps – input maps corresponding to z_maps, type: hdf5-dataset or numpy-array
z – redshifts to which maps will be interpolated, assumed to be sorted
pixel_ind – indices indicating pixels of input maps to interpolate, same size as z
ind_intervals – indices splitting up z into chunks that lie between the maps
- Returns:
interpolated values
- galsbi.ucat.plugins.apply_shear.interpolate_maps_fast(z_maps, maps, z, pixel_ind, ind_intervals)[source]
Linearly interpolate to input redshifts between healpix maps at given redshifts.
- Parameters:
z_maps – redshifts of input maps, assumed to be ordered
maps – input maps corresponding to z_maps, type: hdf5-dataset or numpy-array
z – redshifts to which maps will be interpolated, assumed to be sorted
pixel_ind – indices indicating pixels of input maps to interpolate, same size as z
ind_intervals – indices splitting up z into chunks that lie between the maps
- Returns:
interpolated values
- galsbi.ucat.plugins.apply_shear.linear_interpolation(x0, y0, x1, y1, x)[source]
Vectorized linear interpolation between two data points.
- Parameters:
x0 – x-coordinates of first data points
y0 – y-coordinates of first data points
x1 – x-coordinates of second data points
y1 – y-coordinates of second data points
x – positions where interpolation is evaluated
- Returns:
interpolated values
galsbi.ucat.plugins.galaxy_mag_noise module
Created on Aug 2021 author: Tomasz Kacprzak
galsbi.ucat.plugins.galaxy_z_noise module
Created on Aug 2021 author: Tomasz Kacprzak
galsbi.ucat.plugins.sample_galaxies module
Created on Mar 5, 2018 author: Joerg Herbel
galsbi.ucat.plugins.sample_galaxies_morph module
Created 2021 author: Tomasz Kacprzak
galsbi.ucat.plugins.sample_galaxies_photo module
Created on Mar 5, 2018 author: Joerg Herbel
- class galsbi.ucat.plugins.sample_galaxies_photo.ExtinctionMapEvaluator(par)[source]
Bases:
object
Class that gives extinction values for positions
- class galsbi.ucat.plugins.sample_galaxies_photo.Plugin(ctx, **kwargs)[source]
Bases:
BasePlugin
Generate a random catalog of galaxies with magnitudes in multiple bands.
- galsbi.ucat.plugins.sample_galaxies_photo.compute_templates_extinction_appmag_for_galaxies(galaxy_type, par, n_templates, cosmo, w, redshifts, absmags, x_pixel, y_pixel, mag_calc, extinction_eval)[source]
- galsbi.ucat.plugins.sample_galaxies_photo.get_magnitude_calculator_direct(filter_names, par)[source]
Interface to direct magnitude calculation
- galsbi.ucat.plugins.sample_galaxies_photo.get_magnitude_calculator_table(filter_names, par)[source]
Interface to magnitude calculation with pre-computed tables
galsbi.ucat.plugins.write_catalog module
Created on Aug 2021 author: Tomasz Kacprzak
- galsbi.ucat.plugins.write_catalog.save_sed(filepath_out, cat, restframe_wavelength_in_A)[source]
Save the SEDs to a file. The SEDs are saved in the rest frame, so we need to adapt the wavelenghts to the observed frame.
- galsbi.ucat.plugins.write_catalog.sed_catalog_to_rec(catalog)[source]
To save the SEDs, we don’t need the full catalog, but only the ID, SED and redshift. The ID is necessary to link the SEDs to the galaxies in the photometric catalog. The redshift is necessary to adapt the wavelengths of the SEDs to the observed frame
galsbi.ucat.plugins.write_catalog_photo module
Created on Aug 2021 author: Tomasz Kacprzak