llama.files.lvc_skymap_mat module¶
Make a MAT file that can be read in by LoadCWbData.m, in the style of the FormatToCWbData.m function written by Rainer. Adapted from code and information provided by Rainer Corley and Imre Bartos.
-
class
llama.files.lvc_skymap_mat.
LvcSkymapMat
¶ Bases:
llama.filehandler.FileHandler
A list of sky positions and probability densities in text form generated from the original Healpix-encoded LVC skymap.
-
DEPENDENCIES
= (<class 'llama.files.lvc_skymap.LvcSkymapFits'>, <class 'llama.files.skymap_info.SkymapInfo'>)¶
-
FILENAME
= 'lvc_skymap.mat'¶
-
MANIFEST_TYPES
= (<class 'llama.files.lvc_skymap_mat.LvcSkymapMat'>,)¶
-
UR_DEPENDENCIES
= (<class 'llama.files.skymap_info.SkymapInfo'>, <class 'llama.files.lvc_skymap.LvcSkymapFits'>)¶
-
UR_DEPENDENCY_TREE
= ImmutableDict({<class 'llama.files.lvc_skymap.LvcSkymapFits'>: ImmutableDict({<class 'llama.files.skymap_info.SkymapInfo'>: ImmutableDict({})}), <class 'llama.files.skymap_info.SkymapInfo'>: ImmutableDict({})})¶
-
-
llama.files.lvc_skymap_mat.
argsort_end_of_cr
(pixel_values, total_probability=0.9)¶ Take input values, sort them in descending order, and perform a binary search to find how many values must be included such that the sum of those top values gives the desired total_probability. Return a list of indices which, when used to get a slice from the original list of pixel values, will give the cut off list. This can be used to sort multiple array fields (while cutting unneeded values) as if they were rows in a spreadsheet.