Differences between revisions 1 and 2
Revision 1 as of 2018-08-07 04:42:07
Size: 321
Comment:
Revision 2 as of 2018-08-07 05:17:20
Size: 1713
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
 * 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/step1|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
Line 3: Line 6:
{{{#!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)
}}}

Step 3: Extract channels and make a new 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 file by specifying frame-type, frame_duration, frames_per_file, compression_scheme and compression_level

   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/Subgroups/CAL/GstLAL/tutorials/step3 (last edited 2018-08-07 16:00:19 by SadakazuHaino)