⇤ ← Revision 1 as of 2018-08-07 04:40:28
Size: 311
Comment:
|
Size: 1809
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
* * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step1|Step 1: Use GstLAL in your python script]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step3|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]] * Here only the pipeline description part is shown * Access frame cache file by specifying frame_cache and instrument(=K1) {{{#!python instrument = 'K1' src = pp.mklalcachesrc(pipeline, location = frame_cache, cache_dsc_regex = instrument) }}} * Define a demultiplexer(demux) to extract data in channel_list {{{#!python channel_list = [] headkeys = [] head_dict = {} channel_list.append((instrument, 'GRD-LSC_MICH_STATE_N')) demux = pp.mkframecppchanneldemux(pipeline, src, do_file_checksum = do_file_checksum, skip_bad_files = skip_bad_files, channel_list = map("%s:%s".__mod__, channel_list)) }}} * Get channel data into head_dict {{{#!python headkeys.append("FLG") for key, chan in zip(headkeys, channel_list): head_dict[key] = cp.hook_up(pipeline, demux, chan[1],instrument, buf_length) }}} * Define a caps by specifying sampling rate(channel_rate) and resample rate(out_rate) {{{#!python caps = "audio/x-raw, format=F64LE, rate=%d" % int(channel_rate) capsr = "audio/x-raw, format=F64LE, rate=%d" % int(out_rate) for key in headkeys: head_dict[key] = cp.caps_and_progress(pipeline, head_dict[key], caps, key) head_dict[key] = cp.mkresample(pipeline, head_dict[key], 0, False, capsr) }}} * Dump the lock flag into a specified file(output) {{{#!python pp.mknxydumpsink(pipeline, head_dict["FLG"], output) }}} * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step3|(Next) Step 3: Extract channels and make a new frame file]] * [[KAGRA/Subgroups/CAL/GstLAL/tutorials/step1|(Prev) Step 1: Use GstLAL in your python script]] |
Step 2: Dump lock flags from a frame cache file
For the initialization and running the pipeline, please refer step1
- Here only the pipeline description part is shown
- Access frame cache file by specifying frame_cache and instrument(=K1)
Toggle line numbers
1 instrument = 'K1'
2 src = pp.mklalcachesrc(pipeline, location = frame_cache, cache_dsc_regex = instrument)
- Define a demultiplexer(demux) to extract data in channel_list
Toggle line numbers
1 channel_list = []
2 headkeys = []
3 head_dict = {}
4 channel_list.append((instrument, 'GRD-LSC_MICH_STATE_N'))
5 demux = pp.mkframecppchanneldemux(pipeline, src, do_file_checksum = do_file_checksum, skip_bad_files = skip_bad_files, channel_list = map("%s:%s".__mod__, channel_list))
- Get channel data into head_dict
Toggle line numbers
1 headkeys.append("FLG")
2 for key, chan in zip(headkeys, channel_list):
3 head_dict[key] = cp.hook_up(pipeline, demux, chan[1],instrument, buf_length)
- Define a caps by specifying sampling rate(channel_rate) and resample rate(out_rate)
Toggle line numbers
1 caps = "audio/x-raw, format=F64LE, rate=%d" % int(channel_rate)
2 capsr = "audio/x-raw, format=F64LE, rate=%d" % int(out_rate)
3 for key in headkeys:
4 head_dict[key] = cp.caps_and_progress(pipeline, head_dict[key], caps, key)
5 head_dict[key] = cp.mkresample(pipeline, head_dict[key], 0, False, capsr)
- Dump the lock flag into a specified file(output)
Toggle line numbers
1 pp.mknxydumpsink(pipeline, head_dict["FLG"], output)