com.isti.jevalresp
Class RunDirect

java.lang.Object
  extended by com.isti.jevalresp.Run
      extended by com.isti.jevalresp.RunDirect

public class RunDirect
extends Run

Class RunDirect is an extension of 'Run' that supports input and output via method calls for the processing of a single response.


Field Summary
static int ACCEL_UNIT_CONV
          Unit conversion type index value for "acceleration" (3).
static int DEFAULT_UNIT_CONV
          Unit conversion type index value for "default" (0).
static int DISPLACE_UNIT_CONV
          Unit conversion type index value for "displacement" (1).
static int VELOCITY_UNIT_CONV
          Unit conversion type index value for "velocity" (2).
 
Fields inherited from class com.isti.jevalresp.Run
b62XValue, b62XValueProp, beginCalObj, chaNamesArray, debugFlag, debugFlagProp, endCalObj, endDayProp, endTimeProp, endYearProp, errorMessage, exitStatusValue, fileNameProp, fileNameString, frequenciesArray, HDR_CMT_STR, headerFlag, headerFlagProp, INTERP_TENSION_DEFVAL, interpInputFlagProp, interpListFlagProp, interpTensionProp, listInterpInFlag, listInterpOutFlag, listInterpTension, locationIdProp, logSpacingFlag, maxFreqValue, minFreqValue, minimumFrequencyFlag, multiOutFlag, multiOutFlagProp, multiSvrFlag, multiSvrFlagProp, netNamesArray, networkIdProp, numberFreqs, outputDirectory, outputDirectoryProp, outUnitsConvIdx, outUnitsConvProp, paramProps, PROGRAM_NAME, propsFileProp, propsFileString, RESP_AP_TYPEIDX, RESP_AP2_TYPEIDX, RESP_CS_TYPEIDX, RESP_FAP_TYPEIDX, RESP_TYPE_LONGSTRS, RESP_TYPE_STRS, responseTypeProp, respTypeIndex, REVISION_STR, showInputFlag, showInputFlagProp, siteNamesArray, stageNumbersProp, staNamesArray, startStageNum, stdioFlag, stdioFlagProp, stopStageNum, timeFmtObj, timeOfDayProp, totalSensitFlag, totalSensitFlagProp, TYPE_SPACE_LONGSTRS, TYPE_SPACE_STRS, typeOfSpacingProp, UNIT_CONV_DEFIDX, UNIT_CONV_LONGSTRS, UNIT_CONV_STRS, unwrapPhaseFlag, unwrapPhaseFlagProp, useDelayFlag, useDelayFlagProp, VER1_STR, VER2_STR, verboseFlag, verboseFlagProp, VERSION_NUM_STR
 
Constructor Summary
RunDirect()
           
 
Method Summary
 java.lang.Double getSingleResponseAmpVal(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, java.util.Date dateObj, int outUnitsConvIdx, java.lang.String fileNameParam, double freqVal)
          Finds and processes one response at a single frequency, returning the resulting amplitude value.
 java.lang.Double getSingleResponseAmpVal(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, java.util.Date dateObj, int outUnitsConvIdx, java.lang.String fileNameParam, double freqVal, int startStageNum, int stopStageNum, boolean stdioFlag)
          Finds and processes one response at a single frequency, returning the resulting amplitude value.
 java.lang.Double getSingleResponseAmpVal(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, int yearVal, int dayVal, int outUnitsConvIdx, java.lang.String fileNameParam, double freqVal)
          Finds and processes one response at a single frequency, returning the resulting amplitude value.
static void main(java.lang.String[] args)
          Test program.
 OutputGenerator processOneResponse(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, java.util.Date dateObj, int outUnitsConvIdx, java.lang.String fileNameParam, double[] freqArr, int startStageNum, int stopStageNum, boolean stdioFlag)
          Finds and processes one response, returning the output in an 'OutputGenerator' object.
 OutputGenerator processOneResponse(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, java.util.Date dateObj, int outUnitsConvIdx, java.lang.String fileNameParam, double[] freqArr, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean stdioFlag)
          Finds and processes one response, returning the output in an 'OutputGenerator' object.
 OutputGenerator processOneResponse(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, java.util.Date dateObj, int outUnitsConvIdx, java.lang.String fileNameParam, double[] freqArr, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, boolean stdioFlag)
          Finds and processes one response, returning the output in an 'OutputGenerator' object.
 OutputGenerator processOneResponse(java.lang.String stationStr, java.lang.String channelStr, java.lang.String networkStr, java.lang.String siteStr, java.util.Date dateObj, int outUnitsConvIdx, java.lang.String fileNameParam, double[] freqArr, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, double b62XValue, boolean stdioFlag)
          Finds and processes one response, returning the output in an 'OutputGenerator' object.
 
Methods inherited from class com.isti.jevalresp.Run
addTimeToCalendar, checkWebServicesServer, clearErrorMessage, enterStartStopStageNums, generateNetResponses, generateResponses, generateWebResponses, getConsoleOut, getErrorFlag, getErrorMessage, getExitStatusValue, listToStringArray, optionsArrToString, preprocessParameters, processAndOutput, processNonSwitchParams, processSwitchParams, setErr, setErrorMessage, unitInfoStr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_UNIT_CONV

public static final int DEFAULT_UNIT_CONV
Unit conversion type index value for "default" (0).

See Also:
Constant Field Values

DISPLACE_UNIT_CONV

public static final int DISPLACE_UNIT_CONV
Unit conversion type index value for "displacement" (1).

See Also:
Constant Field Values

VELOCITY_UNIT_CONV

public static final int VELOCITY_UNIT_CONV
Unit conversion type index value for "velocity" (2).

See Also:
Constant Field Values

ACCEL_UNIT_CONV

public static final int ACCEL_UNIT_CONV
Unit conversion type index value for "acceleration" (3).

See Also:
Constant Field Values
Constructor Detail

RunDirect

public RunDirect()
Method Detail

processOneResponse

public OutputGenerator processOneResponse(java.lang.String stationStr,
                                          java.lang.String channelStr,
                                          java.lang.String networkStr,
                                          java.lang.String siteStr,
                                          java.util.Date dateObj,
                                          int outUnitsConvIdx,
                                          java.lang.String fileNameParam,
                                          double[] freqArr,
                                          int startStageNum,
                                          int stopStageNum,
                                          boolean useDelayFlag,
                                          boolean listInterpOutFlag,
                                          boolean listInterpInFlag,
                                          double listInterpTension,
                                          boolean unwrapPhaseFlag,
                                          boolean totalSensitFlag,
                                          double b62XValue,
                                          boolean stdioFlag)
Finds and processes one response, returning the output in an 'OutputGenerator' object.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
dateObj - date to search for, or null to accept all dates.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqArr - an array of frequency values to use.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
listInterpOutFlag - true to interpolate amp/phase output from responses containing List blockettes.
listInterpInFlag - true to interpolate amp/phase input from List blockettes in responses (before output is calculated).
listInterpTension - tension value for List-blockette interpolation algorithm.
unwrapPhaseFlag - true to unwrap phase output values.
totalSensitFlag - true to use stage 0 (total) sensitivity; false to use computed sensitivity.
b62XValue - sample value for polynomial blockette (62).
stdioFlag - true for input from 'stdin', false for input from file.
Returns:
An 'OutputGenerator' object, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

processOneResponse

public OutputGenerator processOneResponse(java.lang.String stationStr,
                                          java.lang.String channelStr,
                                          java.lang.String networkStr,
                                          java.lang.String siteStr,
                                          java.util.Date dateObj,
                                          int outUnitsConvIdx,
                                          java.lang.String fileNameParam,
                                          double[] freqArr,
                                          int startStageNum,
                                          int stopStageNum,
                                          boolean useDelayFlag,
                                          boolean listInterpOutFlag,
                                          boolean listInterpInFlag,
                                          double listInterpTension,
                                          boolean unwrapPhaseFlag,
                                          boolean totalSensitFlag,
                                          boolean stdioFlag)
Finds and processes one response, returning the output in an 'OutputGenerator' object.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
dateObj - date to search for, or null to accept all dates.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqArr - an array of frequency values to use.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
listInterpOutFlag - true to interpolate amp/phase output from responses containing List blockettes.
listInterpInFlag - true to interpolate amp/phase input from List blockettes in responses (before output is calculated).
listInterpTension - tension value for List-blockette interpolation algorithm.
unwrapPhaseFlag - true to unwrap phase output values.
totalSensitFlag - true to use stage 0 (total) sensitivity; false to use computed sensitivity.
stdioFlag - true for input from 'stdin', false for input from file.
Returns:
An 'OutputGenerator' object, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

processOneResponse

public OutputGenerator processOneResponse(java.lang.String stationStr,
                                          java.lang.String channelStr,
                                          java.lang.String networkStr,
                                          java.lang.String siteStr,
                                          java.util.Date dateObj,
                                          int outUnitsConvIdx,
                                          java.lang.String fileNameParam,
                                          double[] freqArr,
                                          int startStageNum,
                                          int stopStageNum,
                                          boolean useDelayFlag,
                                          boolean listInterpOutFlag,
                                          boolean listInterpInFlag,
                                          double listInterpTension,
                                          boolean stdioFlag)
Finds and processes one response, returning the output in an 'OutputGenerator' object.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
dateObj - date to search for, or null to accept all dates.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqArr - an array of frequency values to use.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
useDelayFlag - true to use estimated delay in phase calculation.
listInterpOutFlag - true to interpolate amp/phase output from responses containing List blockettes.
listInterpInFlag - true to interpolate amp/phase input from List blockettes in responses (before output is calculated).
listInterpTension - tension value for List-blockette interpolation algorithm.
stdioFlag - true for input from 'stdin', false for input from file.
Returns:
An 'OutputGenerator' object, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

processOneResponse

public OutputGenerator processOneResponse(java.lang.String stationStr,
                                          java.lang.String channelStr,
                                          java.lang.String networkStr,
                                          java.lang.String siteStr,
                                          java.util.Date dateObj,
                                          int outUnitsConvIdx,
                                          java.lang.String fileNameParam,
                                          double[] freqArr,
                                          int startStageNum,
                                          int stopStageNum,
                                          boolean stdioFlag)
Finds and processes one response, returning the output in an 'OutputGenerator' object.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
dateObj - date to search for, or null to accept all dates.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqArr - an array of frequency values to use.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
stdioFlag - true for input from 'stdin', false for input from file.
Returns:
An 'OutputGenerator' object, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

getSingleResponseAmpVal

public java.lang.Double getSingleResponseAmpVal(java.lang.String stationStr,
                                                java.lang.String channelStr,
                                                java.lang.String networkStr,
                                                java.lang.String siteStr,
                                                java.util.Date dateObj,
                                                int outUnitsConvIdx,
                                                java.lang.String fileNameParam,
                                                double freqVal,
                                                int startStageNum,
                                                int stopStageNum,
                                                boolean stdioFlag)
Finds and processes one response at a single frequency, returning the resulting amplitude value.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
dateObj - date to search for, or null to accept all dates.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqVal - frequency value to use.
startStageNum - if greater than zero then the start of the range of stage sequence numbers to use, otherwise all stages are used.
stopStageNum - if greater than zero then the end of the range of stage sequence numbers to use, otherwise only the single stage specified by 'startStageNum' is used.
stdioFlag - true for input from 'stdin', false for input from file.
Returns:
A 'Double' object containing the resulting amplitude value, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

getSingleResponseAmpVal

public java.lang.Double getSingleResponseAmpVal(java.lang.String stationStr,
                                                java.lang.String channelStr,
                                                java.lang.String networkStr,
                                                java.lang.String siteStr,
                                                java.util.Date dateObj,
                                                int outUnitsConvIdx,
                                                java.lang.String fileNameParam,
                                                double freqVal)
Finds and processes one response at a single frequency, returning the resulting amplitude value.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
dateObj - date to search for, or null to accept all dates.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqVal - frequency value to use.
Returns:
A 'Double' object containing the resulting amplitude value, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

getSingleResponseAmpVal

public java.lang.Double getSingleResponseAmpVal(java.lang.String stationStr,
                                                java.lang.String channelStr,
                                                java.lang.String networkStr,
                                                java.lang.String siteStr,
                                                int yearVal,
                                                int dayVal,
                                                int outUnitsConvIdx,
                                                java.lang.String fileNameParam,
                                                double freqVal)
Finds and processes one response at a single frequency, returning the resulting amplitude value.

Parameters:
stationStr - station name to search for, or a null or empty string to accept all station names.
channelStr - channel name to search for, or a null or empty string to accept all channel names.
networkStr - network name to search for, or a null or empty string to accept all network names.
siteStr - site name to search for, or a null or empty string to accept all site names.
yearVal - year to search for, or 0 to accept all dates.
dayVal - day-of-year to search for, or 0 for none.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
freqVal - frequency value to use.
Returns:
A 'Double' object containing the resulting amplitude value, or null if an error occurred (in which case 'getErrorMessage()' may be used to fetch information about the error).

main

public static void main(java.lang.String[] args)
Test program.

Parameters:
args - program arguments.