Thread: Re: plot2 error -1 solved

Started: 2019-08-04 15:39:09
Last activity: 2019-08-04 15:39:09
Topics: SAC Help
Guust Nolet
2019-08-04 15:39:09
I found the culprit: it was my default fileid command defined during startup. Inserting <fileid off> before plot2 results in a successful plot.

Obviously, plot2 reacts differently from plot and plot1 when header variables are undefined in fileid.

Guust Nolet


On 4 Aug 2019, at 13:53, Guust Nolet <nolet<at>Princeton.EDU<nolet<at>Princeton.EDU>> wrote:

I have this mysterious error -1 when I wish to plot two home-made SAC files with command plot2.

Originally I worked with binary versions of the SAC files. I recreated the error with a shorter version.
of these files, so it is easier to see.

I converted these files to alphanumeric (attached) and cannot see anything wrong. After reading,
the plot and plot1 commands work fine until I call plot2. After that plot1 one gives an empty plot
for the first file. p2 does not seem to have changed the header, and plotting with p shows both
signals OK.

Here is a copy from my terminal window:

$ sac
SEISMIC ANALYSIS CODE [11/11/2013 (Version 101.6a)]
Copyright 1995 Regents of the University of California

qdp off
fileid type list kstnm gcarc
fileid LOCATION UL
xlabel "Time (s)"
SAC> r alpha f1.xy f2.xy
SAC> p1
SAC> lh columns 2


FILE: f1.xy - 1
-----------

NPTS = 401 B = 0.000000e+00
E = 2.000000e+01 IFTYPE = TIME SERIES FILE
LEVEN = TRUE DELTA = 5.000000e-02
DEPMIN = 1.542398e-02 DEPMAX = 1.585907e+00
DEPMEN = 3.535587e-01 KZDATE = JAN 01 (001), 2019
KZTIME = 00:00:00.000 IZTYPE = BEGIN TIME
LOVROK = TRUE NVHDR = 6
LPSPOL = FALSE LCALDA = TRUE

FILE: f2.xy - 2
-----------

NPTS = 401 B = 0.000000e+00
E = 2.000000e+01 IFTYPE = TIME SERIES FILE
LEVEN = TRUE DELTA = 5.000000e-02
DEPMIN = 0.000000e+00 DEPMAX = 1.000000e+00
DEPMEN = 4.538653e-01 KZDATE = JAN 01 (001), 2019
KZTIME = 00:00:00.000 IZTYPE = BEGIN TIME
LOVROK = TRUE NVHDR = 6
LPSPOL = FALSE LCALDA = TRUE
SAC> p2
ERROR -1:
SAC> p1
SAC> lh


FILE: f1.xy - 1
-----------

NPTS = 401 B = 0.000000e+00
E = 2.000000e+01 IFTYPE = TIME SERIES FILE
LEVEN = TRUE DELTA = 5.000000e-02
DEPMIN = 1.542398e-02 DEPMAX = 1.585907e+00
DEPMEN = 3.535587e-01 KZDATE = JAN 01 (001), 2019
KZTIME = 00:00:00.000 IZTYPE = BEGIN TIME
LOVROK = TRUE NVHDR = 6
LPSPOL = FALSE LCALDA = TRUE

FILE: f2.xy - 2
-----------

NPTS = 401 B = 0.000000e+00
E = 2.000000e+01 IFTYPE = TIME SERIES FILE
LEVEN = TRUE DELTA = 5.000000e-02
DEPMIN = 0.000000e+00 DEPMAX = 1.000000e+00
DEPMEN = 4.538653e-01 KZDATE = JAN 01 (001), 2019
KZTIME = 00:00:00.000 IZTYPE = BEGIN TIME
LOVROK = TRUE NVHDR = 6
LPSPOL = FALSE LCALDA = TRUE
SAC> p
Waitingp
SAC> q

Does someone have an idea what goes wrong?

Sincerely,
Guust Nolet

<f1.xy><f2.xy>


06:27:14 v.22510d55