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

Module ligolw_add

source code

Add (merge) LIGO LW XML files containing LSC tables.


Version: git id 8cbd1b7187ce3ed9a825d6ed11cc432f3cfde9a5

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

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

Classes [hide private]
  DefaultContentHandler
Default content handler used by ligolw_add().
Functions [hide private]
 
compare_table_cols(a, b)
Return False if the two tables a and b have the same columns (ignoring order) according to LIGO LW name conventions, return True otherwise.
source code
 
ligolw_add(xmldoc, urls, non_lsc_tables_ok=False, verbose=False, contenthandler=<class 'glue.ligolw.utils.ligolw_add.DefaultContentHandler'>)
An implementation of the LIGO LW add algorithm.
source code
 
merge_compatible_tables(elem)
Below the given element, find all Tables whose structure is described in lsctables, and merge compatible ones of like type.
source code
 
merge_ligolws(elem)
Merge all LIGO_LW elements that are immediate children of elem by appending their children to the first.
source code
 
reassign_ids(doc, verbose=False)
Assign new IDs to all rows in all LSC tables in doc so that there are no collisions when the LIGO_LW elements are merged.
source code
 
remove_input(urls, preserves, verbose=False)
Attempt to delete all files identified by the URLs in urls except any that are the same as the files in the preserves list.
source code
 
url2path(url)
If url identifies a file on the local host, return the path to the file otherwise raise ValueError.
source code
Variables [hide private]
  __package__ = 'glue.ligolw.utils'
Function Details [hide private]

ligolw_add(xmldoc, urls, non_lsc_tables_ok=False, verbose=False, contenthandler=<class 'glue.ligolw.utils.ligolw_add.DefaultContentHandler'>)

source code 

An implementation of the LIGO LW add algorithm. urls is a list of URLs (or filenames) to load, xmldoc is the XML document tree to which they should be added.

merge_compatible_tables(elem)

source code 

Below the given element, find all Tables whose structure is described in lsctables, and merge compatible ones of like type. That is, merge all SnglBurstTables that have the same columns into a single table, etc..