Step 9: Make an ASD from a frame (cache) file

   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)

   1 psd  = handler.psd
   2 f0   = psd.f0
   3 df   = psd.deltaF
   4 nf   = psd.data.length
   5 data = psd.data.data
   6 
   7 data = np.sqrt(data)  # Conver PSD to ASD                                       
   8 freq = np.arange(f0, df*nf, df)

> 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

> 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 %)

ASD of C00 strain

KAGRA/Subgroups/CAL/GstLAL/tutorials/step9 (last edited 2018-08-15 07:45:06 by SadakazuHaino)