xlens.catalog.model

Attributes

s0

Functions

evar_model(mag, radius, c0, c1, c2, c3, c4, c5)

estd_model_fit(coords, c0, c1, c2, c3, c4, c5)

w_model(flux, m0, m2, mag_zero, c0, c1, c2, c3, c4, c5)

w_model_derivs(flux, m0, m2, mag_zero, c0, c1, c2, c3, ...)

Compute derivatives of w = 1 / evar_model(mag, radius)

estimate_mean_in_bins(*, mag, radius, obs, mag_edges, ...)

Estimate mean(obs) in 2D bins of (mag, radius).

estimate_std_in_bins(*, mag, radius, obs, mag_edges, ...)

Estimate std(obs) in 2D bins of (mag, radius).

Module Contents

s0 = 0.01[source]
evar_model(mag, radius, c0, c1, c2, c3, c4, c5)[source]
estd_model_fit(coords, c0, c1, c2, c3, c4, c5)[source]
w_model(flux, m0, m2, mag_zero, c0, c1, c2, c3, c4, c5)[source]
w_model_derivs(flux, m0, m2, mag_zero, c0, c1, c2, c3, c4, c5)[source]

Compute derivatives of w = 1 / evar_model(mag, radius) with respect to flux, m0, and m2.

Returns:

  • “dw_dflux”

  • ”dw_dm0”

  • ”dw_dm2”

Return type:

dict with keys

estimate_mean_in_bins(*, mag, radius, obs, mag_edges, radius_edges, min_count: int = 100)[source]

Estimate mean(obs) in 2D bins of (mag, radius).

Parameters:
  • mag (array_like, shape (N,)) – Input data.

  • radius (array_like, shape (N,)) – Input data.

  • obs (array_like, shape (N,)) – Input data.

  • mag_edges (array_like) – Bin edges along mag and radius.

  • radius_edges (array_like) – Bin edges along mag and radius.

  • min_count (int, optional) – Minimum number of objects required in a bin to keep it. Bins with fewer galaxies are dropped from the output.

Returns:

  • x_array, y_array (ndarray, shape (Nbins_kept,)) – Bin centers in mag and radius for bins that pass the min_count cut.

  • mean_array (ndarray, shape (Nbins_kept,)) – Mean of obs in each kept bin.

  • n_array (ndarray, shape (Nbins_kept,)) – Number of objects in each kept bin.

estimate_std_in_bins(*, mag: numpy.ndarray, radius: numpy.ndarray, obs: numpy.ndarray, mag_edges: numpy.ndarray, radius_edges: numpy.ndarray, min_count: int = 100)[source]

Estimate std(obs) in 2D bins of (mag, radius).

Parameters:
  • mag (array-like, shape (N,)) – Input data.

  • radius (array-like, shape (N,)) – Input data.

  • obs (array-like, shape (N,)) – Input data.

  • mag_edges (array-like) – Bin edges along mag and radius.

  • radius_edges (array-like) – Bin edges along mag and radius.

  • min_count (int, optional) – Minimum number of objects required in a bin to report a std.

Returns:

  • x_array, y_array (ndarray, shape (Nbins_kept,)) – Bin centers in mag and radius.

  • std_array (ndarray, shape (Nbins_kept,)) – Standard deviation of obs in each kept bin.

  • n_array (ndarray, shape (Nbins_kept,)) – Number of objects in each kept bin.