xpipe.xhandle.parbins.prepare_lenses

xpipe.xhandle.parbins.prepare_lenses(bin_settings=None, params=None, fullpaths=None)[source]

Loads lens data and defines sub-selections for different parameter bins

Parameters
  • bin_settings (list) – (parameter_edges, N_randoms) can be specified independently from the pipeline settings, default is extracted from params

  • params (dict) – Pipeline settings in a dictionary format. If None then the default paths.params will be used

  • fullpaths (dict) – Pipeline file paths in a dictionary format. If None then the default paths.fullpaths will be used

Returns

data

  • Relevant rows and indexes of the lens sample

Return type

dict

Notes

If using custom settings, you have to specify both params and fullpaths! Using inconsitent definitions result in a SyntaxError.

The format of the output data table:

  • id catalog ID of the lenses

  • ra Right Ascension of the lenses

  • dec Delination of the lenses

  • qlist np.array of quantities with shape (n_lens, n_quantity)

  • sinds list of boolean selection indexes for each parameter bin

  • fullcat selected rows of the full lens catalog

  • bounds for each bin parameter bounds written as [x_0;\,x_1)

  • plpairs parameter boundaries simple simple list

(just boundaries, not pairs or tuples)