xpipe.xhandle.parbins.prepare_random

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

Loads random points 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 mock ID of the random points

  • ra Right Ascension of the random points

  • dec Delination of the random points

  • qlist np.array of mock quantities with shape (n_lens, n_quantity). This refers to the mock quantities assigned to the randoms points,

  • w weight of the random points

  • 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)