[SAC-HELP] a problem while downsampling sac data with decimate
Arthur Snoke
snoke at vt.edu
Fri Jul 9 13:01:13 PDT 2010
This thread was in late May. Partly as a result of it, I looked more
closely at the INTERPOLATE command. For version 101.4, we replaced the
truncate with a round off when calculating NPTS, but since then I found
other things that should probably be changed. If one uses the current
version carefully, it should work satisfactorily, so a patch is not
required. However, I thought I should post to this list to see if anyone
has any problems with my proposed changes. I am attaching a PDF version
of the revised HELP file.
In the current version, there is a default DELTA of 0.025 s. Hence, if
one enters INTERPOLATE NPTS 4096, the end time will change to a value that
depends on how the input DELTA compares to 0.025. I think that the start
and end times should not change with INTERPOLATE, and do not understand
the need/use of a default DELTA. in the revised version, if NPTS is
called for as an argument, DELTA is calculated -- just as if DELTA is
input, NPTS is calculated.
I do not understand when one would use BEGIN. It seems to me more logical
to use CUT before calling INTERPOLATE. I have left it in, so it can be
used with either NPTS or DELTA.
In the current HELP file, there are logical arguments for NPTS and BEGIN
that are not needed to be mentioned explicitly.
Another calling argument is EPSILON. It is incorrectly described in both
the current HELP file and the source code. It is effectively a "water
level" that gives a lower limit to the ratios that are used in the Wiggins
procedure. I have used this procedure for many years, both in my own
programs and in those written by others. I have never seen a reason to
vary EPSILON and tests show that for a reasonable time series there is no
effect on changing EPSILON by factors of 100. I have left it in, but not
advertised it in the HELP file.
One final comment about this interpolation routine: When Wiggins wrote t
in 1976, it was intended to be used for hand-digitized data. Typically,
one included extrema and (perhaps) inflection points. A difference between
this scheme and cubic splines is that the output file will not have greater
extrema than the input data points. It is also not as smooth as a cubic
spline interpolation because second derivatives are not forced to be
continuous. This scheme works well for data if the DELTA is not changed
too much. Following up on the original thread, it should probably not be
done if one is down-sampling by a large amount both because the fit will
probably not be very good and because there is no anti-aliasing filtering
done within INTERPOLATE. For such a case, it is best to use DECIMATE.
Please comment -- especially if you disagree with anything I have said.
Arthur Snoke
snoke at vt.edu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: INTERPOLATE.pdf
Type: application/pdf
Size: 92436 bytes
Desc:
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20100709/ce6768f4/attachment.pdf>
More information about the sac-help
mailing list