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

digraph "llama.files.lvc_skymap_mat.LvcSkymapMat" { charset="utf-8" splines=ortho bgcolor=none margin=0 rankdir=LR "llama.files.lvc_skymap.LvcSkymapFits" [label=<{{<B>LvcSkymapFits</B>|<I>lvc_skymap.fits.gz</I>|LvcHEALPixSkyMapFileHandler<BR/>GenerateOnceMixin<BR/>ObservingVetoMixin}}>, shape="record", style=filled, target=_top, URL="/llama.files.lvc_skymap.html#llama.files.lvc_skymap.LvcSkymapFits", fillcolor="#cccccc"]; "llama.files.lvc_skymap_mat.LvcSkymapMat" [label=<{{<B>LvcSkymapMat</B>|<I>lvc_skymap.mat</I>|FileHandler}}>, shape="record", style=filled, target=_top, URL="/llama.files.lvc_skymap_mat.html#llama.files.lvc_skymap_mat.LvcSkymapMat", fillcolor="#cccccc"]; "llama.files.skymap_info.SkymapInfo" [label=<{{<B>SkymapInfo</B>|<I>skymap_info.json</I>|EventTriggeredFileHandler<BR/>JSONFile}}>, shape="record", style=filled, target=_top, URL="/llama.files.skymap_info.html#llama.files.skymap_info.SkymapInfo", fillcolor="#cccccc"]; "llama.files.lvc_skymap.LvcSkymapFits" -> "llama.files.lvc_skymap_mat.LvcSkymapMat" [arrowtail="none", color="red", ]; "llama.files.skymap_info.SkymapInfo" -> "llama.files.lvc_skymap.LvcSkymapFits" [arrowtail="none", color="red", ]; "llama.files.skymap_info.SkymapInfo" -> "llama.files.lvc_skymap_mat.LvcSkymapMat" [arrowtail="none", color="red", ]; }

Required input files for llama.files.lvc_skymap_mat.LvcSkymapMat (located on the far right of the graph). For a typical trigger, the leftmost files will be generated as triggers become available. They will be used as input for files to their right, eventually allowing llama.files.lvc_skymap_mat.LvcSkymapMat to be generated.

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.skymap_info.SkymapInfo'>: ImmutableDict({}), <class 'llama.files.lvc_skymap.LvcSkymapFits'>: 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.