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 defaultpaths.params
will be usedfullpaths (dict) – Pipeline file paths in a dictionary format. If
None
then the defaultpaths.fullpaths
will be used
- Returns
data –
Relevant rows and indexes of the lens sample
- Return type
Notes
If using custom settings, you have to specify both
params
andfullpaths
! Using inconsitent definitions result in aSyntaxError
.The format of the output data table:
id
mock ID of the random pointsra
Right Ascension of the random pointsdec
Delination of the random pointsqlist
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 pointssinds
list of boolean selection indexes for each parameter binfullcat
selected rows of the full lens catalogbounds
for each bin parameter bounds written asplpairs
parameter boundaries simple simple list
(just boundaries, not pairs or tuples)