clmm.redshift.tools module

General utility functions that are used in multiple modules

clmm.redshift.tools.compute_for_good_redshifts(function, z1, z2, bad_value, warning_message, z1_arg_name='z1', z2_arg_name='z2', r_proj=None, **kwargs)[source]

Computes function only for z1 < z2, the rest is filled with bad_value

Parameters:
  • function (function) -- Function to be executed

  • z1 (float, array_like) -- Redshift lower

  • z2 (float, array_like) -- Redshift higher

  • bad_value (any) -- Value to fill when z1 >= z2

  • warning_message (str) -- Warning message to be displayed when z1 >= z2

  • z1_arg_name (str, optional) -- Name of the keyword argument that z1 is passed to. Default: 'z1'

  • z2_arg_name (str, optional) -- Name of the keyword argument that z2 is passed to. Default: 'z2'

  • r_proj (float, array_like, optional) -- Value to be passed to keyword argument r_proj of function. Default: None

Returns:

Output of function with value for z1 >= z2 replaced by bad_value

Return type:

Return type of function