edu.sc.seis.sod.process.waveform.vector
Class IterDecon

java.lang.Object
  extended by edu.sc.seis.sod.process.waveform.vector.IterDecon

public class IterDecon
extends java.lang.Object

IterDecon.java Java version of fortran iterdecon by Chuck Ammon http://eqseis.geosc.psu.edu/~cammon/HTML/RftnDocs/rftn01.html Also see Ligorria, J., and C. Ammon, Iterative deconvolution and receiver-function estimation, Bull., Seis. Soc. Am., 89 (5), 1395-1400, 1999. Created: Sat Mar 23 18:24:29 2002


Field Summary
protected  float gwidthFactor
           
protected  int maxBumps
           
protected  float tol
           
protected  boolean useAbsVal
           
protected static boolean useNativeFFT
           
protected static boolean useOregonDSPFFT
           
 
Constructor Summary
IterDecon(int maxBumps, boolean useAbsVal, float tol, float gwidthFactor)
           
 
Method Summary
static float[] correlateNorm(float[] fdata, float[] gdata)
          computes the correlation of f and g normalized by the zero-lag autocorrelation of g.
static float[] forwardFFT(float[] x)
           
static float[] gaussianFilter(float[] x, float gwidthFactor, float dt)
          convolve a function with a unit-area Gaussian filter.
static int getAbsMaxIndex(float[] data)
           
static int getMaxIndex(float[] data)
           
static int getMinIndex(float[] data)
           
static float[] getResidual(float[] x, float[] y)
          returns the residual, ie x-y
static float[] inverseFFT(float[] x)
           
static float[] lengthenFFT(float[] tmp)
           
static float[] makePowerTwo(float[] data)
           
static int nextPowerTwo(int n)
           
static float[] phaseShift(float[] x, float shift, float dt)
           
static float power(float[] data)
           
 IterDeconResult process(float[] numerator, float[] denominator, float dt)
           
static float[] shortenFFT(float[] tmp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxBumps

protected int maxBumps

useAbsVal

protected boolean useAbsVal

tol

protected float tol

gwidthFactor

protected float gwidthFactor

useNativeFFT

protected static boolean useNativeFFT

useOregonDSPFFT

protected static boolean useOregonDSPFFT
Constructor Detail

IterDecon

public IterDecon(int maxBumps,
                 boolean useAbsVal,
                 float tol,
                 float gwidthFactor)
Method Detail

process

public IterDeconResult process(float[] numerator,
                               float[] denominator,
                               float dt)
                        throws ZeroPowerException
Throws:
ZeroPowerException

correlateNorm

public static float[] correlateNorm(float[] fdata,
                                    float[] gdata)
computes the correlation of f and g normalized by the zero-lag autocorrelation of g.


getResidual

public static float[] getResidual(float[] x,
                                  float[] y)
returns the residual, ie x-y


getAbsMaxIndex

public static int getAbsMaxIndex(float[] data)

getMinIndex

public static final int getMinIndex(float[] data)

getMaxIndex

public static final int getMaxIndex(float[] data)

power

public static final float power(float[] data)

gaussianFilter

public static float[] gaussianFilter(float[] x,
                                     float gwidthFactor,
                                     float dt)
convolve a function with a unit-area Gaussian filter. G(w) = exp(-w^2 / (4 a^2)) The 1D gaussian is: f(x) = 1/(2*PI*sigma) e^(-x^2/(q * sigma^2)) and the impluse response is: g(x) = 1/(2*PI)e^(-sigma^2 * u^2 / 2) If gwidthFactor is zero, does not filter.


shortenFFT

public static float[] shortenFFT(float[] tmp)

lengthenFFT

public static float[] lengthenFFT(float[] tmp)

phaseShift

public static float[] phaseShift(float[] x,
                                 float shift,
                                 float dt)

forwardFFT

public static float[] forwardFFT(float[] x)

inverseFFT

public static float[] inverseFFT(float[] x)

makePowerTwo

public static float[] makePowerTwo(float[] data)

nextPowerTwo

public static int nextPowerTwo(int n)