Step 9: Make an ASD from a frame (cache) file
- In this step we will try to make an ASD using a part of GstLAL-inspiral
For the initialization and running the pipeline, please refer step1
Access frame cache file by specifying frame_cache and instrument as in step2
- Here is the part to compute the PSD. This pipeline actually give us the whitened data but you can get PSD as a bi-product through PSDHandler
1 from gstlal import reference_psd as rp
2 ...
3 handler = rp.PSDHandler(mainloop, pipeline)
4 ...
5 head = pp.mkwhiten(pipeline, head, psd_mode = 0, zero_pad = 0, fft_length = options.psd_fft_length,\
6 average_samples = options.average_samples, median_samples = options.median_samples)
7 pp.mkfakesink(pipeline, head)
- After running the pipeline we can retrieve PSD data and convert into ASD
- The python script is available at git repository
> kagra-cal/Observation/Phase1/tutorials/asd --help Usage: asd [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 input channel name (default= CAL- CS_PROC_MICH_DELTA_TM_DQ) --output=name Set output file name (default= asd.txt) --xrange=min,max Set range of xaxis in case of --output=*.png --yrange=min,max Set range of yaxis in case of --output=*.png --ch-rate=rate Set input channel data rate (default= 16384) --psd-fft-length=s FFT length, default 8s --average-samples=s FFT averaging samples, default 64 --median-samples=s FFT median samples, default 7
- This is an example to produce an ASD of C00 strain and make a png file
> kagra-cal/Observation/Phase1/tutorials/asd --cache=k1.cache --channel=CAL-CS_PROC_C00_STRAIN_DQ --output=asd0.png --xrange=1,5000 --yrange=1e-18,1e-11 GPS: 1209288320 1209288352 seeking GPS start and stop times ... setting pipeline state to playing ... set to playing successfully running pipeline ... progress_src_input (00:00:02): 1209288352 / 32 seconds (3779026100.0 %)
- The plot shows the produced ASD