For an forward FFT (fft) in SAC the output series is scaled by the
time sampling or delta
For an inverse FFT (ifft) in SAC the output series is scaled by 1/
(delta * npts)
See below for a further discussion, but simply
fg sine 5 npts 1024 delta 0.01
# Put the delta back in
div 0.01
# Scale the FFT by the length of the signal
div 1024
fft
psp am
# Maximum should be around 0.5
writesp tmp
read tmp.am
lh depmax
# depmax should be about 4.671955e-01 (not exactly 0.5, but close)
Cheers
Brian Savage
Begin forwarded message:
Thanks for your reply.
To meet the Paseval's theorem, SAC multiplies the constant 2/T to
the input
trace, thank you very much.
Your sincerely,
Xu W.
************************************************
Dr. WeiWei Xu
Institute of Geology and Geophysics
Chinese Academy of Sciences
P.O.Box 9825
Beijing 100029
China
Tel: 0086-10-62007354(Office)
Fax: 0086-10-62010846
************************************************
Garrett Euler д:
Xu,
SAC scales data in the frequency domain with the time domain sample
interval rather than the npts. Not sure why this is. To correct
for this
multiply amplitudes given in SAC by 2/(npts*delta) where npts and
delta are
the time domain values and the 2 accounts for the energy in the
negative
frequencies.
You'll have to do the multiplying before the fft since SAC doesn't
let you
use mul on spectral data:
2/(1024*0.01) = 0.1953125
funcgen sine 5 npts 1024 delta 0.01
mul 0.1953125
fft
psp am loglin
Garrett
"wwxu" <wwxu<at>mail.iggcas.ac.cn> wrote ..
Hi ALL,
In SAC, I generate a 5Hz sine wave and do fft transforming as follows:
sac> funcgen sine 5 npts 1024 delta 0.01
sac> fft
sac> psp am loglin
and I find that the maximum absolute amplitude is greater than 4 near
frequency 5Hz, but in theory, it should be 0.5 because of amplitude
spectrum symmetry of real series, so could you tell me why?
B.T.W., I also compute the amplitude spectrum using fft program I
wrote
and
find that the result is not the same with SAC generated, I checked the
program carefully and be sure that it's right and conform with the
theoretical result.
thanks for your attention!
Your sincerely,
Xu W.
************************************************
Dr. WeiWei Xu
Institute of Geology and Geophysics
Chinese Academy of Sciences
P.O.Box 9825
Beijing 100029
China
Tel: 0086-10-62007354(Office)
Fax: 0086-10-62010846
************************************************
_______________________________________________
sac-help mailing list
sac-help<at>iris.washington.edu
http://www.iris.washington.edu/mailman/listinfo/sac-help