Step 7: Apply FIR filters and make a strain frame file

   1 fd = numpy.load('filt.npz')
   2 afilt  = fd['a']
   3 cfilt  = fd['c']
   4 adelay = fd['dla']  # 16384                                                     
   5 cdelay = fd['dlc']  #  4096                                                     
   6 
   7 alatency = adelay/sample_rate
   8 clatency = cdelay/sample_rate
   9 latency  = numpy.amax([alatency, clatency])
  10 
  11 output_start   = int(gps_start_time+latency)

   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)

   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)

> 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)

> 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 %)

$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

KAGRA/Subgroups/CAL/GstLAL/tutorials/step7 (last edited 2018-08-08 02:09:07 by SadakazuHaino)