UsageΒΆ

To use redshift_tools in a project:

import redshift_tools as rt

To create redshift bins that follow an overall distribution described by a Smail-type distribution with parameters alpha, beta, z0 in the redshift range 0.1 to 3.0, photometric scatter of 0.05(1+z) that is cut into five equally populated bins, you would do:

nz, nz_tot = rt.create.create_bins(
        n_bins=5,
        sigma_z=0.05,
        min_z=0.1,
        max_z=3.0
        redshift_dep=True
        alpha=1.0,
        beta=2.0,
        z0=1.0
        )
rt.plot_bins(nz, nz_tot)

In order to change redshift bins by shifts or stretches, you can use the manipulate module:

delta_z = [-0.01, 0.01, 0.01, -0.01, 0.01]
sigma_z = [1.1, 0.9, 1.1, 0.9, 1.1]

nz_shifted = rt.manipulate.shift(nz, delta_z)
nz_stretched = rt.manipulate.stretch(nz, sigma_z)
nz_shifted_and_stretched = rt.manipulate.shift_and_stretch(
        nz_shifted, delta_z, sigma_z
)

For more examples have a look at the demos