Package edu.sc.seis.TauP
Class TauModelLoader
- java.lang.Object
-
- edu.sc.seis.TauP.TauModelLoader
-
public class TauModelLoader extends java.lang.Objectstatic class that loads a tau model, after searching for it. It can be extended to change the search mechanism.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>defaultModelListstatic java.util.Map<java.lang.String,VelocityModel>otherVelocityModelsprotected static java.lang.StringpackageName
-
Constructor Summary
Constructors Constructor Description TauModelLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddToCache(java.lang.String modelName, TauModel tMod)static voidclearCache()static TauModelcreateTauModel(VelocityModel vMod)static TauModelcreateTauModel(VelocityModel vMod, java.util.Properties toolProps)static TauModelinternalLoad(java.lang.String modelName, java.lang.String searchPath, boolean verbose)static TauModelload(java.lang.String modelName)static TauModelload(java.lang.String modelName, java.lang.String searchPath)Reads the velocity model, slowness model, and tau model from a file saved using Java's Serializable interface.static TauModelload(java.lang.String modelName, java.lang.String searchPath, boolean verbose)protected static TauModelloadFromCache(java.lang.String modelName)static VelocityModelloadVelocityModel(java.lang.String modelName)static VelocityModelloadVelocityModel(java.lang.String modelName, java.lang.String fileType)Loads velocity mode, either by name.
-
-
-
Field Detail
-
packageName
protected static java.lang.String packageName
-
defaultModelList
public static java.util.List<java.lang.String> defaultModelList
-
otherVelocityModels
public static java.util.Map<java.lang.String,VelocityModel> otherVelocityModels
-
-
Method Detail
-
load
public static TauModel load(java.lang.String modelName) throws TauModelException
- Throws:
TauModelException
-
load
public static TauModel load(java.lang.String modelName, java.lang.String searchPath) throws TauModelException
Reads the velocity model, slowness model, and tau model from a file saved using Java's Serializable interface.- Throws:
TauModelException
-
load
public static TauModel load(java.lang.String modelName, java.lang.String searchPath, boolean verbose) throws TauModelException
- Throws:
TauModelException
-
addToCache
public static void addToCache(java.lang.String modelName, TauModel tMod)
-
internalLoad
public static TauModel internalLoad(java.lang.String modelName, java.lang.String searchPath, boolean verbose) throws TauModelException
- Throws:
TauModelException
-
loadVelocityModel
public static VelocityModel loadVelocityModel(java.lang.String modelName) throws java.io.IOException, VelocityModelException
- Throws:
java.io.IOExceptionVelocityModelException
-
loadVelocityModel
public static VelocityModel loadVelocityModel(java.lang.String modelName, java.lang.String fileType) throws java.io.IOException, VelocityModelException
Loads velocity mode, either by name. Looking inside jar for standard models, as file from current directory.- Parameters:
modelName- name of model or file name- Returns:
- Throws:
java.io.IOExceptionVelocityModelException
-
createTauModel
public static TauModel createTauModel(VelocityModel vMod) throws SlownessModelException, TauModelException, java.io.IOException
- Throws:
SlownessModelExceptionTauModelExceptionjava.io.IOException
-
createTauModel
public static TauModel createTauModel(VelocityModel vMod, java.util.Properties toolProps) throws SlownessModelException, TauModelException
-
loadFromCache
protected static TauModel loadFromCache(java.lang.String modelName)
-
clearCache
public static void clearCache()
-
-