edu.sc.seis.sod.process.waveform
Class PhaseSignalToNoise

java.lang.Object
  extended by edu.sc.seis.sod.process.waveform.PhaseSignalToNoise
All Implemented Interfaces:
WaveformProcess, SodElement, Subsetter, Threadable
Direct Known Subclasses:
CompoundPhaseSignalToNoise

public class PhaseSignalToNoise
extends java.lang.Object
implements WaveformProcess, Threadable

Calculates triggers, via LongShortSignalToNoise, and checks to see if a trigger exists within +- the time interval for the given phase name. Uses the first phase returned, ignoring later phases, such as triplications. The first trigger within the time window of the phase, if there is one, is added to the cookieJar with key "sod_phaseStoN_"+phaseName for use by later subsetters or later velocity output.


Field Summary
protected  TimeInterval longOffsetBegin
           
protected  TimeInterval longOffsetEnd
           
protected  java.lang.String modelName
           
static java.lang.String PHASE_STON_PREFIX
           
protected  java.lang.String phaseName
           
protected  SimplePhaseStoN phaseStoN
           
protected  float ratio
           
protected  TimeInterval shortOffsetBegin
           
protected  TimeInterval shortOffsetEnd
           
protected  TauPUtil taupUtil
           
protected  TimeInterval triggerWindow
           
 
Constructor Summary
PhaseSignalToNoise(org.w3c.dom.Element config)
           
 
Method Summary
 WaveformResult accept(CacheEvent event, ChannelImpl channel, RequestFilter[] original, RequestFilter[] available, LocalSeismogramImpl[] seismograms, CookieJar cookieJar)
          Processes localSeismograms, possibly modifying them.
 LongShortTrigger calcTrigger(EventAccessOperations event, Channel channel, LocalSeismogramImpl[] seismograms)
          This method exists to make the trigger available to other subsetters or processors so they don't have to call accept, which adds it to the cookieJar.
 java.lang.String getCookieName()
           
 java.lang.String getPhaseName()
           
 boolean isThreadSafe()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PHASE_STON_PREFIX

public static final java.lang.String PHASE_STON_PREFIX
See Also:
Constant Field Values

phaseStoN

protected SimplePhaseStoN phaseStoN

ratio

protected float ratio

phaseName

protected java.lang.String phaseName

shortOffsetBegin

protected TimeInterval shortOffsetBegin

shortOffsetEnd

protected TimeInterval shortOffsetEnd

longOffsetBegin

protected TimeInterval longOffsetBegin

longOffsetEnd

protected TimeInterval longOffsetEnd

modelName

protected java.lang.String modelName

triggerWindow

protected TimeInterval triggerWindow

taupUtil

protected TauPUtil taupUtil
Constructor Detail

PhaseSignalToNoise

public PhaseSignalToNoise(org.w3c.dom.Element config)
                   throws ConfigurationException,
                          edu.sc.seis.TauP.TauModelException
Throws:
ConfigurationException
edu.sc.seis.TauP.TauModelException
Method Detail

isThreadSafe

public boolean isThreadSafe()
Specified by:
isThreadSafe in interface Threadable

accept

public WaveformResult accept(CacheEvent event,
                             ChannelImpl channel,
                             RequestFilter[] original,
                             RequestFilter[] available,
                             LocalSeismogramImpl[] seismograms,
                             CookieJar cookieJar)
                      throws java.lang.Exception
Description copied from interface: WaveformProcess
Processes localSeismograms, possibly modifying them.

Specified by:
accept in interface WaveformProcess
Throws:
java.lang.Exception

calcTrigger

public LongShortTrigger calcTrigger(EventAccessOperations event,
                                    Channel channel,
                                    LocalSeismogramImpl[] seismograms)
                             throws NoPreferredOrigin,
                                    FissuresException,
                                    PhaseNonExistent,
                                    edu.sc.seis.TauP.TauModelException
This method exists to make the trigger available to other subsetters or processors so they don't have to call accept, which adds it to the cookieJar.

Throws:
NoPreferredOrigin
FissuresException
PhaseNonExistent
edu.sc.seis.TauP.TauModelException

getCookieName

public java.lang.String getCookieName()

getPhaseName

public java.lang.String getPhaseName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object