=== Step 3: Extract channels and make a new frame file === * For the initialization and running the pipeline, please refer [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step1|step1]] * Access frame cache file by specifying frame_cache and instrument as in [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step2|step2]] * Define a frame multiplexer(mux) to write channels into a frame file by specifying frame-type, frame_duration, frames_per_file, compression_scheme and compression_level {{{#!python out_path = '.' frame-type = 'TEST' frame_duration = 4 # in seconds frames_per_file = 1 compression_scheme = 257 #256: Raw 257: gzip compression_level = 9 mux = pp.mkframecppchannelmux(pipeline, None) mux.set_property("frame-duration", frame_duration) mux.set_property("frames-per-file", frames_per_file) mux.set_property("compression-scheme", compression_scheme) mux.set_property("compression-level", compression_level) # Link the strain branch to the muxer strain_queue_length = 0 #short_queue for pipe, chan in zip(pipe_list, channel_list): cp.mkqueue(pipeline, pipe, strain_queue_length).get_static_pad("src").link(mux.get_request_pad(chan[1])) mux = pp.mkprogressreport(pipeline, mux, "progress_sink_%s" % instrument) pp.mkframecppfilesink(pipeline, mux, frame_type = frame_type, path = output_path, instrument = instrument) }}} * The python script is available at git repository {{{ > 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) }}} * This is an example to extract 7 channels from the full frame file. You can also specify the list of channel names with --channel option. {{{ > 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 %) }}} * Check the channel names of the output frame file {{{ > $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/step4|(Next) Step 4: Add two channels and make a strain frame file]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step2|(Prev) Step 2: Dump lock flags from a frame cache file]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials|Tutorials]]