splist [options] file label1 [{label2|---]


        Reads BIN-sp files written with OUTSP (ufiosps.f)
        and optionally converts admittance and phase.
        Label1 usually addresses the complex co-spectrum.
        Label2 is optional and addresses the confidence.
        `---´ is an alternative to an empty label.

        Sections will normally carry a short comment, 2*8 characters long.
        The comment can be targeted for input (see option -n)

        For causality analysis, use the file that sasm06
        saves under option qsavesp=.true. ( -> unit 51)
        and request CSP PSX .

        For admittance and co-phase use the files assigned by
        iun_zadmit and iun_zphase. Request CAD ADC .

        Many more processing options could be imagined.


   -q        - quiet, print only data
   -DBG[#v]  - Debug with msglevel v

 -w <filename>
             - Ascii output to this file. Default is STDOUT.
 -n<target>  - Input the segment marked with string target in the comment part.
               Must match the comment at position 1 and through the length of target.
<target> - Liberal match: anywhere in the comment.
<target> - Liberal match: anywhere in the second part of the comment.
               Only one of these sub-options can be specified. No wildcards as of yet.

   -s[#w]    - smooth ringing in gain and phase spectra weighing neighbours with w
-scia      - auto-scale on input with the value at zero-frequency.
-sci[/]#x  - scale on input with x or, with `/´, 1/
               (acts on both file sections; might need differentiation).

   -F<fmt>   - the format part for floating-point numbers.

    -a       - compute admittance (or absolute value)
    -alg     - ... show as 10log
 -aL  -adB   - ... in neper or decibel
    -E       - ... for psxy  -Ey option.
    -C       - with -aL or -adB , recalc confidence logarithmic
    -EC      - produce value+error bar series based
               on statistics info in file header.

    -EPW     - in the case of power spectra, the statistics info
               in the file header will probably contain zero
               (i.e. unset) confidence limits; however, confidence
               level and degrees-of-freedom are usually available.
               Then, use this option to calculate the limits.

    -p..     - like -a.. , assume input in power units, however

    -EH      - for coherence , use confidence information
               (sasm06: tag1::tag2 = KOH::KOC )
               to produce value+error bar series.
   -vi[#lvl] - drop insignificant values in print (cfd < lvl, default 1e-10)
[#lvl] - replace confidence values cfd > lvl with zero (default 1e-10)
               The lvl parameter in -iv and -ir is identical.

[#lvl] - limit confidence value to lvl in print (default 1e16)   

 -Pdopt  -Propt   
             - compute phase in degrees resp. radians.
Additional options:
               j   - conjugate (invert the values)
               b   - issue break symbols for GMT at phase jumps > half circle
               /#v - cut circle at 2π×v   (at the end of the option string!)
    -C       - ... also the confidence.

    -PHS     - compute phase from gain using Hilbert tr.,
               2-column output, 2nd is standard phase.
    -S#t     - shift time with t

    -W       - weed out insignificant values
    -B#v     - floor for amplitudes in logarithms, default = 1.d-10

   -f[0][n]  - 0: skip the zero-frq
               n: skip the Nyquist frq.

-mHz -Hz -cpd -cph
             - first column gives frequency; select scale (default is number).

              - compute (anti-)causal part of filter (-spectrum),
               (-antica and antica-sp will suffice)

             - compute (anti-)causal spectral factor.
               (antica-sp will suffice)

 -WF[m,]n <filename>
             - output a Wiener filter for lags m ≤ in
               Default m = -n

  -cep       - compute clog(zsp)
  -cepi      - compute cepstrum, i.e. FFT-1{
             - use only bins b to e for cepstrum 

     -I      - in retrieval of a segment, print the file information.

 Find out labels:
              splist file X X


   (1)     After sasm03 with qsavesp=.true. in namelist, read the file that
           sasm03 writes on unit 51. Assume here: sasm03.sp
           Read power spectrum in dB:

              splist -Hz -pdB    sasm03.sp PSX
           Generate confidence information, for use in psxy -Ey:
              splist -Hz -pdB -E sasm03.sp MEC PCF

   (2)     A lot of use is made in ~/Seismo/gcf/SCG/cal-seis

   (3)     First an admittance spectrum's estimates, and then the series
           for plotting error bars:
cd ~/Seismo/gcf
splist o/zadm-3V37_A150.sp X X
 <OPENF->3> 21:^ o/zadm-3V37_A150.sp                  -
 <getsp->d> Header:  4800 CAD @@               T  3.5673E-03  5.6064E+02  2.7778E-05  0.0000E+00  0.0000E+00  9.5000E-01
 <GetsSt>>> Unit 21 tag CAD. VarRedFac=    0.0036, DegFreed=    560.64
 <GetsCn>>> conf.limits:   0.0000E+00  0.0000E+00 lvl: 0.950 0.950
 <Main-->>> read done, n=  4800 dt=  2.7778E-05 stats: T  3.5673E-03  5.6064E+02 conf:  0.0000E+00  0.0000E+00 lvl:0.950
 <GETSP->>> CMPX #21:o/zadm-3V37_A150.sp - contains ->CAD<>@@      ><        <- bins 0... 4800
 <GETSP->>> REAL #21:o/zadm-3V37_A150.sp - contains ->ADC<>@@      ><        <- bins 0... 4800
 <GETSP->>>  EOF #21:o/zadm-3V37_A150.sp

splist -q -adB    -Hz -f0 o/zadm-3V37_A150.sp CAD
splist -q -adB -E -Hz -f0 o/zadm-3V37_A150.sp CAD ADC

      (4)     Select a section on behalf of the comment
h[hgs]~/Ttide/SCG> splist o/manymemsp.sp X X
 <OPENF->3> 21:^ o/manymemsp.sp                       -
 <getsp->d> Header:  4096 RSP ORDER001         T  1.0000E+00  2.0000E+00  1.0000E+00  2.7108E-01  3.9498E+01  9.5000E-01
 <GetsSt>>> Unit 21 tag RSP. VarRedFac=    1.0000, DegFreed=      2.00
 <GetsCn>>> conf.limits:   2.7108E-01  3.9498E+01 lvl: 0.950 0.950
 <Main-->>> read done, n=  4096 dt=  1.0000E+00 stats: T  1.0000E+00  2.0000E+00 conf:  2.7108E-01  3.9498E+01 lvl:0.950
 <GETSP->>> REAL #21:o/manymemsp.sp - contains ->RSP<>ORDER001><        <- bins 0... 4096
 <GETSP->>> REAL #21:o/manymemsp.sp - contains ->RSP<>ORDER002><        <- bins 0... 4096
 <GETSP->>> REAL #21:o/manymemsp.sp - contains ->RSP<>ORDER003><        <- bins 0... 4096
 <GETSP->>>  EOF #21:o/manymemsp.sp

splist -nORDER002 o/manymemsp.sp RSP

(5)   Coherence, a) the estimates, b) the confidence intervals for GMT psxy -Ey...

          splist -q -cpd -f0     o/bprios-ochy.psp KOH
          splist -q -cpd -f0 -EH o/bprios-ochy.psp KOH KOC