Catalogues

Catalogue dataclasses for galaxy, shape, and photo-z calibration data.

class sum_stat.catalogue.GalaxyCatalogue(ra, dec, redshift, weight=None, mag=None, flux=None, abs_mag=None, log10_mstar=None, log10_sfr=None, log10_ssfr=None, mag_limit=None, flux_limit=None)[source]

Bases: object

Observed and derived properties of a galaxy or random catalogue.

Parameters:
  • ra (array_like) – Right ascension [degrees].

  • dec (array_like) – Declination [degrees].

  • redshift (array_like) – Spectroscopic or photometric redshift (dimensionless).

  • weight (array_like, optional) – Combined completeness and systematic weight (w_comp * w_sys). Defaults to an array of ones.

  • mag (array_like, optional) – Observed magnitudes, shape (N, n_bands).

  • flux (array_like, optional) – Emission line fluxes [erg/s/cm^2], shape (N, n_lines).

  • abs_mag (array_like, optional) – Absolute magnitudes, shape (N,) or (N, n_bands).

  • log10_mstar (array_like, optional) – Stellar mass log10(M_* / M_sun).

  • log10_sfr (array_like, optional) – Star formation rate log10(SFR / (M_sun yr^-1)).

  • log10_ssfr (array_like, optional) – Specific SFR log10(sSFR / yr^-1).

  • mag_limit (float, optional) – Apparent magnitude limit of the survey (for V_max calculation).

  • flux_limit (float, optional) – Flux limit [erg/s/cm^2] of the survey (for V_max calculation).

Parameters:
abs_mag: ndarray | None = None
comoving_distance(cosmo)[source]

Comoving distance to each object [Mpc].

Parameters:

cosmo (FlatLambdaCDM) – Astropy cosmology instance.

Returns:

chi (ndarray, shape (N,)) – Comoving distances [Mpc].

Parameters:

cosmo (FlatLambdaCDM)

Return type:

ndarray

dec: ndarray
flux: ndarray | None = None
flux_limit: float | None = None
log10_mstar: ndarray | None = None
log10_sfr: ndarray | None = None
log10_ssfr: ndarray | None = None
mag: ndarray | None = None
mag_limit: float | None = None
property n: int

Number of objects.

ra: ndarray
redshift: ndarray
subsample(n_max)[source]

Return a random subsample of at most n_max objects.

Parameters:

n_max (int) – Maximum number of objects to keep.

Returns:

GalaxyCatalogue – Subsampled catalogue (same object if n <= n_max).

Parameters:

n_max (int)

Return type:

GalaxyCatalogue

vmax(z_min, z_max, area_sr, cosmo, z_max_individual=None)[source]

Comoving V_max for each object [Mpc^3].

V_max_i = (area_sr / 4pi) * [V_c(min(z_max, z_max_i)) - V_c(z_min)]

Parameters:
  • z_min (float) – Minimum redshift of the survey volume.

  • z_max (float) – Maximum redshift of the survey volume.

  • area_sr (float) – Survey solid angle [sr].

  • cosmo (FlatLambdaCDM) – Astropy cosmology instance.

  • z_max_individual (array_like, optional) – Maximum redshift at which each object would still enter the sample (e.g. from the mag/flux limit). Defaults to z_max for all objects.

Returns:

vmax (ndarray, shape (N,)) – V_max values [Mpc^3].

Parameters:
Return type:

ndarray

weight: ndarray | None = None
class sum_stat.catalogue.PhotoZCalibTable(z_phot, z_true, w, w_sys=None)[source]

Bases: object

Photo-z calibration table mapping z_phot to z_true with weights.

Used for photo-z bias correction in galaxy-galaxy lensing (dsigma pipeline).

Parameters:
  • z_phot (array_like) – Photometric redshift.

  • z_true (array_like) – True (spectroscopic) redshift.

  • w (array_like) – Per-object weight.

  • w_sys (array_like, optional) – Systematic weight. Defaults to ones.

Parameters:
property n: int

Number of calibration objects.

n_of_z(z_bins)[source]

Weighted n(z) histogram of the true redshifts.

Parameters:

z_bins (array_like) – Bin edges for z_true, shape (n_bins+1,).

Returns:

  • z_centres (ndarray, shape (n_bins,))

  • n_z (ndarray, shape (n_bins,)) – Normalised n(z) (sums to 1).

Parameters:

z_bins (ndarray)

Return type:

tuple[ndarray, ndarray]

w: ndarray
w_sys: ndarray | None = None
z_phot: ndarray
z_true: ndarray
class sum_stat.catalogue.ShapeCatalogue(ra, dec, z_phot, e1, e2, w, m, e_rms, R11, R22)[source]

Bases: object

Weak-lensing shape catalogue.

Parameters:
  • ra (array_like) – Right ascension [degrees].

  • dec (array_like) – Declination [degrees].

  • z_phot (array_like) – Photometric redshift (dimensionless).

  • e1, e2 (array_like) – Ellipticity components (dimensionless).

  • w (array_like) – Per-galaxy lensing weight.

  • m (array_like) – Multiplicative shear bias per galaxy (dimensionless).

  • e_rms (array_like) – Per-galaxy rms ellipticity (dimensionless).

  • R11, R22 (array_like) – Diagonal elements of the shear response matrix (dimensionless).

Parameters:
R11: ndarray
R22: ndarray
dec: ndarray
e1: ndarray
e2: ndarray
e_rms: ndarray
m: ndarray
mean_R()[source]

Weighted mean shear response (R11, R22).

Return type:

tuple[float, float]

mean_m()[source]

Weighted mean multiplicative shear bias <m>.

Return type:

float

property n: int

Number of source galaxies.

ra: ndarray
w: ndarray
z_phot: ndarray