=== Step 4: Add two channels and make a strain 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 as in [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step3|step3]] * Add CH1(MICH_DELTA_TM) and CH2(MICH_RESIDUAL) and output into ADD divided by the arm length to convert into the strain {{{#!python arm_length = 3000 ch1 = pp.mktee(pipeline, pipe_dict["CH1"]) ch2 = pp.mktee(pipeline, pipe_dict["CH2"]) add = cp.mkadder(pipeline, cp.list_srcs(pipeline, [ch1, short_queue], [ch2, long_queue])) add = pp.mkaudioamplify(pipeline, add, 1./arm_length) # Divide by arm length keys.append("ADD") pipe_dict["CH1"] = ch1 pipe_dict["CH2"] = ch2 pipe_dict["ADD"] = add }}} * The python script is available at git repository {{{ > kagra-cal/Observation/Phase1/tutorials/adder --help Usage: adder [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_MICH_DELTA_TM_DQ,CAL-CS_PROC_MICH_RESIDUAL_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 = 32) }}} * This is an example to add two channels (CH1:MICH_DELTA_TM and CH2:MICH_RESIDUAL) and output into a new channel (ADD) and write into a new frame file (it should be OK to ignore the warnings) {{{ > kagra-cal/Observation/Phase1/tutorials/adder --cache=k1.cache GPS: 1209288320 1209288352 seeking GPS start and stop times ... setting pipeline state to playing ... set to playing successfully running pipeline ... (python:655): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event: Sticky event misordering, got 'segment' before 'stream-start' (python:655): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event: Sticky event misordering, got 'segment' before 'stream-start' (python:655): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event: Sticky event misordering, got 'segment' before 'stream-start' (python:655): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event: Sticky event misordering, got 'segment' before 'stream-start' (python:655): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event: Sticky event misordering, got 'segment' before 'stream-start' (python:655): GStreamer-WARNING **: gstpad.c:5079:store_sticky_event: Sticky event misordering, got 'segment' before 'stream-start' progress_src_CH3 (00:00:00): 1209288352 / 32 seconds (3779026100.0 %) progress_src_CH1 (00:00:00): 1209288352 / 32 seconds (3779026100.0 %) progress_src_CH2 (00:00:00): 1209288352 / 32 seconds (3779026100.0 %) progress_sink_K1 (00:00:10): 1209288320 seconds progress_sink_K1 (00:00:10): 1209288352 / 32 seconds (3779026100.0 %) }}} * Check the contents 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:CALIB_ADD K1:CALIB_CH1 K1:CALIB_CH2 K1:CALIB_CH3 }}} * Comparison between PROC_C00_STRAIN (renamed as CALIB_CH3) and MICH_DELTA_TM+MICH_RESIDUAL (renamed as CALIB_ADD) {{{ > kagra-cal/Observation/Phase1/tutorials/trf --frame K-TEST-1209288320-32.gwf --channel=CALIB_ADD,CALIB_CH3 --output=trf.png Channels: K1:CALIB_ADD K1:CALIB_CH3 }}} [[attachment:trf-C00-Add.png|{{attachment:trf-C00-Add.png|Comparison between C00 and ADD|width="600"}}]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step5|(Next) Step 5: Demodulate a calibration line]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step3|(Prev) Step 3: Extract channels and make a new frame file]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials|Tutorials]]