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 static java.lang.String[] bandCodeHeuristic
           
protected static java.lang.String[] gainCodeHeuristic
           
protected static java.lang.String[] siteCodeHeuristic
           
 
Constructor Summary
BestChannelUtil()
           
 
Method Summary
static edu.iris.Fissures.IfNetwork.Channel getActiveChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan, edu.iris.Fissures.IfNetwork.Channel current, edu.iris.Fissures.model.MicroSecondDate when)
          Trys to find a channel whose effect time overlaps the given time and which has the same network, station, site and channel codes as the given channel id.
static java.lang.String getBand(edu.iris.Fissures.IfNetwork.Channel chan)
           
static java.lang.String getBand(java.lang.String channelCode)
           
static java.lang.String[] getBandCodeHeuristic()
           
static edu.iris.Fissures.IfNetwork.Channel[] getBestMotionVector(edu.iris.Fissures.IfNetwork.Channel[] allChannels)
           
static edu.iris.Fissures.IfNetwork.Channel[] getBestMotionVector(edu.iris.Fissures.IfNetwork.Channel[] allChannels, java.lang.String bandCode)
           
static edu.iris.Fissures.IfNetwork.Channel getChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan, java.lang.String bandCode, java.lang.String orientationCode)
           
static edu.iris.Fissures.IfNetwork.Channel getChannel(edu.iris.Fissures.IfNetwork.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 edu.iris.Fissures.IfNetwork.Channel getChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan, java.lang.String bandCode, java.lang.String orientationCode, java.lang.String siteCode, java.lang.String gainCode)
           
static edu.iris.Fissures.IfNetwork.Channel[] getChannels(edu.iris.Fissures.IfNetwork.Channel[] staChans, java.lang.String bc)
           
static java.lang.String getGain(edu.iris.Fissures.IfNetwork.Channel chan)
           
static java.lang.String getGain(java.lang.String channelCode)
           
static java.lang.String[] getGainCodeHeuristic()
           
static edu.iris.Fissures.IfNetwork.Channel[] getHorizontalChannels(edu.iris.Fissures.IfNetwork.Channel[] inChan, java.lang.String bandCode)
          finds the best horizontal channels for the band code.
static java.lang.String getOrientation(edu.iris.Fissures.IfNetwork.Channel chan)
           
static java.lang.String getOrientation(java.lang.String channelCode)
           
static java.lang.String[] getSiteCodeHeuristic()
           
static edu.iris.Fissures.IfNetwork.Channel getVerticalChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan, java.lang.String bandCode)
          finds the best vertical channel for the band code.
static edu.iris.Fissures.IfNetwork.Channel[] pruneChannels(edu.iris.Fissures.IfNetwork.Channel[] inChan, edu.iris.Fissures.model.MicroSecondDate when)
          Prunes channels whose effective time does not overlap the given time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

siteCodeHeuristic

protected static final java.lang.String[] siteCodeHeuristic

gainCodeHeuristic

protected static final java.lang.String[] gainCodeHeuristic

bandCodeHeuristic

protected static final java.lang.String[] bandCodeHeuristic
Constructor Detail

BestChannelUtil

public BestChannelUtil()
Method Detail

getSiteCodeHeuristic

public static java.lang.String[] getSiteCodeHeuristic()

getGainCodeHeuristic

public static java.lang.String[] getGainCodeHeuristic()

getBandCodeHeuristic

public static java.lang.String[] getBandCodeHeuristic()

getBestMotionVector

public static edu.iris.Fissures.IfNetwork.Channel[] getBestMotionVector(edu.iris.Fissures.IfNetwork.Channel[] allChannels)

getBestMotionVector

public static edu.iris.Fissures.IfNetwork.Channel[] getBestMotionVector(edu.iris.Fissures.IfNetwork.Channel[] allChannels,
                                                                        java.lang.String bandCode)

pruneChannels

public static edu.iris.Fissures.IfNetwork.Channel[] pruneChannels(edu.iris.Fissures.IfNetwork.Channel[] inChan,
                                                                  edu.iris.Fissures.model.MicroSecondDate when)
Prunes channels whose effective time does not overlap the given time.


getActiveChannel

public static edu.iris.Fissures.IfNetwork.Channel getActiveChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan,
                                                                   edu.iris.Fissures.IfNetwork.Channel current,
                                                                   edu.iris.Fissures.model.MicroSecondDate when)
Trys to find a channel whose effect time overlaps the given time and which has the same network, station, site and channel codes as the given channel id.


getVerticalChannel

public static edu.iris.Fissures.IfNetwork.Channel getVerticalChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan,
                                                                     java.lang.String bandCode)
finds the best vertical channel for the band code. All channels are assumed to come from the same station.


getHorizontalChannels

public static edu.iris.Fissures.IfNetwork.Channel[] getHorizontalChannels(edu.iris.Fissures.IfNetwork.Channel[] inChan,
                                                                          java.lang.String bandCode)
finds the best horizontal channels for the band code. All channels are assumed to come from the same station. Makes sure that the 2 channels have the same gain and site.


getBand

public static java.lang.String getBand(edu.iris.Fissures.IfNetwork.Channel chan)

getBand

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

getGain

public static java.lang.String getGain(edu.iris.Fissures.IfNetwork.Channel chan)

getGain

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

getOrientation

public static java.lang.String getOrientation(edu.iris.Fissures.IfNetwork.Channel chan)

getOrientation

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

getChannels

public static edu.iris.Fissures.IfNetwork.Channel[] getChannels(edu.iris.Fissures.IfNetwork.Channel[] staChans,
                                                                java.lang.String bc)

getChannel

public static edu.iris.Fissures.IfNetwork.Channel getChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan,
                                                             java.lang.String bandCode,
                                                             java.lang.String orientationCode)

getChannel

public static edu.iris.Fissures.IfNetwork.Channel getChannel(edu.iris.Fissures.IfNetwork.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 edu.iris.Fissures.IfNetwork.Channel getChannel(edu.iris.Fissures.IfNetwork.Channel[] inChan,
                                                             java.lang.String bandCode,
                                                             java.lang.String orientationCode,
                                                             java.lang.String siteCode,
                                                             java.lang.String gainCode)