Created Sept 2021 author: Tomasz Kacprzak
This script manipulates filter information. It can create the filters_collection.h5 file, which contains all listed filters we use.
Bases: object
Interface between short and long filter names
Created on Mar 6, 2018 author: Joerg Herbel
Bases: ValueError
Raised when lum_fct_m_max is too low for the given redshift range
Bases: ValueError
Raised when more galaxies than allowed by the input parameters are sampled
This function returns an interpolator which predicts the maximum absolute magnitude for a given redshift such that a galaxy will still fall below the limiting apparent magnitude in the reference band (par.gals_mag_max). To do this, we do a check for a number of grid points in redshift. The check consists of finding the template with the smallest ratio of flux in the ref-band at that redshift (apparent flux) and flux in the luminosity function band at redshift zero (absolute flux). We then compute the absolute magnitude a galaxy would need to have to still pass the cut assuming that its spectrum is given by only that one template which we found. This works because the mixing-in of other templates will only make the object brighter in the r-band at this redshift. See also docs/jupyter_notebooks/z_m_cut.ipynb.
Created on Jul 2, 2021 @author: Tomasz Kacprzak
Applies reduced shear to the intrinsic ellipticities, if unit==’distortion’, then following Bartelmann & Schneider 2001, https://arxiv.org/pdf/astro-ph/9912508.pdf. We use the ellipticity defined in eq. (4.4), which is sheared according to eq. (4.6), “by interchanging χ and χ(s) and replacing g by −g”. if unit==’shear’, then following … :param int_e1: intrinsic ellipticity 1-component :param int_e2: intrinsic ellipticity 2-component :param kappa: kappa :param g1: reduced shear 1-component :param g2: reduced shear 2-component :return e1: sheared ellipticity 1-component :return e2: sheared ellipticity 2-component
Applies shear to the intrinsic ellipticities, following Bartelmann & Schneider 2001, https://arxiv.org/pdf/astro-ph/9912508.pdf. We use the ellipticity defined in eq. (4.4), which is sheared according to eq. (4.6), “by interchanging χ and χ(s) and replacing g by −g”. :param int_e1: intrinsic ellipticity 1-component :param int_e2: intrinsic ellipticity 2-component :param kappa: kappa :param gamma1: shear 1-component :param gamma2: shear 2-component :return e1: sheared ellipticity 1-component :return e2: sheared ellipticity 2-component
Convert shape in distortion units to shear units https://arxiv.org/abs/astro-ph/0107431 eq 2-7, 2-8
Convert shape in shear units to distortion units # https://arxiv.org/abs/astro-ph/0107431 # eq 2-7, 2-8
Convert shape in shear unit to moments PhD Thesis Tomasz Kacprzak Eqn 2.13
Calculate reduced shear https://arxiv.org/pdf/astro-ph/9407032.pdf1 Eq 2.14
Created on Sept 2021 author: Tomasz Kacprzak Code author: Joerg Herbel
Bases: object
Computes galaxy magnitudes by integrating redshifted and reddened galaxy spectra which are given by a sum of five template spectra. See also docs/jupyter_notebooks/spectra_to_magnitudes.ipynb and docs/jupyter_notebooks/extinction.ipynb.
Bases: object
Computes galaxy magnitudes by looking up pre-computed values of the integrals of our template spectra as a function of redshift and extinction E(B-V). The integrals need to be pre-computed for every filter band separately, such that for every filter band, we have five (number of template spectra) 2-dim. tables of integrals with redshift on the one and E(B-V) on the other axis. See also docs/jupyter_notebooks/tabulate_template_integrals.ipynb and docs/jupyter_notebooks/extinction.ipynb.
Created Aug 2021 author: Tomasz Kacprzak code from: Joerg Herbel # ucat/docs/jupyter_notebooks/tabulate_template_integrals.ipynb
Loads SED integrals, uses cache. :param filepath_sed_integ: name of the file containing SED template integrals :param filter_names: list of filter name, should be in format Camera_band, but just band is also accepted to ensure backwards compatibility :param crop_negative: if to set all negative elements in the filter to zero :param sed_templates: OrderedDict containing a buffer for templates :param copy_to_cwd: copy the file to the current working directory
Created on Mar 6, 2018 author: Joerg Herbel
spectrum – (n_gal, n_lambda)
lam_obs – (n_lambda,)
excess_b_v – (n_gal,)
extinction_spline
templates_amp – (n_templates, n_lambda)
coeff – (n_gal, n_templates)
(n_gal, n_lambda)
lam_obs – (n_lambda, )
templates_amp – (n_templates, n_lambda)
coeff – (n_gal, n_templates)
excess_b_v – (n_gal,)
extinction_spline
(n_gal, n_lambda)
Calculate the extinction coefficient as described in Schlafly et. al. (2011, DOI: 10.1088/0004-637X/737/2/103). The extinction law is the one given by Fitzpatrick (1999, DOI: 10.1086/316293), the extinction map is the one presented in Schlegel et. al. (1998, DOI: 10.1086/305772). :param lam: Wavelength in micrometre :param excess_b_v: Excess E(B-V) in B-V color from the map provided by Schlegel et.
al. (1998, DOI: 10.1086/305772)
spline – Cubic spline for the optical and IR-region according to Fitzpatrick (1999, DOI: 10.1086/316293)
Extinction coefficient A_lambda evaluated at the input wavelengths.
Perform the cubic spline interpolation described by Fitzpatrick (1999, DOI: 10.1086/316293) to obtain the extinction law in the optical and IR region (for wavelengths > 2700 Angstrom) :return: spline object than can be evaluated at arbitrary inverse wavelengths
Created on Jan 03, 2020 author: Joerg Herbel