xlens.simulator.perturbation.zslice

Constant-shear perturbation applied per redshift slice.

Classes

ShearRedshift

Constant shear in each redshift slice.

Module Contents

class ShearRedshift(z_bounds, mode, g_dist='g1', shear_value=0.02, kappa_value=0.0)[source]

Bases: object

Constant shear in each redshift slice.

The shear pattern across redshift bins is encoded as a ternary integer (mode), where each base-3 digit maps to -shear_value, +shear_value, or 0.0.

Parameters:
  • z_bounds (list[float]) – Redshift bin boundaries (length nz_bins + 1).

  • mode (int) – Ternary-encoded shear assignment (see class docstring).

  • g_dist ({'g1', 'g2'}) – Which shear component receives the test signal.

  • shear_value (float) – Absolute shear amplitude per bin.

  • kappa_value (float) – Constant convergence applied to all bins.

nz_bins[source]
code[source]
z_bounds[source]
g_dist = 'g1'[source]
shear_value = 0.02[source]
shear_list[source]
kappa = 0.0[source]
determine_shear_list(code)[source]

Convert a ternary code string into a list of shear values.

_get_zshear(redshift)[source]

Return the shear value for a galaxy at the given redshift.

get_shear(redshift)[source]

Return (g1, g2, mu, gamma1, gamma2) for a given redshift.

distort_galaxy(src)[source]

This function distorts the galaxy’s shape and position :param src (np.array): :type src (np.array): row of structured array

Return type:

distorted galaxy position and lensing distortions