Changes between Version 1 and Version 2 of ShSpectrogram


Ignore:
Timestamp:
02/10/16 21:45:58 (4 years ago)
Author:
KlausStammler
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ShSpectrogram

    v1 v2  
    11[ShCommands Return to command index] 
    22 
    3 == spectrogram == 
     3== Spectrogram == 
    44 
    55'''command''': SPECTROGRAM <trc> [<lo-t> <hi-t>] <spgwith> <spgstep> <outfile> 
    66 
    7 Computes spectrogram of a trace and writes the result to a text file. The result may be viewed with `mapspec`: 
     7Computes spectrogram of a trace and writes the result to a file. 
    88 
     9SH: 
     10The result may be viewed with `mapspec`: 
    911`setenv UIDPATH $SH_SOURCE/img/mapspec.uid`[[BR]] 
    1012`$SH_SOURCE/img/mapspec <datafile> 30` # 30 is number of colours used 
    1113 
    12 The spectrogram is computed as follows: a subwindow of N samples of the selected trace window is transformed to frequency domain using the FFT algorithm (see Numerical Recipes, Press et al., Cambridge University Press, 1988). N is determined by the configuration parameter spectrogram_width and must be a power of 2. Reasonable values are e.g. 512 or 1024. Before FFT the input trace is tapered in time domain using a cosine taper (2*cos(x)-1, -pi < x < pi). The squared frequency amplitudes are displayed in a colour-coded vertical bar/line in the output window. The next subwindow for FFT is found by shifting the last one by K samples to the right. K is determined by the configuration parameter spectrogram_step. The first subwindow starts with the first sample of the selected trace part, the last subwindow ends between 0 and K-1 samples before the end of the selected trace part. The output matrix contains frequency over time. The header info of the output file contains DELTA (sample distance in time, s), START (absolute start time of trace), LENGTH (number of frequency samples on each time step), LINES (number of time steps), DF (frequency sample distance in Hz). Following are LENGTH*LINES numbers giving frequency amplitudes over the time steps. The first LENGTH samples refer to time sample 1, the second LENGTH samples refer to time sample 2 and so on. 
     14SHX: 
     15Creates png figure in specifed output file. Opened if /SHOW qualifier 
     16specified or no output file is given. 
     17 
     18SH: 
     19The spectrogram is computed as follows: a subwindow of N samples of the 
     20selected trace window is transformed to frequency domain using the FFT 
     21algorithm (see Numerical Recipes, Press et al., Cambridge University Press, 
     221988). N is determined by the configuration parameter spectrogram_width 
     23and must be a power of 2. Reasonable values are e.g. 512 or 1024. Before 
     24FFT the input trace is tapered in time domain using a cosine taper 
     25(2*cos(x)-1, -pi < x < pi). The squared frequency amplitudes are displayed 
     26in a colour-coded vertical bar/line in the output window. The next 
     27subwindow for FFT is found by shifting the last one by K samples to the 
     28right. K is determined by the configuration parameter spectrogram_step. 
     29The first subwindow starts with the first sample of the selected trace 
     30part, the last subwindow ends between 0 and K-1 samples before the end of 
     31the selected trace part. The output matrix contains frequency over time. 
     32The header info of the output file contains DELTA (sample distance in time, 
     33s), START (absolute start time of trace), LENGTH (number of frequency 
     34samples on each time step), LINES (number of time steps), DF (frequency 
     35sample distance in Hz). Following are LENGTH*LINES numbers giving frequency 
     36amplitudes over the time steps. The first LENGTH samples refer to time 
     37sample 1, the second LENGTH samples refer to time sample 2 and so on. 
     38 
     39SHX: 
     40Use obspy trace spectrogram method. 
     41 
     42=== qualifiers === 
     43 
     44 * /SHOW (SHX only) [[br]] 
     45   Open and show specified output file. 
    1346 
    1447=== parameters === 
     
    2962 
    3063 `spectrogram 3 ;;; 512 5 SPEC.DAT`:: 
    31  computes spectrogram of trace number 3 on the total available time window and writes the output to file SPEC.DAT. 
     64 computes spectrogram of trace number 3 on the total available time window 
     65 and writes the output to file SPEC.DAT (SH).