19"""Native python versions of LIGOTools and FrXXX frame utilities
24__author__ =
"Duncan Macleod <duncan.macleod@ligo.org>"
28 r"""Return a list of all channels written into the given GWF-format
32 `string` path to input frame file
34 @return A list of channel names
39 >>>
get_channels(
'H-H1_LDAS_C02_L2-9668/H-H1_LDAS_C02_L2-966802176-128.gwf')
40 [
'H1:LSC-DATA_QUALITY_VECTOR',
'H1:IFO-SV_STATE_VECTOR',
'H1:LDAS-STRAIN']
47 """Yield channels from the table-of-contents of the given GWF file
50 `str` path to input frame file
51 @return An iterator of channel names
53 frfile = lalframe.FrameUFrFileOpen(str(framefile), "r")
54 frtoc = lalframe.FrameUFrTOCRead(frfile)
55 nsim = lalframe.FrameUFrTOCQuerySimN(frtoc)
56 for i
in range(lalframe.FrameUFrTOCQueryAdcN(frtoc)):
57 yield lalframe.FrameUFrTOCQueryAdcName(frtoc, i)
58 for i
in range(lalframe.FrameUFrTOCQueryProcN(frtoc)):
59 yield lalframe.FrameUFrTOCQueryProcName(frtoc, i)
60 for i
in range(lalframe.FrameUFrTOCQuerySimN(frtoc)):
61 yield lalframe.FrameUFrTOCQuerySimName(frtoc, i)