edu.sc.seis.fissuresUtil.cache
Class InstrumentationLoader

java.lang.Object
  extended by java.lang.Thread
      extended by edu.sc.seis.fissuresUtil.cache.InstrumentationLoader
All Implemented Interfaces:
java.lang.Runnable

public class InstrumentationLoader
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
InstrumentationLoader()
           
 
Method Summary
protected  void addToQueue(edu.sc.seis.fissuresUtil.cache.InstrumentationLoader.WorkUnit work)
           
static void checkResponse(edu.iris.Fissures.IfNetwork.Response resp)
           
protected  edu.sc.seis.fissuresUtil.cache.InstrumentationLoader.WorkUnit getFromQueue()
           
 void getInstrumentation(DataSetSeismogram seis, edu.iris.Fissures.IfNetwork.NetworkAccess net)
           
protected  boolean isEmpty()
           
static boolean isValid(edu.iris.Fissures.IfNetwork.Instrumentation inst)
           
static boolean isValid(edu.iris.Fissures.IfNetwork.Response resp)
           
static boolean isValid(edu.iris.Fissures.IfNetwork.Sensitivity sens)
           
static boolean isValidSensitivity(edu.iris.Fissures.model.QuantityImpl sens)
           
static void repairResponse(edu.iris.Fissures.IfNetwork.Response resp)
          Checks for nonsense sensitivity (overall gain of -1) and trys to repair by multiplying the gains of the individual stages.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstrumentationLoader

public InstrumentationLoader()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

repairResponse

public static void repairResponse(edu.iris.Fissures.IfNetwork.Response resp)
                           throws InvalidResponse
Checks for nonsense sensitivity (overall gain of -1) and trys to repair by multiplying the gains of the individual stages. This only works if all the frequencys are either the same or zero. We assume a frequency of zero means that there is no frequnecy dependence for this stage.

Throws:
InvalidResponse

isEmpty

protected boolean isEmpty()

getFromQueue

protected edu.sc.seis.fissuresUtil.cache.InstrumentationLoader.WorkUnit getFromQueue()
                                                                              throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

addToQueue

protected void addToQueue(edu.sc.seis.fissuresUtil.cache.InstrumentationLoader.WorkUnit work)

getInstrumentation

public void getInstrumentation(DataSetSeismogram seis,
                               edu.iris.Fissures.IfNetwork.NetworkAccess net)

isValidSensitivity

public static boolean isValidSensitivity(edu.iris.Fissures.model.QuantityImpl sens)

isValid

public static boolean isValid(edu.iris.Fissures.IfNetwork.Sensitivity sens)

isValid

public static boolean isValid(edu.iris.Fissures.IfNetwork.Instrumentation inst)

isValid

public static boolean isValid(edu.iris.Fissures.IfNetwork.Response resp)

checkResponse

public static void checkResponse(edu.iris.Fissures.IfNetwork.Response resp)
                          throws InvalidResponse
Throws:
InvalidResponse