Thread: a problem while downsampling sac data with decimate

Started: 2010-05-25 22:01:31
Last activity: 2010-05-25 22:01:31
Topics: SAC Help
Hi All

When I tried to downsample a sac data using decimate command,I encountered a
curious problem on the delta change.
Suppose we have one data with samplng rate 100hz, and we want to downsample
to 1hz.
the cmd I used is
decimate 5, now delta=0.05;
decimate 5 now=delta=0.25
decimate 2 now delta=0.5
decimate 2 now delta=0.999999

in the final step the delta is 0.999999 instead of 1.0. Since our later
processing need to check the consistent of sachdr.delta and we have some
LHZ sac with delta=1.0, we need to make the downsampled-data's delta to be
1.0 ,not 0.9999999.

Is there any way to aviod the 0.99999 thing ? Or we can forcely change delta
to 1.0 using ch delta 1.0 without bad effects for later processing ?

And there is another question, can sac cmd " interp "be used to downsamp
origin data ? is it differ from decimate ?

thanks for all your help in advance.

wt

16:55:31 v.22510d55