java.lang.Object
gov.llnl.gnem.apps.coda.calibration.service.impl.processing.MdacCalculatorService

@Service public class MdacCalculatorService extends Object
  • 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 model
      fiEntry - Independent parameters for the MDAC2 model
      Mw - 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 model
      fiEntry - Independent parameters for the MDAC2 model
      Mw - Magnitude of expected event
      phase - The phase to use for the MDAC calculation. Should be one of the phases in PICK_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 model
      mdacFiEntry - Independent parameters for the MDAC2 model
      refMw - Magnitude of expected event
      phase - The phase to use for the MDAC calculation. Should be one of the phases in PICK_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

      public double getCornerFrequency(DoubleFunction<double[]> mdacFunc)
    • getCornerFrequency

      public double getCornerFrequency(MdacParametersPS mdacPs, MdacParametersFI stress, double mw)
    • 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)