Package glue :: Package ligolw :: Package utils :: Module segments
[hide private]
[frames] | no frames]

Module segments

source code

Ask Kipp to document this!


Version: git id 8cbd1b7187ce3ed9a825d6ed11cc432f3cfde9a5

Date: 2017-12-05 15:29:36 +0000

Author: Kipp Cannon <kipp.cannon@ligo.org>

Classes [hide private]
  LIGOLWContentHandler
Minimal content handler suitable for loading documents containg segment tables.
  LigolwSegmentList
A description of a LIGO Light-Weight XML segment list.
  LigolwSegments
An interface shim between code that makes use of segments in glue.segments form, and LIGO Light-Weight XML I/O code.
Functions [hide private]
 
has_segment_tables(xmldoc, name=None)
Return True if the document contains a complete set of segment tables.
source code
 
segmenttable_get_by_name(xmldoc, name)
Retrieve the segmentlists whose name equals name.
source code
Variables [hide private]
  __package__ = 'glue.ligolw.utils'
Function Details [hide private]

has_segment_tables(xmldoc, name=None)

source code 

Return True if the document contains a complete set of segment tables. Returns False otherwise. If name is given and not None then the return value is True only if the document's segment tables, if present, contain a segment list by that name.

segmenttable_get_by_name(xmldoc, name)

source code 

Retrieve the segmentlists whose name equals name. The result is a segmentlistdict indexed by instrument.

The output of this function is not coalesced, each segmentlist contains the segments as found in the segment table.

NOTE: this is a light-weight version of the .get_by_name() method of the LigolwSegments class intended for use when the full machinery of that class is not required. Considerably less document validation and error checking is performed by this version. Consider using that method instead if your application will be interfacing with the document via that class anyway.