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: 1) The path is None, which will result in zero shear. 2) The path is a file readable by healpy. The file is then assumed to contain 3

healpix maps (kappa, gamma1, gamma2).

  1. 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. :param 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

Parameters:
  • 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. :param path: path where map is stored, assumes that file contains three maps (kappa,

gamma1, gamma2)

Parameters:
  • 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. :param z_maps: redshifts of input maps, assumed to be ordered :param maps: input maps corresponding to z_maps, type: hdf5-dataset or numpy-array :param z: redshifts to which maps will be interpolated, assumed to be sorted :param pixel_ind: indices indicating pixels of input maps to interpolate, same size

as z

Parameters:

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. :param z_maps: redshifts of input maps, assumed to be ordered :param maps: input maps corresponding to z_maps, type: hdf5-dataset or numpy-array :param z: redshifts to which maps will be interpolated, assumed to be sorted :param pixel_ind: indices indicating pixels of input maps to interpolate, same size

as z

Parameters:

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. :param x0: x-coordinates of first data points :param y0: y-coordinates of first data points :param x1: x-coordinates of second data points :param y1: y-coordinates of second data points :param x: positions where interpolation is evaluated :return: interpolated values

galsbi.ucat.plugins.galaxy_mag_noise module

Created on Aug 2021 author: Tomasz Kacprzak

class galsbi.ucat.plugins.galaxy_mag_noise.Plugin(ctx, **kwargs)[source]

Bases: BasePlugin

galsbi.ucat.plugins.galaxy_mag_noise.flux_to_mag(flux)[source]
galsbi.ucat.plugins.galaxy_mag_noise.mag_to_flux(mag)[source]

galsbi.ucat.plugins.galaxy_z_noise module

Created on Aug 2021 author: Tomasz Kacprzak

class galsbi.ucat.plugins.galaxy_z_noise.Plugin(ctx, **kwargs)[source]

Bases: BasePlugin

galsbi.ucat.plugins.galaxy_z_noise.add_z_noise(z, delta_z, frac_outliers)[source]

galsbi.ucat.plugins.sample_galaxies module

Created on Mar 5, 2018 author: Joerg Herbel

class galsbi.ucat.plugins.sample_galaxies.Plugin(ctx, **kwargs)[source]

Bases: BasePlugin

Generate a random catalog of galaxies with magnitudes in multiple bands.

galsbi.ucat.plugins.sample_galaxies_morph module

Created 2021 author: Tomasz Kacprzak

class galsbi.ucat.plugins.sample_galaxies_morph.Plugin(ctx, **kwargs)[source]

Bases: BasePlugin

Generate a random catalog of galaxies with magnitudes in multiple bands.

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.

check_max_mem_error(par, max_mem_hard_limit=10000)[source]

Check if the catalog does not exceed allowed memory. Prevents job crashes on clusters.

check_n_gal_prior(par)[source]

Check if the number of galaxies is inside the prior range, even before rendering, to remove extreme values.

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.sample_galaxies_photo.in_pos(x, y, par)[source]

galsbi.ucat.plugins.write_catalog module

Created on Aug 2021 author: Tomasz Kacprzak

class galsbi.ucat.plugins.write_catalog.Plugin(ctx, **kwargs)[source]

Bases: BasePlugin

galsbi.ucat.plugins.write_catalog.catalog_to_rec(catalog)[source]
galsbi.ucat.plugins.write_catalog.get_ucat_catalog_filename(catalog_name)[source]

galsbi.ucat.plugins.write_catalog_photo module

Created on Aug 2021 author: Tomasz Kacprzak

class galsbi.ucat.plugins.write_catalog_photo.Plugin(ctx, **kwargs)[source]

Bases: BasePlugin

galsbi.ucat.plugins.write_catalog_photo.get_ucat_catalog_filename()[source]

Module contents