Class WaveformUtils

java.lang.Object
gov.llnl.gnem.apps.coda.common.service.util.WaveformUtils

public class WaveformUtils extends Object
  • Constructor Details

    • WaveformUtils

      public WaveformUtils()
  • Method Details

    • getNoiseFloor

      public static double getNoiseFloor(double[] waveform)
    • getMaxTime

      public static double[] getMaxTime(TimeSeries waveform, TimeT originTime)
      This method mimics the getMaxTime method of SacSeismogram, which is NOT purely the same as the methods in the TimeSeries chain. Trying to not use SacSeismogram directly as it will be moving out of Core > 1.1 and will introduce an extra dependency.
      Parameters:
      waveform -
      originTime -
      Returns:
      double[] where 0 is the origin time shifted by the waveform's beginTime + maxTime and 1 is the amplitude value recorded at the original maxTime
    • doublesToFloats

      public static float[] doublesToFloats(double[] x)
    • floatsToDoubles

      public static double[] floatsToDoubles(float[] x)
    • isValidWaveform

      public static boolean isValidWaveform(Waveform w)
    • cutSeismograms

      public static boolean cutSeismograms(TimeSeries a, TimeSeries b, TimeT startTime, TimeT endTime)