Step 7: Apply FIR filters and make a strain frame file
For the initialization and running the pipeline, please refer step1
Access frame cache file by specifying frame_cache and instrument as in step2
Define a frame multiplexer(mux) to write channels into a frame as in step3
Prepare for a filter file (filt.npz) following step6
- Here is the part to load the filters
- Here is the part to apply Actuation(A) and inverse-sensing(C) FIR filters on MICH_OUT(Ctrl signal) and MICH_IN(Error signal), respectively
1 mco = pp.mktee(pipeline, pipe_dict["MOU"])
2 mci = pp.mktee(pipeline, pipe_dict["MIN"])
3 pipe_dict["MOU"] = mco
4 pipe_dict["MIN"] = mci
5
6 afl = pp.mkfirbank(pipeline, mco, latency = int(adelay), fir_matrix = [afilt[::-1]], time_domain = td)
7 cfl = pp.mkfirbank(pipeline, mci, latency = int(cdelay), fir_matrix = [cfilt[::-1]], time_domain = td)
- Here is the part to add two channels (DELTA_TM and RESIDUAL) to produce strain (C01) and add (MICH_IN1/C and MICH_OUT*A) to produce strain (C02)
1 afl = pp.mktee(pipeline, afl)
2 cfl = pp.mktee(pipeline, cfl)
3 dtm = pp.mktee(pipeline, pipe_dict["DTM"])
4 res = pp.mktee(pipeline, pipe_dict["RES"])
5
6 c01 = cp.mkadder(pipeline, cp.list_srcs(pipeline, [dtm, short_queue], [res, long_queue]))
7 c02 = cp.mkadder(pipeline, cp.list_srcs(pipeline, [afl, short_queue], [cfl, long_queue]))
8 c01 = pp.mkaudioamplify(pipeline, c01, 1./arm_length)
9 c02 = pp.mkaudioamplify(pipeline, c02, 1./arm_length)
- The python script is available at git repository
> kagra-cal/Observation/Phase1/tutorials/filt --help Usage: filt [options] Options: -h, --help show this help message and exit --cache=cache Set the name of the LAL cache listing the frame files --gps-start-time=seconds Set the start time of the segment to analyze in GPS seconds. --gps-end-time=seconds Set the end time of the segment to analyze in GPS seconds. --ifo=name Name of the IFO (default= K1) --channel=name Set channel names for MICH_IN1,MICH_OUT,MICH_RESIDUAL, MICH_DELTA_TM,C00_STRAIN (default= LSC-MICH1_IN1_DQ ,LSC-MICH1_OUT_DQ,CAL-CS_PROC_MICH_RESIDUAL_DQ,CAL- CS_PROC_MICH_DELTA_TM_DQ,CAL-CS_PROC_C00_STRAIN_DQ) --frame-type=name Set the frame type as input to the frame writing element. (Default=TEST) --output-path=name Set the output path for writing frame files. (Default=.) --format=format Set input channel(s) format (default= F64LE) --ch-rate=rate Set input channel data rate (default= 16384) --frame-duration=seconds Set the number of seconds for each frame. (Default =4)
- Here is an example to produce C01 and 02 from DELTA_TM+RESIDUAL and (MICH_IN1/C)+(MICH_OUT*A), respectively
- Frame duration is set short because the first frame should be skipped because of the latency of applying FIR filter
- It should be OK to ignore the warnings
> kagra-cal/Observation/Phase1/tutorials/filt --cache=k1.cache GPS: 1209288320 1209288352 [('K1', 'LSC-MICH1_IN1_DQ'), ('K1', 'LSC-MICH1_OUT_DQ'), ('K1', 'CAL-CS_PROC_MICH_RESIDUAL_DQ'), ('K1', 'CAL-CS_PROC_MICH_DELTA_TM_DQ'), ('K1', 'CAL-CS_PROC_C00_STRAIN_DQ')] delay= 16384.0 4096.0 output_start= 1209288321 seeking GPS start and stop times ... setting pipeline state to playing ... set to playing successfully running pipeline ... (python:32371): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event:<framecppchannelmux0:src> Sticky event misordering, got 'segment' before 'stream-start' (python:32371): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event:<progress_sink_K1:src> Sticky event misordering, got 'segment' before 'stream-start' (python:32371): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event:<sink:proxypad0> Sticky event misordering, got 'segment' before 'stream-start' (python:32371): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event:<multifilesink:sink> Sticky event misordering, got 'segment' before 'stream-start' (python:32371): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event:<framecppfilesink0:sink> Sticky event misordering, got 'segment' before 'stream-start' (python:32371): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event:<progress_sink_K1:sink> Sticky event misordering, got 'segment' before 'stream-start' progress_src_C00 (00:00:20): 1209288320 seconds progress_src_DTM (00:00:20): 1209288320 seconds progress_src_RES (00:00:20): 1209288320 seconds progress_src_MIN (00:00:20): 1209288352 / 32 seconds (3779026100.0 %) progress_src_MOU (00:00:20): 1209288352 / 32 seconds (3779026100.0 %) progress_src_C00 (00:00:20): 1209288352 / 32 seconds (3779026100.0 %) progress_src_DTM (00:00:20): 1209288352 / 32 seconds (3779026100.0 %) progress_src_RES (00:00:20): 1209288352 / 32 seconds (3779026100.0 %) progress_sink_K1 (00:00:24): 1209288324 seconds progress_sink_K1 (00:00:29): 1209288336 seconds progress_sink_K1 (00:00:35): 1209288348 seconds progress_sink_K1 (00:00:35): 1209288352 / 32 seconds (3779026100.0 %)
- Check the contents of the output frame files
$LAL_PREFIX/bin/framecpp_query --list proc K-K1_TEST-1209288324-4.gwf Frame Version: 8 Frame Library: frameCPP Library Revision: 1 Originator: IGWD Frame Offset: 0 K1:CALIB_AFL K1:CALIB_C00 K1:CALIB_C01 K1:CALIB_C02 K1:CALIB_CFL K1:CALIB_DTM K1:CALIB_MIN K1:CALIB_MOU K1:CALIB_RES