Size: 3636
Comment:
|
Size: 4706
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 37: | Line 37: |
> tutorials/flag --help | > kagra-cal/Observation/Phase1/tutorials/flag --help |
Line 50: | Line 50: |
> tutorials/flag --cache=k1.cache | > kagra-cal/Observation/Phase1/tutorials/flag --cache=k1.cache |
Line 59: | Line 59: |
* After running on all the (or many of) frame files in phase-1 run (12087* ~ 12096*), you can generate frame cache files based on the lock flag | * (Optional) After running on all the (or many of) frame files in phase-1 run (12087* ~ 12096*), you can generate frame cache files based on the lock flag |
Line 61: | Line 61: |
> tutorials/lcache --help | > kagra-cal/Observation/Phase1/tutorials/lcache --help |
Line 71: | Line 71: |
> tutorials/lcache --outdir=outdir | > kagra-cal/Observation/Phase1/tutorials/lcache --outdir=cache/lock |
Line 82: | Line 82: |
* Check the contents of one of the produced frame cache file {{{ > head cache/lock/1208762460-1208764322 K K1_C 1208762432 32 file://localhost/data/full/12087/K-K1_C-1208762432-32.gwf K K1_C 1208762464 32 file://localhost/data/full/12087/K-K1_C-1208762464-32.gwf K K1_C 1208762496 32 file://localhost/data/full/12087/K-K1_C-1208762496-32.gwf K K1_C 1208762528 32 file://localhost/data/full/12087/K-K1_C-1208762528-32.gwf K K1_C 1208762560 32 file://localhost/data/full/12087/K-K1_C-1208762560-32.gwf K K1_C 1208762592 32 file://localhost/data/full/12087/K-K1_C-1208762592-32.gwf K K1_C 1208762624 32 file://localhost/data/full/12087/K-K1_C-1208762624-32.gwf K K1_C 1208762656 32 file://localhost/data/full/12087/K-K1_C-1208762656-32.gwf K K1_C 1208762688 32 file://localhost/data/full/12087/K-K1_C-1208762688-32.gwf K K1_C 1208762720 32 file://localhost/data/full/12087/K-K1_C-1208762720-32.gwf }}} |
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)
- The python script is available at git repository
> kagra-cal/Observation/Phase1/tutorials/flag --help Usage: flag [options] Options: -h, --help show this help message and exit --cache=cache Set the name of the LAL cache listing the frame files --ifo=name Name of the IFO (default= K1) --channel=name Set channel name to dump (default= GRD-LSC_MICH_STATE_N) --output=name Set output file name (default= flag.txt) --ch-rate=rate Set input channel data rate (default= 16) --out-rate=rate Set output data rate (default= 1)
> kagra-cal/Observation/Phase1/tutorials/flag --cache=k1.cache GPS: 1209288320 1209288352 seeking GPS start and stop times ... setting pipeline state to playing ... set to playing successfully running pipeline ... progress_src_FLG (00:00:01): 1209288352 / 32 seconds (3779026100.0 %) FLAG: 1209288320 1000
- (Optional) After running on all the (or many of) frame files in phase-1 run (12087* ~ 12096*), you can generate frame cache files based on the lock flag
> kagra-cal/Observation/Phase1/tutorials/lcache --help Usage: lcache [options] Options: -h, --help show this help message and exit --lock=lock.dat File name containing lock flag list (default= lock.dat) --frlist=cache/list List of the frame file names to be searched --outdir=cache/lock Directory name where the output files are stored
> kagra-cal/Observation/Phase1/tutorials/lcache --outdir=cache/lock 1208761495 1208761531 36 1208761472 1208761504 2 1208761814 1208762443 629 1208761792 1208762432 21 1208762460 1208764322 1862 1208762432 1208764320 60 1208770528 1208771616 1088 1208770528 1208771616 35 1208771932 1208772607 675 1208771904 1208772576 22 1208772696 1208772735 39 1208772672 1208772704 2 1208773299 1208773317 18 1208773280 1208773312 2 1208775247 1208777094 1847 1208775232 1208777088 59 ...
- Check the contents of one of the produced frame cache file
> head cache/lock/1208762460-1208764322 K K1_C 1208762432 32 file://localhost/data/full/12087/K-K1_C-1208762432-32.gwf K K1_C 1208762464 32 file://localhost/data/full/12087/K-K1_C-1208762464-32.gwf K K1_C 1208762496 32 file://localhost/data/full/12087/K-K1_C-1208762496-32.gwf K K1_C 1208762528 32 file://localhost/data/full/12087/K-K1_C-1208762528-32.gwf K K1_C 1208762560 32 file://localhost/data/full/12087/K-K1_C-1208762560-32.gwf K K1_C 1208762592 32 file://localhost/data/full/12087/K-K1_C-1208762592-32.gwf K K1_C 1208762624 32 file://localhost/data/full/12087/K-K1_C-1208762624-32.gwf K K1_C 1208762656 32 file://localhost/data/full/12087/K-K1_C-1208762656-32.gwf K K1_C 1208762688 32 file://localhost/data/full/12087/K-K1_C-1208762688-32.gwf K K1_C 1208762720 32 file://localhost/data/full/12087/K-K1_C-1208762720-32.gwf