Step 3: Extract channels and make a new frame file

   1 out_path = '.'
   2 frame-type = 'TEST'
   3 frame_duration     = 4 # in seconds
   4 frames_per_file    = 1
   5 compression_scheme = 257 #256: Raw  257: gzip                                   
   6 compression_level  = 9
   7 
   8 mux = pp.mkframecppchannelmux(pipeline, None)
   9 
  10 mux.set_property("frame-duration",     frame_duration)
  11 mux.set_property("frames-per-file",    frames_per_file)
  12 mux.set_property("compression-scheme", compression_scheme)
  13 mux.set_property("compression-level",  compression_level)
  14 
  15 # Link the strain branch to the muxer                                           
  16 strain_queue_length = 0 #short_queue
  17 for pipe, chan in zip(pipe_list, channel_list):
  18     cp.mkqueue(pipeline, pipe, strain_queue_length).get_static_pad("src").link(mux.get_request_pad(chan[1]))
  19 
  20 mux = pp.mkprogressreport(pipeline, mux, "progress_sink_%s" % instrument)
  21 
  22 pp.mkframecppfilesink(pipeline, mux, frame_type = frame_type, path = output_path, instrument = instrument)

> kagra-cal/Observation/Phase1/tutorials/extr --help
Usage: extr [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 name(s) to extract (default= CAL-
                        CS_PROC_C00_STRAIN_DQ,CAL-CS_PROC_MICH_DELTA_TM_DQ
                        ,CAL-CS_PROC_MICH_RESIDUAL_DQ,CAL-
                        CS_PROC_ERR_STRAIN_DQ,CAL-CS_PROC_CTRL_STRAIN_DQ,LSC-
                        MICH1_IN1_DQ,LSC-MICH1_OUT_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 =
                        32)

> kagra-cal/Observation/Phase1/tutorials/extr --cache=k1.cache
GPS:  1209288320 1209288352
[('K1', 'CAL-CS_PROC_C00_STRAIN_DQ'), ('K1', 'CAL-CS_PROC_MICH_DELTA_TM_DQ'), ('K1', 'CAL-CS_PROC_MICH_RESIDUAL_DQ'), ('K1', 'CAL-CS_PROC_ERR_STRAIN_DQ'), ('K1', 'CAL-CS_PROC_CTRL_STRAIN_DQ'), ('K1', 'LSC-MICH1_IN1_DQ'), ('K1', 'LSC-MICH1_OUT_DQ')]
seeking GPS start and stop times ...
setting pipeline state to playing ...
set to playing successfully
running pipeline ...
progress_src_CH6 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_src_CH7 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_src_CH1 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_src_CH5 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_src_CH4 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_src_CH2 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_src_CH3 (00:00:01): 1209288352 / 32 seconds (3779026100.0 %)
progress_sink_K1 (00:00:21): 1209288320 seconds
progress_sink_K1 (00:00:21): 1209288352 / 32 seconds (3779026100.0 %)

> $LAL_PREFIX/bin/framecpp_query --list proc K-TEST-1209288320-32.gwf                                                                         Frame Version: 8 Frame Library: frameCPP Library Revision: 1 Originator: IGWD
Frame Offset: 0
K1:CAL-CS_PROC_C00_STRAIN_DQ
K1:CAL-CS_PROC_CTRL_STRAIN_DQ
K1:CAL-CS_PROC_ERR_STRAIN_DQ
K1:CAL-CS_PROC_MICH_DELTA_TM_DQ
K1:CAL-CS_PROC_MICH_RESIDUAL_DQ
K1:LSC-MICH1_IN1_DQ
K1:LSC-MICH1_OUT_DQ

KAGRA/Subgroups/CAL/GstLAL/tutorials/step3 (last edited 2018-08-07 16:00:19 by SadakazuHaino)