Class MdacCalculatorService
java.lang.Object
gov.llnl.gnem.apps.coda.calibration.service.impl.processing.MdacCalculatorService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getApparentStressMpaFromMwFc
(double Mw, double Fc, MdacParametersPS psEntry, MdacParametersFI fiEntry) getCalculateMdacAmplitudeForMwFunction
(MdacParametersPS psRows, MdacParametersFI mdacFiEntry, double refMw, PICK_TYPES phase) getCalculateMdacAmplitudeForMwFunction
(MdacParametersPS psEntry, MdacParametersFI fiEntry, double Mw, PICK_TYPES phase, Double sigma) DoubleFunction<double[]>
getCalculateMdacSourceSpectraFunction
(MdacParametersPS psEntry, MdacParametersFI fiEntry, double Mw) Calculate the MDAC2 Source Spectra (with no Q, site, or geometrical spreading terms)double
getCornerFrequency
(MdacParametersPS mdacPs, MdacParametersFI stress, double mw) double
getCornerFrequency
(DoubleFunction<double[]> mdacFunc) double
getEnergy
(double Mw, double appStressMpa, MdacParametersPS psEntry, MdacParametersFI fiEntry) double
getM0
(double Mw) Returns the Moment given the source Magnitude MwgetMdacCalculator
(MdacParametersPS psEntry, MdacParametersFI fiEntry, double M0) double
logM0ToMw
(double logM0)
-
Constructor Details
-
MdacCalculatorService
public MdacCalculatorService()
-
-
Method Details
-
getCalculateMdacSourceSpectraFunction
public DoubleFunction<double[]> getCalculateMdacSourceSpectraFunction(MdacParametersPS psEntry, MdacParametersFI fiEntry, double Mw) Calculate the MDAC2 Source Spectra (with no Q, site, or geometrical spreading terms)- Parameters:
psEntry
- Phase specific parameters for the MDAC2 modelfiEntry
- Independent parameters for the MDAC2 modelMw
- Magnitude of expected event- Returns:
- Function that computes logAmp, M0/wwc, w*M0/wwc given a frequency
-
getCalculateMdacAmplitudeForMwFunction
public DoubleUnaryOperator getCalculateMdacAmplitudeForMwFunction(MdacParametersPS psEntry, MdacParametersFI fiEntry, double Mw, PICK_TYPES phase, Double sigma) - Parameters:
psEntry
- Phase specific parameters for the MDAC2 modelfiEntry
- Independent parameters for the MDAC2 modelMw
- Magnitude of expected eventphase
- The phase to use for the MDAC calculation. Should be one of the phases inPICK_TYPES
.sigma
- Apparent stress in MPa to use. May be null to use the MDAC parameters instead. Otherwise Psi=0 and Sigma=stress- Returns:
- Function that computes logAmp In Dyne-CM given a frequency
-
getCalculateMdacAmplitudeForMwFunction
public DoubleUnaryOperator getCalculateMdacAmplitudeForMwFunction(MdacParametersPS psRows, MdacParametersFI mdacFiEntry, double refMw, PICK_TYPES phase) - Parameters:
psRows
- Phase specific parameters for the MDAC2 modelmdacFiEntry
- Independent parameters for the MDAC2 modelrefMw
- Magnitude of expected eventphase
- The phase to use for the MDAC calculation. Should be one of the phases inPICK_TYPES
.- Returns:
- Function that computes logAmp In Dyne-CM given a frequency
-
getM0
public double getM0(double Mw) Returns the Moment given the source Magnitude Mw- Parameters:
Mw
- The event magnitude Mw- Returns:
- the Seismic Moment M0
-
getCornerFrequency
-
getCornerFrequency
-
getApparentStressMpaFromMwFc
public double getApparentStressMpaFromMwFc(double Mw, double Fc, MdacParametersPS psEntry, MdacParametersFI fiEntry) -
getEnergy
public double getEnergy(double Mw, double appStressMpa, MdacParametersPS psEntry, MdacParametersFI fiEntry) -
logM0ToMw
public double logM0ToMw(double logM0) -
getMdacCalculator
public MdacCalculator getMdacCalculator(MdacParametersPS psEntry, MdacParametersFI fiEntry, double M0)
-