edu.sc.seis.fissuresUtil.bag
Class Transfer
java.lang.Object
edu.sc.seis.fissuresUtil.bag.Transfer
public class Transfer
- extends java.lang.Object
Ok, I'll try outline as I am stumbling with java....
We don't need to do the general transfer with all options,
only deconvolve the pole-zero (or resp if you want the decimation
filters, but I don't see that as useful)
read sac file
remove mean
taper? optional?
find next large power of 2 length
2ˆnext2 > length of sac file (so if sac file is 2ˆn got 2ˆ(n+1)
zeropad to 2ˆnext2
fft => Signal(f)
read pole-zero file (if its a real sac pole zero file,
its already in radians, and its Counts/Meter so its divided to remove)
evaluate at pole-zero file for s=i*2*pi*f
(s-z1)(s-z2)...(s-zn)
_____________________ = PZ(s)
(s-p1)(s-p2)...(s-pm)
where the f are (0,delf,delf*2,...,Fnyquist) and use the conjugate
symmetry as both data and response are real time functions to get the
"negative frequency" values in the second half of the FFT output, unless
its a real fft and stops at Fnyquist.
note that PZ(s) is probably == 0+0i for most instruments, so beware
and divide by zero issues... it should not generally be 0+0i elsewhere.
divide Signal(f) by PS(s)
apply taper as in sac transfer f1, f2, f3, f4
0 below f1 and above f4
linear from 01 to 1 between f1 and f2 and f3 and f4
unity between f2 and f3
to get rid of noise amplification where PZ(s) is small
Inverse FFT
(FFT normalization as needed so its a FFT - IFFT identity)
I think here we should have a sac file to write out
with new header, max.min,mean updated and the rest is
ok. Don't think sac files routinely track data as counts or
physical units....
GR
Method Summary |
edu.iris.Fissures.seismogramDC.LocalSeismogramImpl |
apply(edu.iris.Fissures.seismogramDC.LocalSeismogramImpl seis,
edu.sc.seis.seisFile.sac.SacPoleZero sacPoleZero,
float lowCut,
float lowPass,
float highPass,
float highCut)
|
static Cmplx |
evalPoleZeroInverse(edu.sc.seis.fissuresUtil.bag.PoleZeroTranslator pz,
double freq)
Evaluates the poles and zeros at the given value. |
static double |
freqTaper(double freq,
float lowCut,
float lowPass,
float highPass,
float highCut)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Transfer
public Transfer()
apply
public edu.iris.Fissures.seismogramDC.LocalSeismogramImpl apply(edu.iris.Fissures.seismogramDC.LocalSeismogramImpl seis,
edu.sc.seis.seisFile.sac.SacPoleZero sacPoleZero,
float lowCut,
float lowPass,
float highPass,
float highCut)
throws edu.iris.Fissures.FissuresException
- Throws:
edu.iris.Fissures.FissuresException
evalPoleZeroInverse
public static Cmplx evalPoleZeroInverse(edu.sc.seis.fissuresUtil.bag.PoleZeroTranslator pz,
double freq)
- Evaluates the poles and zeros at the given value. The return value is
1/(pz(s) to avoid divide by zero issues. If there is a divide by zero
situation, then the response is set to be 0+0i.
freqTaper
public static double freqTaper(double freq,
float lowCut,
float lowPass,
float highPass,
float highCut)