Data Structures | |
class | CafePacker |
Packing algorithm implementing the ligolw_cafe file list packing algorithm. More... | |
class | LALCacheBin |
Subclass of the packing.Bin class representing a LAL file cache. More... | |
Functions | |
def | load_cache (filename, verbose=False) |
Parse a LAL cache file named filename into a list of lal.utils.CacheEntry objects. More... | |
def | cache_to_seglistdict (cache) |
Construct a coalesced segmentlistdict object from a list of lal.utils.CacheEntry objects. More... | |
def | segmentlistdict_normalize (seglistdict, origin) |
Convert the times in a segmentlist dictionary to floats relative to origin. More... | |
def | get_coincident_segmentlistdict (seglistdict, offset_vectors) |
Compute the segments for which data is required in order to perform a complete coincidence analysis given the segments for which data is available and the list of offset vectors to be applied to the data during the coincidence analysis. More... | |
def | segmentlistdict_unnormalize (seglistdict, origin) |
The opposite of segmentlistdict_normalize(), restores the times in a segmentlist dictionary to absolute times. More... | |
def | split_bins (cafepacker, extentlimit, verbose=False) |
Split bins in CafePacker so that each bin has an extent no longer than extentlimit. More... | |
def | write_caches (base, bins, instruments=None, verbose=False) |
def | write_single_instrument_caches (base, bins, instruments, verbose=False) |
def | ligolw_cafe (cache, offset_vectors, verbose=False, extentlimit=None) |
Transform a LAL cache into a list of caches each of whose contents can be subjected to a coincidence analysis independently of the contents of the other caches, assuming the coincidence analyses will involve the application of the given offset vectors. More... | |
def lalburst.cafe.load_cache | ( | filename, | |
verbose = False |
|||
) |
def lalburst.cafe.cache_to_seglistdict | ( | cache | ) |
def lalburst.cafe.segmentlistdict_normalize | ( | seglistdict, | |
origin | |||
) |
Convert the times in a segmentlist dictionary to floats relative to origin.
The purpose is to allow segment lists stored as LIGOTimeGPS times to be manipulated more quickly without loss of precision. The modification is done in place.
def lalburst.cafe.get_coincident_segmentlistdict | ( | seglistdict, | |
offset_vectors | |||
) |
Compute the segments for which data is required in order to perform a complete coincidence analysis given the segments for which data is available and the list of offset vectors to be applied to the data during the coincidence analysis.
seglistdict is a segmentlistdict object defining the instruments and times for which data is available. offset_vectors is a list of offset vectors to be applied to the data — dictionaries of instrument/offset pairs.
The offset vectors in offset_vectors are applied to the input segments one by one and the interesection of the shifted segments is computed. The segments surviving the intersection are unshifted to their original positions and stored. The return value is the union of the results of this operation.
In all cases all pair-wise intersections are computed, that is if an offset vector lists three instruments then this function returns the times when any two of those isntruments are on, including times when all three are on.
For example, let us say that "input" is a segmentlistdict object containing segment lists for three instruments, "H1", "H2" and "L1". And let us say that "slides" is a list of dictionaries, and is equal to [{"H1":0, "H2":0, "L1":0}, {"H1":0, "H2":10}]. Then if
output = get_coincident_segmentlistdict(input, slides)
output will contain, for each of the three instruments, the segments (or parts thereof) from the original lists that are required in order to perform a triple- and double-coincident analyses at zero lag with the three instruments, and a double-coincident analysis between H1 and H2 with H2 offset by 10 seconds.
The segmentlistdict object returned by this function has its offsets set to those of the input segmentlistdict.
def lalburst.cafe.segmentlistdict_unnormalize | ( | seglistdict, | |
origin | |||
) |
The opposite of segmentlistdict_normalize(), restores the times in a segmentlist dictionary to absolute times.
The modification is done in place.
def lalburst.cafe.split_bins | ( | cafepacker, | |
extentlimit, | |||
verbose = False |
|||
) |
Split bins in CafePacker so that each bin has an extent no longer than extentlimit.
def lalburst.cafe.write_caches | ( | base, | |
bins, | |||
instruments = None , |
|||
verbose = False |
|||
) |
def lalburst.cafe.write_single_instrument_caches | ( | base, | |
bins, | |||
instruments, | |||
verbose = False |
|||
) |
def lalburst.cafe.ligolw_cafe | ( | cache, | |
offset_vectors, | |||
verbose = False , |
|||
extentlimit = None |
|||
) |
Transform a LAL cache into a list of caches each of whose contents can be subjected to a coincidence analysis independently of the contents of the other caches, assuming the coincidence analyses will involve the application of the given offset vectors.
cache is a sequence (e.g., list, tuple, etc.) of lal.utils.CacheEntry objects. offset_vectors is a sequence of instrument/offset dictionaries describing the offset vectors to consider. Set verbose to True for verbosity.
The output is a two-element tuple. The first element is a igwn_segments.segmentlistdict object describing the times for which coincident data is available (derived from the segment metadata of the input cache). The second element is a list of LALCacheBin objects, providing the file groups.