Thread: Re: Polezero rewrite, features, and demo macros to replace manual figures

Started: 2009-05-08 00:26:26
Last activity: 2009-05-08 00:26:26
Topics: SAC Developers
Dear All -

Here is my rewrite of the transfer documentation, including the points
about responses that Renate Hartog made about units and SAC's
indifference to them (in general).

I've made changes to MacSAC (sorry, Brian) to fix the problem that
Arthur reported about responses in the polezero directory (a typo in a
string constant and an incorrect subroutine call), and added a SUBTYPE
to the NONE response to document resulting physical units. It is
described in the documentation, but, briefly, if your pole-zero
response yields velocity or acceleration, then you can say something
like

transfer from polezero subtype funny.pz to none subtype vel

which will label the output units in the trace as being velocity (or
acceleration or displacement depending on whether SUBTYPE respectively
is VEL ACC or DIS). This is motivated by the EVALRESP options and the
VEL and ACC transfer types (but without the implicit multiplication by
omega).



Something surprising that emerged from this change is that apparently
SAC's preferred acceleration unit is cm/sec**2. Odd: displacement in
nm, velocity in nm/sec and acceleration in cm/sec**2. Perhaps 981 is a
sacred number rather than 9.81e9.

I've also defined a demo subdirectory in SAC's default macro directory
and am starting to place pointers to it in the documentation. This
replaces those hard-to-reproduce figures in the old paper SAC
documentation. For example, here's the demo macro for the TAPER
command:



(Beware that it uses some MacSAC-specific features to restore user
graphics settings to their values prior to the demo, and to check for
an active graphics device.)

Scanning the documentation, there are what look to be SAC PCF- or
PCM-generated figures for BANDPASS, BEGINFRAME, CONTOUR, GTEXT,
HILBERT, PLOT1, PLOT2, PLOTC, SYMBOL, TAPER, WINDOW, and XVPORT. So
with this TAPER offering, we have 1 down, 11 to go. Any code packrats
have old PCF files available, or are there volunteers to back-engineer
them?

On 30 Apr 2009, at 16:24, Arthur Snoke wrote:

In preparing an update for the polezero section of the transfer help
page, I decided to try it (I use polezero files, but not within SAC).
I found that the sample given in the current help message does not
work, and would appreciate comments from those who have used it
(successfully).

Also, the documentation claims that the search will look for a
polezero file in ${SACHOME}/polezero/. I tried that, but it did not
work.

The sample given is

EXAMPLE: suppose the file was named sro.pz and you want to remove the
instrument response from station ABC.Z.

u: READ ABC.Z
u: TRANSFER FROM POLEZERO SUBTYPE SRO.PZ TO NONE

Because the displacement response for any seismometer I have worked
with is zero at zero frequencies, the polezero transfer function is
zero at zero frequency. Taking out an instrument means dividing by
the transfer function in the frequency domain, so the above expression
will either blow up or just give an output waveform that is a sinusoid
at the fundamental frequency.

I got results that compared well with my home-grown method within the
passband of interest by using the line

transfer from polezero subtype M06C.pz to NONE FREQ 0.001 0.007 0.1
0.2

The seismometer is an STS-2 and is the BHZ channel at 40 sps. I had
already used decimate (three times) to reduce the sampling rate to 1
sps.

I typically run the equivalent to SAC rtr before doing the instrument
correction. Should that be included in the sample?

I then moved M06C.pz to my ${SACAUX}/polezero directory, I got the
following:

SAC> transfer from polezero subtype M06C.pz to NONE FREQ 0.001 0.007
0.1 0.2 ERROR 108: File does not exist:
SAC> ls /usr/local/sac/aux/polezero
M06C.pz llsn
SAC>

If it does not work as advertised, we should either remove the
polezero subdirectory or make it work. Comments?

Arthur Snoke
_______________________________________________
sac-help mailing list
sac-help<at>iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help

George

23:11:51 v.01697673