Class WaveformUtils
java.lang.Object
gov.llnl.gnem.apps.coda.common.service.util.WaveformUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
cutSeismograms
(TimeSeries a, TimeSeries b, TimeT startTime, TimeT endTime) static float[]
doublesToFloats
(double[] x) static double[]
floatsToDoubles
(float[] x) 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.static double
getNoiseFloor
(double[] waveform) static boolean
-
Constructor Details
-
WaveformUtils
public WaveformUtils()
-
-
Method Details
-
getNoiseFloor
public static double getNoiseFloor(double[] waveform) -
getMaxTime
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
-
cutSeismograms
-