21 from ligo
import segments
22 from glue.ligolw
import ligolw
23 from glue.ligolw
import lsctables
24 from glue.ligolw
import utils
as ligolw_utils
25 from lal
import LIGOTimeGPS
32 +---------------------------------------+------------------------------------------+------------+ 33 | Names | Hash | Date | 34 +=======================================+==========================================+============+ 35 | Sathya, Duncan Me, Jolien, Kipp, Chad | 7536db9d496be9a014559f4e273e1e856047bf71 | 2014-05-02 | 36 +---------------------------------------+------------------------------------------+------------+ 46 lsctables.use_in(ContentHandler)
56 Given an xml file create a segment list that marks the time of an 57 injection with padding 59 - fname: the xml file name 60 - pad: duration in seconds to pad the coalescence time when producing a segment, e.g., [tc-pad, tc+pad) 65 seglist = segments.segmentlist()
69 xmldoc = ligolw_utils.load_filename(fname, contenthandler=ContentHandler, verbose=verbose)
73 for row
in lsctables.SimInspiralTable.get_table(xmldoc):
74 t = LIGOTimeGPS(row.get_time_geocent())
75 seglist.append(segments.segment(LIGOTimeGPS(int(math.floor(t-pad))), LIGOTimeGPS(int(math.ceil(t+pad)))))
81 return seglist.coalesce()
def sim_inspiral_to_segment_list(fname, pad=1, verbose=False)
Turn a file containing a sim inspiral into a segment list.