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

public class MdacCalculator extends Object

If possible you should call MdacCalculatorService instead of calling this class directly. It will handle the setup and care and feeding needed to ensure you get a correct (or any) answer.

Revised Moment and Distance Amplitude Corrections (MDAC2) Based on the MDAC2 report by Walter and Taylor (2002). Original program was mdacsac.f based on paper by Taylor et al. (2002) PAGEOPH, but modified by Walter to use known moments from coda spectra and fit or correct all spectra simultaneously.

This version is based on the Java version written by E. Matzel, which is in turn based on the 2003 version of MDAC2SAC.java

  • Field Details

    • LOG10_OF_E

      public static final double LOG10_OF_E
    • DYNE_CM_TO_NEWTON_M

      public static final double DYNE_CM_TO_NEWTON_M
      See Also:
    • MPA_TO_PA

      public static final double MPA_TO_PA
      See Also:
    • ANGULAR_CORNER_FREQ_IDX

      public static final int ANGULAR_CORNER_FREQ_IDX
      See Also:
  • Constructor Details

    • MdacCalculator

      public MdacCalculator(double sigma, double M0ref, double Psi, double Zeta, double AlphaS, double BetaS, double RadpatP, double RadpatS, double M0)
  • Method Details

    • calculateMdacSourceSpectra

      public double[] calculateMdacSourceSpectra(double freq, double M0)
      Calculate the Mdac Source Spectra (No Q, site or geometrical spreading terms)
      Parameters:
      freq - the frequency(Hz)
      M0 - the Moment
      Returns:
      logAmp, M0/wwc, w*M0/wwc
    • calculateMomentRateSpectra

      public double calculateMomentRateSpectra(double frequency, double m0, double sigma, double psi, PICK_TYPES phase)
      Moment rate spectra using MDAC for comparison with the Coda Spectra NOTE this version uses the already computed value of the angular corner frequency, which is dependent on the moment - so they may not match
      Parameters:
      frequency - the desired frequency in Hz
      m0 - the seismic Moment in (?)
      sigma -
      psi -
      phase - PICK_TYPES phase to calculate the spectra for
      Returns:
      the Moment rate spectra at frequency f, M0(f)
    • calculateK

      public static double calculateK(double zeta, double alphaS, double betaS, double radpatP, double radpatS)
      Calculate variable K from Walter and Taylor. K is used to calculate corner frequencies and Moment rate spectra
      Parameters:
      zeta -
      alphaS -
      betaS -
      radpatP -
      radpatS -
      Returns:
      K
    • initializePhaseSpecificVariables

      public void initializePhaseSpecificVariables(MdacParametersPS mdacPs, MdacParametersFI mdacFi, double M0)
      Sets the phase-specific parameters: radiation pattern, velocity terms and corner frequency then calculates the moment corner frequency scaling parameter (F) and the zero-frequency spectral level source term (logS0) radiation pattern - radpatP or radpatS depending on phase type. velocityR - the receiver region velocity, AlphaR or BetaR. velocityS5 - 5th power of the source region velocity, AlphaS or BetaS from getCornerFrequencies. wc - the corner frequency wcp or wcs (see getCornerFrequencies).
    • calculateEnergy

      public double calculateEnergy(double M0, double appStressMpa, MdacParametersPS mdacPs, MdacParametersFI mdacFi)
    • mwToM0

      public static double mwToM0(double Mw)
    • mwToLogM0

      public static double mwToLogM0(double Mw)
    • logM0ToMw

      public static double logM0ToMw(double logM0)
    • getK

      public double getK()
    • apparentStressFromMwFc

      public double apparentStressFromMwFc(Double mw, Double fc)
    • apparentStressFromM0Fc

      public double apparentStressFromM0Fc(Double M0, Double fc)
    • cornerFreqFromApparentStressM0

      public double cornerFreqFromApparentStressM0(Double M0, Double appStress)