edu.sc.seis.fissuresUtil.chooser
Class BestChannelUtil

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.chooser.BestChannelUtil

public class BestChannelUtil
extends java.lang.Object


Field Summary
protected  java.lang.String[] bandCodeHeuristic
           
static java.lang.String[] DEFAULT_BAND_CODE_HEURISTIC
           
static java.lang.String[] DEFAULT_GAIN_CODE_HEURISTIC
           
static float DEFAULT_MAX_DIP_OFFSET
           
static java.lang.String[] DEFAULT_ORIENTATION_CODES
           
static java.lang.String[] DEFAULT_SITE_CODE_HEURISTIC
           
protected  java.lang.String[] gainCodeHeuristic
           
protected  float maxDipOffset
           
protected  java.lang.String[] orientationCodeHeuristic
           
protected  java.lang.String[] siteCodeHeuristic
           
 
Constructor Summary
BestChannelUtil()
           
 
Method Summary
static
<T> java.util.List<T>
asList(T... elems)
           
static java.util.List<ChannelImpl> getAllBand(java.util.List<ChannelImpl> inChan, java.lang.String bandCode)
           
 java.util.List<ChannelImpl> getAllHorizontal(java.util.List<ChannelImpl> inChan)
           
 java.util.List<ChannelImpl> getAllVertical(java.util.List<ChannelImpl> inChan)
           
static java.lang.String getBand(Channel chan)
           
static java.lang.String getBand(java.lang.String channelCode)
           
 java.lang.String[] getBandCodeHeuristic()
           
 ChannelImpl getBestChannel(java.util.List<ChannelImpl> inChanList)
           
 ChannelImpl[] getBestMotionVector(java.util.List<ChannelImpl> inChanList)
           
 Channel getBestVerticalChannel(java.util.List<ChannelImpl> inChanList)
           
 Channel getChannel(Channel[] inChan, java.lang.String bandCode, java.lang.String orientationCode)
           
 Channel getChannel(Channel[] inChan, java.lang.String bandCode, java.lang.String orientationCode, java.lang.String siteCode)
          Finds the best channel using a gain heuristic, ie H is preferred over L, and otherwise just find a channel.
static Channel getChannel(Channel[] inChan, java.lang.String bandCode, java.lang.String orientationCode, java.lang.String siteCode, java.lang.String gainCode)
           
 Channel[] getChannels(Channel[] staChans, java.lang.String bc)
           
static java.lang.String getGain(Channel chan)
           
static java.lang.String getGain(java.lang.String channelCode)
           
 java.lang.String[] getGainCodeHeuristic()
           
 float getMaxDipOffset()
           
static java.lang.String getOrientation(Channel chan)
           
static java.lang.String getOrientation(java.lang.String channelCode)
           
 java.lang.String[] getOrientationCodeHeuristic()
           
 java.lang.String[] getSiteCodeHeuristic()
           
static java.util.List<ChannelImpl> pruneChannels(java.util.List<ChannelImpl> inChan, MicroSecondDate when)
          Prunes channels whose effective time does not overlap the given time.
 void setBandCodeHeuristic(java.lang.String[] bandCodeHeuristic)
           
 void setGainCodeHeuristic(java.lang.String[] gainCodeHeuristic)
           
 void setMaxDipOffset(float maxDipOffset)
           
 void setOrientationCodeHeuristic(java.lang.String[] orientationCodes)
           
 void setSiteCodeHeuristic(java.lang.String[] siteCodeHeuristic)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SITE_CODE_HEURISTIC

public static final java.lang.String[] DEFAULT_SITE_CODE_HEURISTIC

DEFAULT_GAIN_CODE_HEURISTIC

public static final java.lang.String[] DEFAULT_GAIN_CODE_HEURISTIC

DEFAULT_BAND_CODE_HEURISTIC

public static final java.lang.String[] DEFAULT_BAND_CODE_HEURISTIC

DEFAULT_ORIENTATION_CODES

public static final java.lang.String[] DEFAULT_ORIENTATION_CODES

DEFAULT_MAX_DIP_OFFSET

public static final float DEFAULT_MAX_DIP_OFFSET
See Also:
Constant Field Values

siteCodeHeuristic

protected java.lang.String[] siteCodeHeuristic

gainCodeHeuristic

protected java.lang.String[] gainCodeHeuristic

bandCodeHeuristic

protected java.lang.String[] bandCodeHeuristic

orientationCodeHeuristic

protected java.lang.String[] orientationCodeHeuristic

maxDipOffset

protected float maxDipOffset
Constructor Detail

BestChannelUtil

public BestChannelUtil()
Method Detail

getMaxDipOffset

public float getMaxDipOffset()

setMaxDipOffset

public void setMaxDipOffset(float maxDipOffset)

getOrientationCodeHeuristic

public java.lang.String[] getOrientationCodeHeuristic()

setOrientationCodeHeuristic

public void setOrientationCodeHeuristic(java.lang.String[] orientationCodes)

setSiteCodeHeuristic

public void setSiteCodeHeuristic(java.lang.String[] siteCodeHeuristic)

setGainCodeHeuristic

public void setGainCodeHeuristic(java.lang.String[] gainCodeHeuristic)

setBandCodeHeuristic

public void setBandCodeHeuristic(java.lang.String[] bandCodeHeuristic)

getSiteCodeHeuristic

public java.lang.String[] getSiteCodeHeuristic()

getGainCodeHeuristic

public java.lang.String[] getGainCodeHeuristic()

getBandCodeHeuristic

public java.lang.String[] getBandCodeHeuristic()

getBestVerticalChannel

public Channel getBestVerticalChannel(java.util.List<ChannelImpl> inChanList)

getBestChannel

public ChannelImpl getBestChannel(java.util.List<ChannelImpl> inChanList)

getBestMotionVector

public ChannelImpl[] getBestMotionVector(java.util.List<ChannelImpl> inChanList)

pruneChannels

public static java.util.List<ChannelImpl> pruneChannels(java.util.List<ChannelImpl> inChan,
                                                        MicroSecondDate when)
Prunes channels whose effective time does not overlap the given time.


getAllHorizontal

public java.util.List<ChannelImpl> getAllHorizontal(java.util.List<ChannelImpl> inChan)

getAllVertical

public java.util.List<ChannelImpl> getAllVertical(java.util.List<ChannelImpl> inChan)

getAllBand

public static java.util.List<ChannelImpl> getAllBand(java.util.List<ChannelImpl> inChan,
                                                     java.lang.String bandCode)

getBand

public static java.lang.String getBand(Channel chan)

getBand

public static java.lang.String getBand(java.lang.String channelCode)

getGain

public static java.lang.String getGain(Channel chan)

getGain

public static java.lang.String getGain(java.lang.String channelCode)

getOrientation

public static java.lang.String getOrientation(Channel chan)

getOrientation

public static java.lang.String getOrientation(java.lang.String channelCode)

getChannels

public Channel[] getChannels(Channel[] staChans,
                             java.lang.String bc)

getChannel

public Channel getChannel(Channel[] inChan,
                          java.lang.String bandCode,
                          java.lang.String orientationCode)

getChannel

public Channel getChannel(Channel[] inChan,
                          java.lang.String bandCode,
                          java.lang.String orientationCode,
                          java.lang.String siteCode)
Finds the best channel using a gain heuristic, ie H is preferred over L, and otherwise just find a channel. Pretty simple, but in many cases it is suffucient.


getChannel

public static Channel getChannel(Channel[] inChan,
                                 java.lang.String bandCode,
                                 java.lang.String orientationCode,
                                 java.lang.String siteCode,
                                 java.lang.String gainCode)

asList

public static <T> java.util.List<T> asList(T... elems)