fromtama

igwn_segments.utils.fromtama(fileobj, coltype=None)

Read a segmentlist from the file object fileobj containing TAMA locked-segments data. Parsing stops on the first line that cannot be parsed (which is consumed). The segmentlist will be created with segments whose boundaries are of type coltype, which should raise ValueError if it cannot convert its string argument.

NOTE: TAMA locked-segments files contain non-integer start and end times, so the default column type is set to LIGOTimeGPS.

NOTE: the output is a segmentlist as described by the file; if the segments in the input file are not coalesced or out of order, then thusly shall be the output of this function. It is recommended that this function’s output be coalesced before use.