com.isti.jevalresp
Class RespProcessor

java.lang.Object
  extended by com.isti.jevalresp.RespProcessor
Direct Known Subclasses:
RespNetProc, RespWebProc

public class RespProcessor
extends java.lang.Object

Class RespProcessor contains high-level processing functions for 'JEvalResp'.


Field Summary
protected  java.lang.String errorMessage
           
protected  boolean headerFlag
           
static java.lang.String LINE_SEP_STR
           
protected  boolean multiOutputFlag
           
protected  int numberErrors
           
protected  int numRespFound
           
protected  java.io.File outputDirectory
           
protected  int outputFileNamesCount
           
protected  java.lang.String outputFileNamesStr
           
static java.lang.String RESP_FILE_PREFIX
           
 
Constructor Summary
RespProcessor(boolean multiOutputFlag, boolean headerFlag, java.io.File outputDirectory)
          Creates a response-processor object.
 
Method Summary
 void clearErrorMessage()
          Clears the error message string.
protected  int doReadResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, RespCallback respCallbackObj, RespFileParser parserObj, java.lang.String idNameAppendStr)
          Finds and reads responses with matching channel IDs, using the given parser object.
 boolean findAndOutputResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, double b62XValue, int respTypeIndex, boolean stdioFlag)
          Finds responses with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, int respTypeIndex, boolean stdioFlag)
          Finds responses with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, int respTypeIndex, boolean stdioFlag)
          Finds responses with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, int respTypeIndex, boolean stdioFlag)
          Finds responses with matching channel IDs, then processes them and writes their output.
 boolean findAndOutputResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, int outUnitsConvIdx, double[] freqArr, boolean logSpacingFlag, boolean verboseFlag, int startStageNum, int stopStageNum, int respTypeIndex, boolean stdioFlag)
          Finds responses with matching channel IDs, then processes them and writes their output.
 boolean findResponses(java.lang.String[] staArr, java.lang.String[] chaArr, java.lang.String[] netArr, java.lang.String[] siteArr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, boolean stdioFlag, RespCallback respCallbackObj)
          Finds responses with matching channel IDs.
 boolean findResponses(java.lang.String staListStr, java.lang.String chaListStr, java.lang.String netListStr, java.lang.String siteListStr, java.util.Date beginDateObj, java.util.Date endDateObj, java.lang.String fileNameParam, boolean stdioFlag, RespCallback respCallbackObj)
          Finds responses with matching channel IDs.
 boolean getErrorFlag()
           
 java.lang.String getErrorMessage()
           
 int getNumberErrors()
           
 int getNumRespFound()
           
 int getOutputFileNamesCount()
           
 java.lang.String getOutputFileNamesStr()
           
 boolean outputData(OutputGenerator outGenObj, edu.iris.Fissures.IfNetwork.ChannelId channelIdObj, java.util.Date respEndDateObj, java.lang.String channelIdFName, int respTypeIndex, boolean stdioFlag)
          Writes the 'evalresp'-style output file or files for the given 'OutputGenerator' object.
 boolean outputData(OutputGenerator outGenObj, edu.iris.Fissures.IfNetwork.ChannelId channelIdObj, java.util.Date respEndDateObj, java.lang.String channelIdFName, int respTypeIndex, java.io.PrintStream stmObj)
          Writes the 'evalresp'-style output file or files for the given 'OutputGenerator' object.
 OutputGenerator processResponse(java.lang.String inFName, edu.iris.Fissures.IfNetwork.Response respObj, double[] freqArr, boolean logSpacingFlag, int outUnitsConvIdx, int startStageNum, int stopStageNum)
          Processes the given response object, calculating the complex spectra output values.
 OutputGenerator processResponse(java.lang.String inFName, edu.iris.Fissures.IfNetwork.Response respObj, double[] freqArr, boolean logSpacingFlag, int outUnitsConvIdx, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension)
          Processes the given response object, calculating the complex spectra output values.
 OutputGenerator processResponse(java.lang.String inFName, edu.iris.Fissures.IfNetwork.Response respObj, double[] freqArr, boolean logSpacingFlag, int outUnitsConvIdx, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag)
          Processes the given response object, calculating the complex spectra output values.
 OutputGenerator processResponse(java.lang.String inFName, edu.iris.Fissures.IfNetwork.Response respObj, double[] freqArr, boolean logSpacingFlag, int outUnitsConvIdx, int startStageNum, int stopStageNum, boolean useDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, double b62XValue)
          Processes the given response object, calculating the complex spectra output values.
protected  void setErrorMessage(java.lang.String str)
          Enters error message (if none previously entered).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESP_FILE_PREFIX

public static final java.lang.String RESP_FILE_PREFIX
See Also:
Constant Field Values

LINE_SEP_STR

public static final java.lang.String LINE_SEP_STR
See Also:
Constant Field Values

multiOutputFlag

protected final boolean multiOutputFlag

headerFlag

protected final boolean headerFlag

numRespFound

protected int numRespFound

errorMessage

protected java.lang.String errorMessage

numberErrors

protected int numberErrors

outputFileNamesStr

protected java.lang.String outputFileNamesStr

outputFileNamesCount

protected int outputFileNamesCount

outputDirectory

protected final java.io.File outputDirectory
Constructor Detail

RespProcessor

public RespProcessor(boolean multiOutputFlag,
                     boolean headerFlag,
                     java.io.File outputDirectory)
Creates a response-processor object.

Parameters:
multiOutputFlag - true to allow multiple response outputs with the same "net.sta.loc.cha" code.
headerFlag - true to enable header information in the output file; false for no header information.
outputDirectory - output directory, or null for current directory.
Method Detail

findAndOutputResponses

public boolean findAndOutputResponses(java.lang.String[] staArr,
                                      java.lang.String[] chaArr,
                                      java.lang.String[] netArr,
                                      java.lang.String[] siteArr,
                                      java.util.Date beginDateObj,
                                      java.util.Date endDateObj,
                                      java.lang.String fileNameParam,
                                      int outUnitsConvIdx,
                                      double[] freqArr,
                                      boolean logSpacingFlag,
                                      boolean verboseFlag,
                                      int startStageNum,
                                      int stopStageNum,
                                      boolean useDelayFlag,
                                      boolean showInputFlag,
                                      boolean listInterpOutFlag,
                                      boolean listInterpInFlag,
                                      double listInterpTension,
                                      boolean unwrapPhaseFlag,
                                      boolean totalSensitFlag,
                                      double b62XValue,
                                      int respTypeIndex,
                                      boolean stdioFlag)
Finds responses with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
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.
showInputFlag - true to show RESP input text (sent to stdout).
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).
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for input from 'stdin' and output to 'stdout', false for input and output via file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputResponses

public boolean findAndOutputResponses(java.lang.String[] staArr,
                                      java.lang.String[] chaArr,
                                      java.lang.String[] netArr,
                                      java.lang.String[] siteArr,
                                      java.util.Date beginDateObj,
                                      java.util.Date endDateObj,
                                      java.lang.String fileNameParam,
                                      int outUnitsConvIdx,
                                      double[] freqArr,
                                      boolean logSpacingFlag,
                                      boolean verboseFlag,
                                      int startStageNum,
                                      int stopStageNum,
                                      boolean useDelayFlag,
                                      boolean showInputFlag,
                                      boolean listInterpOutFlag,
                                      boolean listInterpInFlag,
                                      double listInterpTension,
                                      boolean unwrapPhaseFlag,
                                      boolean totalSensitFlag,
                                      int respTypeIndex,
                                      boolean stdioFlag)
Finds responses with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
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.
showInputFlag - true to show RESP input text (sent to stdout).
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.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for input from 'stdin' and output to 'stdout', false for input and output via file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputResponses

public boolean findAndOutputResponses(java.lang.String[] staArr,
                                      java.lang.String[] chaArr,
                                      java.lang.String[] netArr,
                                      java.lang.String[] siteArr,
                                      java.util.Date beginDateObj,
                                      java.util.Date endDateObj,
                                      java.lang.String fileNameParam,
                                      int outUnitsConvIdx,
                                      double[] freqArr,
                                      boolean logSpacingFlag,
                                      boolean verboseFlag,
                                      int startStageNum,
                                      int stopStageNum,
                                      boolean useDelayFlag,
                                      boolean showInputFlag,
                                      boolean listInterpOutFlag,
                                      boolean listInterpInFlag,
                                      double listInterpTension,
                                      int respTypeIndex,
                                      boolean stdioFlag)
Finds responses with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
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.
showInputFlag - true to show RESP input text (sent to stdout).
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.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for input from 'stdin' and output to 'stdout', false for input and output via file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputResponses

public boolean findAndOutputResponses(java.lang.String[] staArr,
                                      java.lang.String[] chaArr,
                                      java.lang.String[] netArr,
                                      java.lang.String[] siteArr,
                                      java.util.Date beginDateObj,
                                      java.util.Date endDateObj,
                                      java.lang.String fileNameParam,
                                      int outUnitsConvIdx,
                                      double[] freqArr,
                                      boolean logSpacingFlag,
                                      boolean verboseFlag,
                                      int startStageNum,
                                      int stopStageNum,
                                      boolean useDelayFlag,
                                      boolean showInputFlag,
                                      int respTypeIndex,
                                      boolean stdioFlag)
Finds responses with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
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.
showInputFlag - true to show RESP input text (sent to stdout).
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for input from 'stdin' and output to 'stdout', false for input and output via file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findAndOutputResponses

public boolean findAndOutputResponses(java.lang.String[] staArr,
                                      java.lang.String[] chaArr,
                                      java.lang.String[] netArr,
                                      java.lang.String[] siteArr,
                                      java.util.Date beginDateObj,
                                      java.util.Date endDateObj,
                                      java.lang.String fileNameParam,
                                      int outUnitsConvIdx,
                                      double[] freqArr,
                                      boolean logSpacingFlag,
                                      boolean verboseFlag,
                                      int startStageNum,
                                      int stopStageNum,
                                      int respTypeIndex,
                                      boolean stdioFlag)
Finds responses with matching channel IDs, then processes them and writes their output. This is a convenience method that may be used to add a different "front-end" to the program.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
verboseFlag - true for verbose output messages.
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.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for input from 'stdin' and output to 'stdout', false for input and output via file(s).
Returns:
true if successful; false if error (in which case an error message will be sent to 'stderr').

findResponses

public boolean findResponses(java.lang.String[] staArr,
                             java.lang.String[] chaArr,
                             java.lang.String[] netArr,
                             java.lang.String[] siteArr,
                             java.util.Date beginDateObj,
                             java.util.Date endDateObj,
                             java.lang.String fileNameParam,
                             boolean stdioFlag,
                             RespCallback respCallbackObj)
Finds responses with matching channel IDs. Each found channel ID and response is reported via the "RespCallback.responseInfo()' method.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
stdioFlag - true for input from 'stdin', false for input from files.
respCallbackObj - a 'RespCallback' object whose 'responseInfo()' method will be called to report on each response found.
Returns:
true if successful; false if error (in which case 'getErorMessage()' may be used to see information about the error).

doReadResponses

protected int doReadResponses(java.lang.String[] staArr,
                              java.lang.String[] chaArr,
                              java.lang.String[] netArr,
                              java.lang.String[] siteArr,
                              java.util.Date beginDateObj,
                              java.util.Date endDateObj,
                              RespCallback respCallbackObj,
                              RespFileParser parserObj,
                              java.lang.String idNameAppendStr)
Finds and reads responses with matching channel IDs, using the given parser object. Each found channel ID and response is reported via the "RespCallback.responseInfo()' method.

Parameters:
staArr - an array of station name patterns to search for, or a null or empty array to accept all station names.
chaArr - an array of channel name patterns to search for, or a null or empty array to accept all channel names.
netArr - an array of network name patterns to search for, or a null or empty array to accept all network names.
siteArr - an array of site name patterns to search for, or a null or empty array to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
respCallbackObj - a 'RespCallback' object whose 'responseInfo()' method will be called to report on each response found, or 'null' for none.
parserObj - parser object to use.
idNameAppendStr - string to be appended to generated channel-ID filename, or null for none.
Returns:
The number of matching responses found.

findResponses

public boolean findResponses(java.lang.String staListStr,
                             java.lang.String chaListStr,
                             java.lang.String netListStr,
                             java.lang.String siteListStr,
                             java.util.Date beginDateObj,
                             java.util.Date endDateObj,
                             java.lang.String fileNameParam,
                             boolean stdioFlag,
                             RespCallback respCallbackObj)
Finds responses with matching channel IDs. Each found channel ID and response is reported via the "RespCallback.responseInfo()' method.

Parameters:
staListStr - a list of station name patterns to search for, or a null or empty string to accept all station names.
chaListStr - a list of channel name patterns to search for, or a null or empty string to accept all channel names.
netListStr - a list of network name patterns to search for, or a null or empty string to accept all network names.
siteListStr - a list of site name patterns to search for, or a null or empty string to accept all site names.
beginDateObj - the beginning of a date range to search for, or null for no begin date. If no end-date is given then this becomes a single date that must be within the date-range of matched responses.
endDateObj - the end of a date range to search for, or null for no end date.
fileNameParam - a specific filename (or directory) to use, or a null or empty string for all matching files.
stdioFlag - true for input from 'stdin', false for input from files.
respCallbackObj - a 'RespCallback' object whose 'responseInfo()' method will be called to report on each response found.
Returns:
true if successful; false if error (in which case 'getErorMessage()' may be used to see information about the error).

processResponse

public OutputGenerator processResponse(java.lang.String inFName,
                                       edu.iris.Fissures.IfNetwork.Response respObj,
                                       double[] freqArr,
                                       boolean logSpacingFlag,
                                       int outUnitsConvIdx,
                                       int startStageNum,
                                       int stopStageNum,
                                       boolean useDelayFlag,
                                       boolean showInputFlag,
                                       boolean listInterpOutFlag,
                                       boolean listInterpInFlag,
                                       double listInterpTension,
                                       boolean unwrapPhaseFlag,
                                       boolean totalSensitFlag,
                                       double b62XValue)
Processes the given response object, calculating the complex spectra output values.

Parameters:
inFName - the file name associated with the response object.
respObj - the response object to be processed.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
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.
showInputFlag - true to show RESP input text (sent to stdout).
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).
Returns:
An 'OutputGenerator' object loaded with complex spectra response output data; or null if error (in which case 'getErorMessage()' may be used to see information about the error).

processResponse

public OutputGenerator processResponse(java.lang.String inFName,
                                       edu.iris.Fissures.IfNetwork.Response respObj,
                                       double[] freqArr,
                                       boolean logSpacingFlag,
                                       int outUnitsConvIdx,
                                       int startStageNum,
                                       int stopStageNum,
                                       boolean useDelayFlag,
                                       boolean showInputFlag,
                                       boolean listInterpOutFlag,
                                       boolean listInterpInFlag,
                                       double listInterpTension,
                                       boolean unwrapPhaseFlag,
                                       boolean totalSensitFlag)
Processes the given response object, calculating the complex spectra output values.

Parameters:
inFName - the file name associated with the response object.
respObj - the response object to be processed.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
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.
showInputFlag - true to show RESP input text (sent to stdout).
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.
Returns:
An 'OutputGenerator' object loaded with complex spectra response output data; or null if error (in which case 'getErorMessage()' may be used to see information about the error).

processResponse

public OutputGenerator processResponse(java.lang.String inFName,
                                       edu.iris.Fissures.IfNetwork.Response respObj,
                                       double[] freqArr,
                                       boolean logSpacingFlag,
                                       int outUnitsConvIdx,
                                       int startStageNum,
                                       int stopStageNum,
                                       boolean useDelayFlag,
                                       boolean showInputFlag,
                                       boolean listInterpOutFlag,
                                       boolean listInterpInFlag,
                                       double listInterpTension)
Processes the given response object, calculating the complex spectra output values.

Parameters:
inFName - the file name associated with the response object.
respObj - the response object to be processed.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
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.
showInputFlag - true to show RESP input text (sent to stdout).
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.
Returns:
An 'OutputGenerator' object loaded with complex spectra response output data; or null if error (in which case 'getErorMessage()' may be used to see information about the error).

processResponse

public OutputGenerator processResponse(java.lang.String inFName,
                                       edu.iris.Fissures.IfNetwork.Response respObj,
                                       double[] freqArr,
                                       boolean logSpacingFlag,
                                       int outUnitsConvIdx,
                                       int startStageNum,
                                       int stopStageNum)
Processes the given response object, calculating the complex spectra output values.

Parameters:
inFName - the file name associated with the response object.
respObj - the response object to be processed.
freqArr - an array of frequency values to use.
logSpacingFlag - true to indicate that the frequency spacing is logarithmic; false to indicate linear spacing.
outUnitsConvIdx - output units conversion index for the requested output units type; one of the '..._UNIT_CONV' values.
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.
Returns:
An 'OutputGenerator' object loaded with complex spectra response output data; or null if error (in which case 'getErorMessage()' may be used to see information about the error).

outputData

public boolean outputData(OutputGenerator outGenObj,
                          edu.iris.Fissures.IfNetwork.ChannelId channelIdObj,
                          java.util.Date respEndDateObj,
                          java.lang.String channelIdFName,
                          int respTypeIndex,
                          java.io.PrintStream stmObj)
Writes the 'evalresp'-style output file or files for the given 'OutputGenerator' object.

Parameters:
outGenObj - an 'OutputGenerator' object that has had its 'calculateResponse()' method executed successfully.
channelIdObj - the channel ID associated with the 'OutputGenerator' object.
respEndDateObj - end date for channel ID.
channelIdFName - a string of channel ID information associated with the 'OutputGenerator' object.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stmObj - stream to write output data into, or null for output to files.
Returns:
true if successful; false if error (in which case 'getErorMessage()' may be used to see information about the error).

outputData

public boolean outputData(OutputGenerator outGenObj,
                          edu.iris.Fissures.IfNetwork.ChannelId channelIdObj,
                          java.util.Date respEndDateObj,
                          java.lang.String channelIdFName,
                          int respTypeIndex,
                          boolean stdioFlag)
Writes the 'evalresp'-style output file or files for the given 'OutputGenerator' object.

Parameters:
outGenObj - an 'OutputGenerator' object that has had its 'calculateResponse()' method executed successfully.
channelIdObj - the channel ID associated with the 'OutputGenerator' object.
respEndDateObj - end date for channel ID.
channelIdFName - a string of channel ID information associated with the 'OutputGenerator' object.
respTypeIndex - index value indicating type of output (separate amp/phase file, complex-spectra file or single amp/phase file).
stdioFlag - true for output to 'stdout', false for output to file(s).
Returns:
true if successful; false if error (in which case 'getErorMessage()' may be used to see information about the error).

getNumRespFound

public int getNumRespFound()
Returns:
number of responses found by last call to 'findResponses()'.

getOutputFileNamesStr

public java.lang.String getOutputFileNamesStr()
Returns:
a String containing the names of the most recently generated output files (by the last call to 'outputData()'), or an empty string if none have been generated.

getOutputFileNamesCount

public int getOutputFileNamesCount()
Returns:
the number of names returned by 'getOutputFileNamesStr()' (will be 0, 1 or 2).

setErrorMessage

protected void setErrorMessage(java.lang.String str)
Enters error message (if none previously entered).

Parameters:
str - error message string

getErrorFlag

public boolean getErrorFlag()
Returns:
true if an error was detected. The error message may be fetched via the 'getErrorMessage()' method.

getErrorMessage

public java.lang.String getErrorMessage()
Returns:
message string for last error (or 'No error' if none).

clearErrorMessage

public void clearErrorMessage()
Clears the error message string.


getNumberErrors

public int getNumberErrors()
Returns:
the number of errors that have occurred. This total is not cleared by 'clearErrorMessage()'.