Provide uncertainty frequency example using framecpp.py
Need to provide a pure framecpp python exmple for uncertainty channel:
This example shows how to do it using lal and lalframe
import numpy
import lal
import lalframe
from gwpy.frequencyseries import FrequencySeries
# generate fake data
data = FrequencySeries(
numpy.random.random(16384),
df=.5,
name="TEST",
unit="m",
epoch=1234567890,
)
# write to GWF using LALFrame
frame = lalframe.FrameNew(
epoch=data.epoch.gps,
duration=4,
project="LIGO",
run=4,
frnum=0,
detectorFlags=lal.LHO_4K_DETECTOR_BIT|lal.LLO_4K_DETECTOR_BIT,
)
lalframe.FrameAddREAL8FrequencySeriesProcData(
frame,
series=data.to_lal(),
subtype=6,
)
lalframe.FrameWrite(frame, "test.gwf")
Edited by Ed Maros