No detector bit set for KAGRA
The LAL_KAGRA_DETECTOR_BIT
value seems to be unset for KAGRA and LIO (whatever that is). See the following snippet:
>>> import lal
>>> for det in lal.CachedDetectors:
... name = det.frDetector.name.upper()
... try:
... bit = getattr(lal, '{0}_DETECTOR_BIT'.format(name))
... except AttributeError:
... bit = getattr(lal, '{0}_DETECTOR_BIT'.format(name.split('_', 1)[0]),
... 'NO_BIT')
... print(name, bit)
TAMA_300 1
VIRGO 4
GEO_600 16
LHO_2K 64
LHO_4K 256
LLO_4K 1024
CIT_40 4096
ALLEGRO_320 16384
AURIGA 65536
EXPLORER NO_BIT
NIOBE 1048576
NAUTILUS 4194304
ET1_T1400308 16777216
ET2_T1400308 67108864
ET3_T1400308 268435456
ET0_T1400308 1073741824
KAGRA 0
LIO_4K 0
The consequence of this is that you can't write the correct detector information for KAGRA using lalframe
:
>>> import os
>>> import lalframe
>>> frame = lalframe.FrameNew(0., 1000., 'test', 0, 0, lal.KAGRA_DETECTOR_BIT)
>>> lalframe.FrameWrite(frame, 'test.gwf')
>>> os.system('FrDump -i test.gwf')
-----------Parameters used--------------
Input Files: test.gwf
First frame : 0 0 (GPS=0.0)
Last frame : 2147483647 2147483647 (GPS=2147483647.0)
Debug level : 1
Dump all Frame info
----------------------------------------
test.gwf 0 1000 0 0
File(s) summary:
1 Frames in the requested time range (0 to 10000000000 (GPS))
First frame start at:0 (UTC:Sun Jan 6 00:00:19 1980) length=1000.00s.
Last frame end at:1000 (UTC:Sun Jan 6 00:16:59 1980) length=1000.00s.
ADC : 0 type of AdcData :
Ser : 0 type of SerData :
Proc: 0 type of ProcData:
Sim : 0 type of SimData :
Detector: 0 type of Detector:
StatData: 0 type of StatData:
Event : 0 Types of event in the file
Simulated Event : 0 Types of event in the file
Is there a workaround for this, or a fix?