Home | Trees | Indices | Help |
|
---|
|
Version: git id 8cbd1b7187ce3ed9a825d6ed11cc432f3cfde9a5
Date: 2017-12-05 15:29:36 +0000
Author: Kipp Cannon <kipp.cannon@ligo.org>
|
|||
|
|||
|
|||
|
|
|||
__package__ =
|
|
Return the time_slide_id corresponding to the offset vector described by time_slide, a dictionary of instrument/offset pairs. Example: >>> get_time_slide_id(xmldoc, {"H1": 0, "L1": 0}) 'time_slide:time_slide_id:10' This function is a wrapper around the .get_time_slide_id() method of the glue.ligolw.lsctables.TimeSlideTable class. See the documentation for that class for the meaning of the create_new, superset_ok and nonunique_ok keyword arguments. This function requires the document to contain exactly one time_slide table. If the document does not contain exactly one time_slide table then ValueError is raised, unless the optional create_new argument is not None. In that case a new table is created. This effect of the create_new argument is in addition to the affects described by the TimeSlideTable class. |
Given a dictionary mapping time slide IDs to instrument-->offset mappings, for example as returned by the as_dict() method of the TimeSlideTable class in glue.ligolw.lsctables or by the load_time_slides() function in this module, construct and return a mapping indicating time slide equivalences. This can be used to delete redundant time slides from a time slide table, and then also used via the applyKeyMapping() method of glue.ligolw.table.Table instances to update cross references (for example in the coinc_event table). Example: >>> slides = {"time_slide_id:0": {"H1": 0, "H2": 0}, "time_slide_id:1": {"H1": 10, "H2": 10}, "time_slide_id:2": {"H1": 0, "H2": 10}} >>> time_slides_vacuum(slides) {'time_slide_id:1': 'time_slide_id:0'} indicating that time_slide_id:1 describes a time slide that is equivalent to time_slide_id:0. The calling code could use this information to delete time_slide_id:1 from the time_slide table, and replace references to that ID in other tables with references to time_slide_id:0. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 12 00:34:18 2017 | http://epydoc.sourceforge.net |