|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.isti.jevalresp.OutputGenerator
public class OutputGenerator
Class OutputGenerator generates 'evalresp'-style output from a FISSURES 'Response' object.
Nested Class Summary | |
---|---|
static class |
OutputGenerator.TypeNormStringBlock
Class TypeNormStringBlock defines a data block containing two strings, one for "type" and one for "normalization". |
Field Summary | |
---|---|
protected static java.lang.String |
A0_STR
|
static int |
ACCEL_UNIT_CONV
Unit conversion type index value for "acceleration". |
protected boolean |
allStagesAmpPhaseCalcFlag
|
protected boolean |
allStagesAnyAmpsNotPositiveFlag
|
protected boolean |
allStagesAnyAmpsNotPosSetupFlag
|
protected static java.lang.String |
ANALOG_STR
|
protected boolean |
anyAmpsNotPositiveFlag
|
protected boolean |
anyAmpsNotPosSetupFlag
|
protected double |
b62XValue
|
protected boolean |
calcIntDelayCorrFlag
|
protected double |
calcSenseFrequency
|
protected double[] |
calcSensitivityArray
|
protected double |
calculatedDelay
|
protected static java.lang.String |
COMPOSITE_STR
|
protected double |
correctionApplied
|
static java.text.NumberFormat |
decValFormatObj
Formatter object for displaying floating-point decimal values. |
static int |
DEFAULT_UNIT_CONV
Unit conversion type index value for "default". |
static int |
DISPLACE_UNIT_CONV
Unit conversion type index value for "displacement". |
protected java.lang.String |
errorMessage
|
protected double |
estimatedDelay
|
protected static int |
FIR_ASYM
|
static double |
FIR_NORM_TOL
Tolerance value used by 'checkFixFirFreq0Norm()' method. |
protected static int |
FIR_SYM1
|
protected static int |
FIR_SYM2
|
protected static int |
FIR_UNKNOWN
|
protected edu.iris.Fissures.Unit |
firstUnitProc
|
protected static java.lang.String |
H0_STR
|
protected java.lang.String |
infoMessage
|
protected edu.iris.Fissures.Unit |
lastUnitProc
|
protected static java.lang.String |
LIST_STR
|
protected boolean |
listInterpInFlag
|
protected boolean |
listInterpOutFlag
|
protected double |
listInterpTension
|
protected boolean |
listStageFlag
|
protected boolean |
logSpacingFlag
|
protected static java.lang.String |
NO_TYPE_STR
|
protected boolean |
normalizedFlag
|
protected int |
numCalcStages
|
protected int |
outUnitsConv
|
protected static java.lang.String |
POLYNOMIAL_STR
|
protected double[] |
requestedFreqArray
|
protected RespArraysInfo[] |
respArraysInfoArray
|
protected edu.iris.Fissures.IfNetwork.Response |
respObj
|
protected double |
sampleInterval
|
protected boolean |
showInputFlag
|
protected int |
startStageNum
|
protected int |
stopStageNum
|
protected boolean |
totalSensitFlag
|
static double |
TWO_PI
Value of 'pi' times 2. |
static int |
UNIT_CONV_DEFIDX
Default index value for 'outUnitsConv' (-u) parameter ("vel"). |
static java.lang.String[] |
UNIT_CONV_LONGSTRS
Longer versions of strings associated with the '..._UNIT_CONV' values. |
static java.lang.String[] |
UNIT_CONV_STRS
Strings associated with the '..._UNIT_CONV' values. |
protected boolean |
unwrapPhaseFlag
|
protected boolean |
useEstDelayFlag
|
static int |
VELOCITY_UNIT_CONV
Unit conversion type index value for "velocity". |
Constructor Summary | |
---|---|
OutputGenerator(AmpPhaseBlk[] ampPhaseArray,
double[] calcFreqArray,
boolean logSpacingFlag)
Creates an output generating object. |
|
OutputGenerator(AmpPhaseBlk[] ampPhaseArray,
double[] calcFreqArray,
boolean logSpacingFlag,
boolean useEstDelayFlag,
boolean showInputFlag)
Creates an output generating object. |
|
OutputGenerator(ComplexBlk[] cSpectraArray,
double[] calcFreqArray,
boolean logSpacingFlag)
Creates an output generating object. |
|
OutputGenerator(ComplexBlk[] cSpectraArray,
double[] calcFreqArray,
boolean logSpacingFlag,
boolean useEstDelayFlag,
boolean showInputFlag)
Creates an output generating object. |
|
OutputGenerator(edu.iris.Fissures.IfNetwork.Response respObj)
Creates an output generating object. |
Method Summary | |
---|---|
boolean |
allStagesAnyAmpsNotPositive()
Determines, for all stages in the response, if any amplitude values are less than or equal to zero. |
static ComplexBlk |
analogTrans(edu.iris.Fissures.IfNetwork.PoleZeroFilter filterObj,
double normFact,
double freq)
Calculates the response of an analog poles/zeros filter. |
boolean |
anyAmpsNotPositive()
Determines if any amplitude values are less than or equal to zero. |
protected boolean |
calcAmpPhaseArray(RespArraysInfo rArrsInfoObj,
int respArrIdx)
Calculates amplitude/phase values via the complex-spectra values from the given reponse arrays/information object. |
protected void |
calcIntvlDelayCorrValues()
Calculates the response's sample interval, delay and correction applied values. |
boolean |
calculateResponse(double[] freqArray,
boolean logSpacingFlag,
int outUnitsConv,
int startStageNum,
int stopStageNum)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double[] freqArray,
boolean logSpacingFlag,
int outUnitsConv,
int startStageNum,
int stopStageNum,
boolean useEstDelayFlag,
boolean showInputFlag)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double[] freqArray,
boolean logSpacingFlag,
int outUnitsConv,
int startStageNum,
int stopStageNum,
boolean useEstDelayFlag,
boolean showInputFlag,
boolean listInterpOutFlag,
boolean listInterpInFlag,
double listInterpTension)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double[] freqArray,
boolean logSpacingFlag,
int outUnitsConv,
int startStageNum,
int stopStageNum,
boolean useEstDelayFlag,
boolean showInputFlag,
boolean listInterpOutFlag,
boolean listInterpInFlag,
double listInterpTension,
boolean unwrapPhaseFlag,
boolean totalSensitFlag)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double[] freqArray,
boolean logSpacingFlag,
int outUnitsConv,
int startStageNum,
int stopStageNum,
boolean useEstDelayFlag,
boolean showInputFlag,
boolean listInterpOutFlag,
boolean listInterpInFlag,
double listInterpTension,
boolean unwrapPhaseFlag,
boolean totalSensitFlag,
double b62XValue)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double freqVal,
int outUnitsConv)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double freqVal,
int outUnitsConv,
int startStageNum,
int stopStageNum)
Calculates a response for each of the given frequencies. |
boolean |
calculateResponse(double freqVal,
int outUnitsConv,
int startStageNum,
int stopStageNum,
boolean useEstDelayFlag,
boolean showInputFlag)
Calculates a response for each of the given frequencies. |
void |
checkFixFirFreq0Norm(edu.iris.Fissures.IfNetwork.CoefficientFilter filterObj,
int stageNum)
Checks if the FIR coefficients filter should be normalized to 1.0 at frequency zero and adjusts the filter values if so. |
boolean |
checkResponse()
Checks the validity of various elements of the response; if OK then returns true, if error then sets an error message (retrievable via 'getErrorMessage()') and returns false. |
boolean |
checkResponse(boolean dontCheckUnitsFlag)
Checks the validity of various elements of the response; if OK then returns true, if error then sets an error message (retrievable via 'getErrorMessage()') and returns false. |
void |
clearErrorMessage()
Clears the error message string. |
void |
clearInfoMessage()
Clears the info message string. |
protected static double[] |
clipFreqArray(double[] srcArr,
double[] chkArr,
boolean showNotesFlag)
Returns a modified version of the given 'srcArr' array with any of its entries outside of the given 'chkArr' array clipped. |
protected static java.lang.String |
determineFirTypeStr(edu.iris.Fissures.IfNetwork.Stage stageObj)
Determines the symmetry type for the given stage object containing an FIR-filter object. |
protected static int |
determineFirTypeVal(edu.iris.Fissures.IfNetwork.Filter filterObj)
Determines the symmetry type for the given FIR filter. |
static double[] |
fetchAmpPhaAmpArray(AmpPhaseBlk[] ampPhaseArr)
Returns an array containing the amplitude values held by the given array of 'AmpPhaseBlk' objects. |
static double[] |
fetchAmpPhaPhaseArray(AmpPhaseBlk[] ampPhaseArr)
Returns an array containing the phase values held by the given array of 'AmpPhaseBlk' objects. |
static ComplexBlk |
firTrans(edu.iris.Fissures.IfNetwork.CoefficientFilter filterObj,
double normFact,
double sIntervalTime,
double wVal,
int firTypeVal)
Calculates the response of a digital FIR filter. |
RespArraysInfo[] |
getAllStagesAmpPhaseArrays()
Returns the arrays of amplitude/phase response values generated by 'calculateResponse()' for all stages in the response. |
AmpPhaseBlk[] |
getAmpPhaseArray()
Returns the array of amplitude/phase response values generated by 'calculateResponse()'. |
double[] |
getCalcFreqArray()
Returns the array of frequencies used to calculate response output. |
double |
getCalcSenseFrequency()
|
double |
getCalcSensitivity()
|
double |
getCalculatedDelay()
|
protected static OutputGenerator.TypeNormStringBlock |
getCoefficientsStageTypeStr(edu.iris.Fissures.IfNetwork.Stage stageObj,
int numDenoms)
Returns a type identification string for the given "coefficients" stage object. |
double |
getCorrectionApplied()
|
ComplexBlk[] |
getCSpectraArray()
Returns the array of complex spectra response values generated by 'calculateResponse()'. |
protected java.lang.String |
getDescHeaderString()
Returns a header information string describing the frequencies used by this 'OutputGenerator', the output units convertion type, the start and stop stages used (if not zero for all stages), and the current date/time. |
boolean |
getErrorFlag()
Returns true if an error was detected. |
java.lang.String |
getErrorMessage()
Returns message string for last error (or 'No error' if none). |
double |
getEstimatedDelay()
|
edu.iris.Fissures.Unit |
getFirstUnitProc()
|
boolean |
getInfoFlag()
Determines an info message has been entered. |
java.lang.String |
getInfoMessage()
Returns the info message string (or 'No message' if none). |
edu.iris.Fissures.Unit |
getLastUnitProc()
|
boolean |
getListInterpInFlag()
Returns true if List-blockette "input" interpolation is enabled. |
boolean |
getListInterpOutFlag()
Returns true if List-blockette "output" interpolation is enabled. |
boolean |
getListStageFlag()
Returns true if the response contains a List (blockette 55) stage and 'calculateResponse()' has been called. |
static java.lang.String |
getLongUnitConvString(int indexVal)
Converts the given output-units-conversion index to a string. |
int |
getNumCalcStages()
|
java.lang.String |
getOutputHeaderString(java.lang.String sepStr,
java.lang.String newlineStr)
Returns a header information string describing the frequencies used by this 'OutputGenerator', the output units convertion type, and the start and stop stages used (if not zero for all stages). |
java.lang.String |
getOutputHeaderString(java.lang.String sLineStr,
java.lang.String sepStr,
java.lang.String newlineStr)
Returns a header information string describing the frequencies used by this 'OutputGenerator', the output units convertion type, and the start and stop stages used (if not zero for all stages). |
protected static OutputGenerator.TypeNormStringBlock |
getPolesZerosStageTypeStr(edu.iris.Fissures.IfNetwork.Stage stageObj)
Returns a type identification string for the given "poles and zeros" stage object. |
java.lang.String |
getRespInfoString()
Returns a string of information about the response held by this object. |
java.lang.Float |
getRespS1NormFactor()
Returns the normalization factor for the first stage of the response. |
java.lang.Float |
getRespS1NormFreq()
Returns the normalization frequency for the first stage of the response. |
java.lang.Float |
getRespSensitFactor()
Returns the response-sensitivity factor. |
java.lang.Float |
getRespSensitFreq()
Returns the response-sensitivity frequency. |
double |
getSampleInterval()
|
java.lang.String |
getStagesListStr()
Returns a String containing a listing of the stages in the response, in the format used by 'evalresp'. |
boolean |
getTotalSensitFlag()
Determines if stage 0 (total) sensitivity was used to calculate response. |
protected static java.lang.String |
getTypeStrForStage(edu.iris.Fissures.IfNetwork.Stage stageObj)
Returns a type identification string for the given stage. |
boolean |
getUnwrapPhaseFlag()
Determines if phase output values are to be unwrapped. |
static ComplexBlk |
iirPzTrans(edu.iris.Fissures.IfNetwork.PoleZeroFilter filterObj,
double normFact,
double sIntervalTime,
double wVal)
Calculates the response of a "Digital (Z - transform)" IIR poles/zeros filter. |
static ComplexBlk |
iirTrans(edu.iris.Fissures.IfNetwork.CoefficientFilter filterObj,
double normFact,
double sIntervalTime,
double wVal)
Calculates the response of a digital IIR filter. |
boolean |
isAmpPhaseArrayCalculated()
Determines if the amp/phase array has been calculated (via the 'getAmpPhaseArray()' method being called). |
boolean |
normalizeResponse(int startStageNum,
int stopStageNum)
Normalizes the response and calculates the sensitivity for all the stages in the response. |
static java.io.FileWriter |
openFileWriter(java.io.File outputDirectory,
java.lang.String fileName)
Constructs a FileWriter object given a file name. |
void |
printListStageMsgs(java.io.PrintStream outStm,
boolean ampPhaOutFlag)
Prints messages about the current response's List stage to the given print stream. |
protected void |
setInfoMessage(java.lang.String str)
Enters info message. |
static int |
toUnitConvIndex(edu.iris.Fissures.Unit unitObj)
Converts the given unit object to a UNIT_CONV index values or -1 if a conversion could not be made. |
static java.lang.String |
toUnitConvString(edu.iris.Fissures.Unit unitObj)
Converts the given unit object to a string. |
static java.lang.String |
unitInfoStr(edu.iris.Fissures.Unit unitObj)
Returns a string of information about the given unit. |
protected static double[] |
unwrapPhaseArray(double[] srcPhaseArr)
Unwraps the given array of 'phase' values. |
protected static double[] |
unwrapPhaseArray(double[] srcPhaseArr,
boolean firstNonNegFlag)
Unwraps the given array of 'phase' values. |
protected static double[] |
wrapPhaseArray(double[] srcPhaseArr)
Wraps the given array of 'phase' values. |
boolean |
writeAmpPhaseData(java.io.File outputDirectory,
java.lang.String fName,
java.lang.String headerStr)
Calculates and writes amplitude/phase response values generated by 'calculateResponse()' to a file with the given name. |
boolean |
writeAmpPhaseData(java.io.File outputDirectory,
java.lang.String ampFName,
java.lang.String phaseFName,
java.lang.String headerStr)
Calculates and writes amplitude/phase response values generated by 'calculateResponse()' to the two files with the given names. |
boolean |
writeAmpPhaseData(java.io.Writer outStm,
java.lang.String headerStr)
Calculates and writes amplitude/phase response values generated by 'calculateResponse()' to the given output stream. |
boolean |
writeAmpPhaseData(java.io.Writer outStm,
java.lang.String fName,
java.lang.String headerStr)
Calculates and writes amplitude/phase response values generated by 'calculateResponse()' to the given output stream. |
boolean |
writeAmpPhaseData(java.io.Writer ampOutStm,
java.io.Writer phaseOutStm,
java.lang.String headerStr)
Calculates and writes amplitude/phase response values generated by 'calculateResponse()' to the two given output streams. |
boolean |
writeAmpPhaseData(java.io.Writer ampOutStm,
java.io.Writer phaseOutStm,
java.lang.String ampFName,
java.lang.String phaseFName,
java.lang.String headerStr)
Calculates and writes amplitude/phase response values generated by 'calculateResponse()' to the two given output streams. |
boolean |
writeCSpectraData(java.io.File outputDirectory,
java.lang.String fName,
java.lang.String headerStr)
Writes the complex spectra response values generated by 'calculateResponse()' to a file with the given name. |
boolean |
writeCSpectraData(java.io.Writer outStm,
java.lang.String headerStr)
Writes the complex spectra response values generated by 'calculateResponse()' to the given output stream. |
boolean |
writeCSpectraData(java.io.Writer outStm,
java.lang.String fName,
java.lang.String headerStr)
Writes the complex spectra response values generated by 'calculateResponse()' to the given output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_UNIT_CONV
public static final int DISPLACE_UNIT_CONV
public static final int VELOCITY_UNIT_CONV
public static final int ACCEL_UNIT_CONV
public static final java.lang.String[] UNIT_CONV_STRS
public static final int UNIT_CONV_DEFIDX
public static final java.lang.String[] UNIT_CONV_LONGSTRS
public static final double TWO_PI
public static final double FIR_NORM_TOL
public static final java.text.NumberFormat decValFormatObj
protected static final java.lang.String ANALOG_STR
protected static final java.lang.String COMPOSITE_STR
protected static final java.lang.String LIST_STR
protected static final java.lang.String POLYNOMIAL_STR
protected static final java.lang.String NO_TYPE_STR
protected static final java.lang.String A0_STR
protected static final java.lang.String H0_STR
protected static final int FIR_ASYM
protected static final int FIR_SYM1
protected static final int FIR_SYM2
protected static final int FIR_UNKNOWN
protected final edu.iris.Fissures.IfNetwork.Response respObj
protected double[] calcSensitivityArray
protected double calcSenseFrequency
protected boolean normalizedFlag
protected double[] requestedFreqArray
protected boolean logSpacingFlag
protected int outUnitsConv
protected int startStageNum
protected int stopStageNum
protected boolean useEstDelayFlag
protected boolean showInputFlag
protected boolean listInterpOutFlag
protected boolean listInterpInFlag
protected double listInterpTension
protected boolean unwrapPhaseFlag
protected boolean totalSensitFlag
protected double b62XValue
protected edu.iris.Fissures.Unit firstUnitProc
protected edu.iris.Fissures.Unit lastUnitProc
protected int numCalcStages
protected boolean listStageFlag
protected RespArraysInfo[] respArraysInfoArray
protected boolean allStagesAmpPhaseCalcFlag
protected boolean anyAmpsNotPositiveFlag
protected boolean anyAmpsNotPosSetupFlag
protected boolean allStagesAnyAmpsNotPositiveFlag
protected boolean allStagesAnyAmpsNotPosSetupFlag
protected boolean calcIntDelayCorrFlag
protected double sampleInterval
protected double estimatedDelay
protected double correctionApplied
protected double calculatedDelay
protected java.lang.String errorMessage
protected java.lang.String infoMessage
Constructor Detail |
---|
public OutputGenerator(edu.iris.Fissures.IfNetwork.Response respObj)
respObj
- an 'edu.iris.Fissures.IfNetwork.Response' object
to generate output from.public OutputGenerator(ComplexBlk[] cSpectraArray, double[] calcFreqArray, boolean logSpacingFlag, boolean useEstDelayFlag, boolean showInputFlag)
cSpectraArray
- an array of complex spectra output values from
the calculated response.calcFreqArray
- an array of frequency values for the calculated
response.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.showInputFlag
- true to show RESP input text (sent to stdout).public OutputGenerator(ComplexBlk[] cSpectraArray, double[] calcFreqArray, boolean logSpacingFlag)
cSpectraArray
- an array of complex spectra output values from
the calculated response.calcFreqArray
- an array of frequency values for the calculated
response.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.public OutputGenerator(AmpPhaseBlk[] ampPhaseArray, double[] calcFreqArray, boolean logSpacingFlag, boolean useEstDelayFlag, boolean showInputFlag)
ampPhaseArray
- an array of amplitude/phase response values.calcFreqArray
- an array of frequency values for the calculated
response.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.showInputFlag
- true to show RESP input text (sent to stdout).public OutputGenerator(AmpPhaseBlk[] ampPhaseArray, double[] calcFreqArray, boolean logSpacingFlag)
ampPhaseArray
- an array of amplitude/phase response values.calcFreqArray
- an array of frequency values for the calculated
response.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.Method Detail |
---|
public static java.io.FileWriter openFileWriter(java.io.File outputDirectory, java.lang.String fileName) throws java.io.IOException
outputDirectory
- output directory or null for current directory.fileName
- String The system-dependent filename.
java.io.IOException
- if the specified file is not found or if some other
I/O error occurs.public boolean checkResponse(boolean dontCheckUnitsFlag)
1. The response must contain no null handles. 2. If 'dontCheckUnitsFlag'==false and the response contains multiple stages, input units must match output units of previous stages. 3. All stages must contain one filter (except for gain-only stages). 4. Each filter must specify a supported transfer/response type. 5. If a stage contains a Poles & Zeros or Coefficients filter with a transfer type of Digital then a decimation must be specified. 6. If a stage contains a Poles & Zeros filter then it must also contain a normalization. 7. If a stage contains a Response List filter then it must be the the only stage in the response, and there must be no normalization for the stage. In the list filter object, the frequency units must be specified as 'Hertz' ('Seconds^-1') and the phase units must be specified as 'Degrees' or 'Radians'. 8. If the response contains multiple stages, each stage must contain a gain value. If the response contains only one stage then either an overall (stage 0) sensitivity or a gain value for the stage (or both) must be specified. 9. If input units are 'Pascal' or 'Tesla' then output units conversion must be 'Velocity' or 'Default'.
dontCheckUnitsFlag
- if false and the response contains multiple
stages then the input units must match the output units of previous
stages; if true then the units are not checked.
public boolean checkResponse()
1. The response must contain no null handles. 2. If the response contains multiple stages, input units must match the output units of previous stages. 3. All stages must contain one filter (except for gain-only stages). 4. Each filter must specify a supported transfer/response type. 5. If a stage contains a Poles & Zeros or Coefficients filter with a transfer type of Digital then a decimation must be specified. 6. If a stage contains a Poles & Zeros filter then it must also contain a normalization. 7. If the response contains multiple stages, each stage must contain a gain value. If the response contains only one stage then either an overall (stage 0) sensitivity or a gain value for the stage (or both) must be specified.
public boolean normalizeResponse(int startStageNum, int stopStageNum)
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.
public boolean calculateResponse(double[] freqArray, boolean logSpacingFlag, int outUnitsConv, int startStageNum, int stopStageNum, boolean useEstDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag, double b62XValue)
freqArray
- an array of frequency values to use.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.outUnitsConv
- output units conversion value 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.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.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).
public boolean calculateResponse(double[] freqArray, boolean logSpacingFlag, int outUnitsConv, int startStageNum, int stopStageNum, boolean useEstDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension, boolean unwrapPhaseFlag, boolean totalSensitFlag)
freqArray
- an array of frequency values to use.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.outUnitsConv
- output units conversion value 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.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.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.
public boolean calculateResponse(double[] freqArray, boolean logSpacingFlag, int outUnitsConv, int startStageNum, int stopStageNum, boolean useEstDelayFlag, boolean showInputFlag, boolean listInterpOutFlag, boolean listInterpInFlag, double listInterpTension)
freqArray
- an array of frequency values to use.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.outUnitsConv
- output units conversion value 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.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.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.
public boolean calculateResponse(double[] freqArray, boolean logSpacingFlag, int outUnitsConv, int startStageNum, int stopStageNum, boolean useEstDelayFlag, boolean showInputFlag)
freqArray
- an array of frequency values to use.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.outUnitsConv
- output units conversion value 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.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.showInputFlag
- true to show RESP input text (sent to stdout).
public boolean calculateResponse(double[] freqArray, boolean logSpacingFlag, int outUnitsConv, int startStageNum, int stopStageNum)
freqArray
- an array of frequency values to use.logSpacingFlag
- true to indicate that the frequency spacing
is logarithmic; false to indicate linear spacing.outUnitsConv
- output units conversion value 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.
public boolean calculateResponse(double freqVal, int outUnitsConv, int startStageNum, int stopStageNum, boolean useEstDelayFlag, boolean showInputFlag)
freqVal
- a single frequency value to use.outUnitsConv
- output units conversion value 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.useEstDelayFlag
- true to use estimated delay in phase
calculations on asymmetrical FIR filters.showInputFlag
- true to show RESP input text (sent to stdout).
public boolean calculateResponse(double freqVal, int outUnitsConv, int startStageNum, int stopStageNum)
freqVal
- a single frequency value to use.outUnitsConv
- output units conversion value 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.
public boolean calculateResponse(double freqVal, int outUnitsConv)
freqVal
- a single frequency value to use.outUnitsConv
- output units conversion value for the requested
output units type; one of the '..._UNIT_CONV' values.
public ComplexBlk[] getCSpectraArray()
protected boolean calcAmpPhaseArray(RespArraysInfo rArrsInfoObj, int respArrIdx)
rArrsInfoObj
- reponse arrays/information object to use.respArrIdx
- associated index into 'respArraysInfoArray[]'.
public AmpPhaseBlk[] getAmpPhaseArray()
public boolean isAmpPhaseArrayCalculated()
public RespArraysInfo[] getAllStagesAmpPhaseArrays()
public boolean anyAmpsNotPositive()
public boolean allStagesAnyAmpsNotPositive()
protected void calcIntvlDelayCorrValues()
public double getSampleInterval()
public double getEstimatedDelay()
public double getCorrectionApplied()
public double getCalculatedDelay()
public boolean writeCSpectraData(java.io.Writer outStm, java.lang.String fName, java.lang.String headerStr)
outStm
- output stream to write to.fName
- file name associated with output stream.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeCSpectraData(java.io.Writer outStm, java.lang.String headerStr)
outStm
- output stream to write to.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeCSpectraData(java.io.File outputDirectory, java.lang.String fName, java.lang.String headerStr)
fName
- file name associated with output stream.outputDirectory
- output directory or null for current directory.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeAmpPhaseData(java.io.Writer ampOutStm, java.io.Writer phaseOutStm, java.lang.String ampFName, java.lang.String phaseFName, java.lang.String headerStr)
ampOutStm
- output stream to write amplitude data to.phaseOutStm
- output stream to write phase data to.ampFName
- file name associated with the amplitude data
output stream.phaseFName
- file name associated with the phase data
output stream.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeAmpPhaseData(java.io.Writer ampOutStm, java.io.Writer phaseOutStm, java.lang.String headerStr)
ampOutStm
- output stream to write amplitude data to.phaseOutStm
- output stream to write phase data to.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeAmpPhaseData(java.io.File outputDirectory, java.lang.String ampFName, java.lang.String phaseFName, java.lang.String headerStr)
outputDirectory
- output directory or null for current directory.ampFName
- name of output file to write amplitude data to.phaseFName
- name of output file to write phase data to.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeAmpPhaseData(java.io.Writer outStm, java.lang.String fName, java.lang.String headerStr)
outStm
- output stream to write to.fName
- file name associated with output stream.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeAmpPhaseData(java.io.Writer outStm, java.lang.String headerStr)
outStm
- output stream to write to.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
public boolean writeAmpPhaseData(java.io.File outputDirectory, java.lang.String fName, java.lang.String headerStr)
outputDirectory
- output directory or null for current directory.fName
- file name associated with output stream.headerStr
- a String of header information to be included in
the output, or null to indicate no header information.
protected java.lang.String getDescHeaderString()
public java.lang.String getOutputHeaderString(java.lang.String sLineStr, java.lang.String sepStr, java.lang.String newlineStr)
sLineStr
- the string to begin each line with.sepStr
- the item separator string to use.newlineStr
- the new-line string to use.
public java.lang.String getOutputHeaderString(java.lang.String sepStr, java.lang.String newlineStr)
sepStr
- the item separator string to use.newlineStr
- the new-line string to use.
public java.lang.Float getRespSensitFactor()
public java.lang.Float getRespSensitFreq()
public java.lang.Float getRespS1NormFactor()
public java.lang.Float getRespS1NormFreq()
public double getCalcSensitivity()
public double getCalcSenseFrequency()
public edu.iris.Fissures.Unit getFirstUnitProc()
public edu.iris.Fissures.Unit getLastUnitProc()
public int getNumCalcStages()
public boolean getUnwrapPhaseFlag()
public boolean getTotalSensitFlag()
public boolean getListStageFlag()
public boolean getListInterpOutFlag()
public boolean getListInterpInFlag()
public void printListStageMsgs(java.io.PrintStream outStm, boolean ampPhaOutFlag)
outStm
- the 'PrintStream' object to use.ampPhaOutFlag
- true if amp/phase output is being generated;
false if complex/spectra output is being generated.public double[] getCalcFreqArray()
public java.lang.String getRespInfoString()
public static java.lang.String unitInfoStr(edu.iris.Fissures.Unit unitObj)
unitObj
- unit object.
public boolean getErrorFlag()
public java.lang.String getErrorMessage()
public void clearErrorMessage()
protected void setInfoMessage(java.lang.String str)
str
- message string.public boolean getInfoFlag()
public java.lang.String getInfoMessage()
public void clearInfoMessage()
public java.lang.String getStagesListStr()
protected static java.lang.String getTypeStrForStage(edu.iris.Fissures.IfNetwork.Stage stageObj)
stageObj
- stage object to use.
protected static OutputGenerator.TypeNormStringBlock getPolesZerosStageTypeStr(edu.iris.Fissures.IfNetwork.Stage stageObj)
stageObj
- stage object to use.
protected static OutputGenerator.TypeNormStringBlock getCoefficientsStageTypeStr(edu.iris.Fissures.IfNetwork.Stage stageObj, int numDenoms)
stageObj
- stage object to use.numDenoms
- number of denominators in filter for stage.
protected static int determineFirTypeVal(edu.iris.Fissures.IfNetwork.Filter filterObj)
filterObj
- FIR-filter object.
protected static java.lang.String determineFirTypeStr(edu.iris.Fissures.IfNetwork.Stage stageObj)
stageObj
- stage object containing filter object.
protected static double[] clipFreqArray(double[] srcArr, double[] chkArr, boolean showNotesFlag)
srcArr
- source array.chkArr
- check array.showNotesFlag
- true to send "Note:" messages to 'stderr'.
protected static double[] unwrapPhaseArray(double[] srcPhaseArr, boolean firstNonNegFlag)
srcPhaseArr
- phase array to unwrap.firstNonNegFlag
- true if first phase value should always be
made non-negative; false if not.
protected static double[] unwrapPhaseArray(double[] srcPhaseArr)
srcPhaseArr
- phase array to unwrap.
protected static double[] wrapPhaseArray(double[] srcPhaseArr)
srcPhaseArr
- phase array to wrap.
public static double[] fetchAmpPhaAmpArray(AmpPhaseBlk[] ampPhaseArr)
ampPhaseArr
- array of 'AmpPhaseBlk' objects.
public static double[] fetchAmpPhaPhaseArray(AmpPhaseBlk[] ampPhaseArr)
ampPhaseArr
- array of 'AmpPhaseBlk' objects.
public static ComplexBlk analogTrans(edu.iris.Fissures.IfNetwork.PoleZeroFilter filterObj, double normFact, double freq)
filterObj
- a poles/zeros filter object.normFact
- the normalization factor to use.freq
- the frequency value to use. If a Laplace filter then
the frequency should be multplied by 2*pi.
public static ComplexBlk iirPzTrans(edu.iris.Fissures.IfNetwork.PoleZeroFilter filterObj, double normFact, double sIntervalTime, double wVal)
filterObj
- a poles/zeros filter object.normFact
- the normalization factor to use.sIntervalTime
- the sample interval time to use.wVal
- the frequency value to use.
public static ComplexBlk iirTrans(edu.iris.Fissures.IfNetwork.CoefficientFilter filterObj, double normFact, double sIntervalTime, double wVal)
filterObj
- a coefficients filter object.normFact
- the normalization factor to use.sIntervalTime
- the sample interval time to use.wVal
- the frequency value to use.
public static ComplexBlk firTrans(edu.iris.Fissures.IfNetwork.CoefficientFilter filterObj, double normFact, double sIntervalTime, double wVal, int firTypeVal)
filterObj
- a coefficients filter object.normFact
- the normalization factor to use.sIntervalTime
- the sample interval time to use.wVal
- the frequency value to use.firTypeVal
- one of the 'FIR_...' values.
public void checkFixFirFreq0Norm(edu.iris.Fissures.IfNetwork.CoefficientFilter filterObj, int stageNum)
filterObj
- a coefficients filter object.stageNum
- current stage number.public static int toUnitConvIndex(edu.iris.Fissures.Unit unitObj)
unitObj
- unit object.
public static java.lang.String toUnitConvString(edu.iris.Fissures.Unit unitObj)
unitObj
- unit object.
public static java.lang.String getLongUnitConvString(int indexVal)
indexVal
- one of the ".._UNIT_CONV" index values.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |