Interface SeismicSignal

All Known Implementing Classes:
TimeSeries

public interface SeismicSignal
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    AddScalar(double value)
    Add a scalar to the time series of this CssSeismogram
    double
     
    boolean
    contains(Epoch epoch, boolean allowGaps)
     
    void
    Differentiate the time series of this CssSeismogram.
    void
    filter(double lc, double hc)
     
    void
    filter(double lc, double hc, boolean twoPass)
     
    void
    filter(int order, Passband passband, double cutoff1, double cutoff2, boolean two_pass)
    Apply a Butterworth filter to the time series data of this CssSeismogram.
    findDiscontinuities(int winLength, double factor)
     
    float[]
     
    double
     
    double
    getDistinctValueRatio(int numSamples)
     
    Gets the endtime attribute of the CssSeismogram object
     
    float
     
     
    int
    getIndexForTime(double epochtime)
     
    int
     
    int
     
    double
     
    float
    Gets the maximum value of the time series of the CssSeismogram object
    double[]
    Gets the maximum value of the series and the time offset it occurs at.
    double
    Gets the mean value of the time series of the CssSeismogram object
    double
    Gets the median value of the time series of the CssSeismogram object
    float
    Gets the minimum value of the time series of the BasicSeismogram object
     
    int
     
    double
    Gets the Nyquist Frequency of the CssSeismogram
    double
    getPeakToPeakAmplitude(double period)
    Gets the peakToPeakAmplitude attribute of the CssSeismogram's timeseries at the specified period.
    int
    getPointsIn(double timeRange)
     
    int
    getPointsIn(TimeT start, TimeT end)
     
    double
     
    double
    Gets the range of the time series
    double
    Gets the RMS value of the CssSeismogram's time series.
    double
    Gets the samprate attribute of the CssSeismogram object
    double
    Gets the segment Length in seconds of the CssSeismogram object
    double
    getSnr(double pickEpochTime, double preSeconds, double postSeconds)
     
    double
    getSnr(double pickEpochTime, Epoch epoch, double preSeconds, double postSeconds)
     
    double
    Gets the variance of the time series of the CssSeismogram object
    double
    Gets the sum of the time series values of this CssSeismogram
    Gets the start time of the CssSeismogram as a TimeT object
    double
    Gets the start time of the CssSeismogram as a double holding the epoch time of the start.
    float
    getValueAt(double epochtime)
    Get the value at a specific point in time
    double
    Gets the variance of the time series of the CssSeismogram object
    double
    This method returns what the zero time offset of the series is for this segment.
    boolean
     
    void
    Replaces each point in this Seismogram with its log10 value.
    void
    MultiplyScalar(double value)
    Multiply the time series values of this CssSeismogram by a scalar constant.
    void
     
    double
    Computed the median in O(n) time in contrast to standard O(n lg n) time.
    void
    removeGlitches(double Threshhold)
    Remove glitches from the seismogram where glitches are defined by data that exceed a threshhold above the variance defined by a moving window
    void
    Remove the mean of the time series of this CssSeismogram
    void
    Remove the median value of the time series of this CssSeismogram
    void
    Remove a linear trend from the time series data of this CssSeismogram.
    void
    Reverse the data series.
    void
    scaleTo(double min, double max)
     
    void
    setIdentifier(String identifier)
     
    void
    setMaximumRange(double maxRange)
     
    void
    setSamprate(double samprate)
     
    void
    setZeroTimeOffsetSeconds(double zeroTimeOffsetSeconds)
    This method sets what the zero time offset of the series is for this segment.
    void
    Replaces each point in the Seismogram its signed sqrt Note: values LT 0 are returned -1* sqrt(abs(value)).
    void
    Replaces each point in the Seismogram its signed square value Note: values LT 0 are returned -1* value*value.
    void
    Convert to single bit (+1, -1 or 0)
    void
    Smooth(int halfwidth)
    Smooth the Seismogram using a sliding window of width halfWidth.
    void
    Replaces each point in the Seismogram with its sqrt Note: values LT 0 are returned 0.
    void
    Replaces each point in the Seismogram with its square value
    void
    Taper(double TaperPercent)
    Apply a cosine taper to the time series of this seismogram
    void
    triangleTaper(double taperPercent)
     
  • Method Details

    • AddScalar

      void AddScalar(double value)
      Add a scalar to the time series of this CssSeismogram
      Parameters:
      value - The scalar value to be added to the time series
    • Log10

      void Log10()
      Replaces each point in this Seismogram with its log10 value.
    • MultiplyScalar

      void MultiplyScalar(double value)
      Multiply the time series values of this CssSeismogram by a scalar constant.
      Parameters:
      value - The scalar value with which to multiply the time series values
    • RemoveMean

      void RemoveMean()
      Remove the mean of the time series of this CssSeismogram
    • RemoveMedian

      void RemoveMedian()
      Remove the median value of the time series of this CssSeismogram
    • SignedSqrt

      void SignedSqrt()
      Replaces each point in the Seismogram its signed sqrt Note: values LT 0 are returned -1* sqrt(abs(value)).
    • SignedSquare

      void SignedSquare()
      Replaces each point in the Seismogram its signed square value Note: values LT 0 are returned -1* value*value.
    • Signum

      void Signum()
      Convert to single bit (+1, -1 or 0)
    • Smooth

      void Smooth(int halfwidth)
      Smooth the Seismogram using a sliding window of width halfWidth. replaces the data with it's smoothed result Note halfwidth refers to number of samples, not seconds
      Parameters:
      halfwidth - half width in samples.
    • Sqrt

      void Sqrt()
      Replaces each point in the Seismogram with its sqrt Note: values LT 0 are returned 0.
    • Square

      void Square()
      Replaces each point in the Seismogram with its square value
    • Taper

      void Taper(double TaperPercent)
      Apply a cosine taper to the time series of this seismogram
      Parameters:
      TaperPercent - The (one-sided) percent of the time series to which a taper will be applied. The value ranges from 0 (no taper) to 50 ( The taper extends half the length of the CssSeismogram ). Since the taper is symmetric, a 50% taper means that all but the center value of the CssSeismogram will be scaled by some value less than 1.0.
    • computeExtremeStat

      double computeExtremeStat()
    • contains

      boolean contains(Epoch epoch, boolean allowGaps)
    • differentiate

      void differentiate()
      Differentiate the time series of this CssSeismogram. First two points are differentiated using a forward-difference with error Oh2, Last two points using a backward-difference operator with error Oh2. Remaining points differentiated using a central-difference operator with order Oh4 (page 397 - 399 of Applied Numerical Methods for Digital Computation by James et al. ) Must be at least 4 points in series for this to work.
    • filter

      void filter(double lc, double hc)
    • filter

      void filter(double lc, double hc, boolean twoPass)
    • filter

      void filter(int order, Passband passband, double cutoff1, double cutoff2, boolean two_pass)
      Apply a Butterworth filter to the time series data of this CssSeismogram.
      Parameters:
      order - The order of the filter to be applied
      passband - The passband of the filter. Passband is one of Passband.LOW_PASS, Passband.HIGH_PASS, Passband.BAND_PASS, Passband.BAND_REJECT
      cutoff1 - For BAND_PASS and BAND_REJECT filters this is the low corner of the filter. For HIGH_PASS and LOW_PASS filters, this is the single corner frequency
      cutoff2 - For BAND_PASS and BAND_REJECT filters, this is the high-frequency corner. For other filters, this argument is ignored.
      two_pass - When true, the filter is applied in both forward and reverse directions to achieve zero-phase.
    • findDiscontinuities

      DiscontinuityCollection findDiscontinuities(int winLength, double factor)
    • getDelta

      double getDelta()
    • getData

      float[] getData()
    • getDistinctValueRatio

      double getDistinctValueRatio(int numSamples)
    • getEndtime

      TimeT getEndtime()
      Gets the endtime attribute of the CssSeismogram object
      Returns:
      The endtime value
    • getEpoch

      Epoch getEpoch()
    • getExtremum

      float getExtremum()
    • getIdentifier

      String getIdentifier()
    • setIdentifier

      void setIdentifier(String identifier)
    • getIndexForTime

      int getIndexForTime(double epochtime)
    • getJdate

      int getJdate()
    • getLength

      int getLength()
    • getLengthInSeconds

      double getLengthInSeconds()
    • getMax

      float getMax()
      Gets the maximum value of the time series of the CssSeismogram object
      Returns:
      The max value
    • getMaxTime

      double[] getMaxTime()
      Gets the maximum value of the series and the time offset it occurs at.
      Returns:
      The (time offset at the max in seconds, the max value) of the series
    • getMean

      double getMean()
      Gets the mean value of the time series of the CssSeismogram object
      Returns:
      The mean value
    • getMedian

      double getMedian()
      Gets the median value of the time series of the CssSeismogram object
      Returns:
      The median value
    • getMin

      float getMin()
      Gets the minimum value of the time series of the BasicSeismogram object
      Returns:
      The min value
    • getNsamp

      int getNsamp()
    • getNyquistFreq

      double getNyquistFreq()
      Gets the Nyquist Frequency of the CssSeismogram
      Returns:
      The nyquistFreq value
    • getPeakToPeakAmplitude

      double getPeakToPeakAmplitude(double period)
      Gets the peakToPeakAmplitude attribute of the CssSeismogram's timeseries at the specified period. Advances a sliding window of length period through the time series a point at a time. At each position, the Peak-To-Peak range of the current window is computed. The maximum value of all these values is returned.
      Parameters:
      period - The period in seconds at which to compute the value.
      Returns:
      The maximum Peak-To-Peak value for the entire seismogram.
    • getPointsIn

      int getPointsIn(TimeT start, TimeT end)
    • getPointsIn

      int getPointsIn(double timeRange)
    • getPower

      double getPower()
    • getRMS

      double getRMS()
      Gets the RMS value of the CssSeismogram's time series.
      Returns:
      The RMS value
    • getRange

      double getRange()
      Gets the range of the time series
      Returns:
      The statistical range for all values in the data
    • getSamprate

      double getSamprate()
      Gets the samprate attribute of the CssSeismogram object
      Returns:
      The samprate value
    • getSegmentLength

      double getSegmentLength()
      Gets the segment Length in seconds of the CssSeismogram object
      Returns:
      The segmentLength value
    • getSnr

      double getSnr(double pickEpochTime, double preSeconds, double postSeconds)
    • getSnr

      double getSnr(double pickEpochTime, Epoch epoch, double preSeconds, double postSeconds)
    • getStDev

      double getStDev()
      Gets the variance of the time series of the CssSeismogram object
      Returns:
      The variance value
    • getSum

      double getSum()
      Gets the sum of the time series values of this CssSeismogram
      Returns:
      The sum of the time series values
    • getTime

      TimeT getTime()
      Gets the start time of the CssSeismogram as a TimeT object
      Returns:
      The time value
    • getTimeAsDouble

      double getTimeAsDouble()
      Gets the start time of the CssSeismogram as a double holding the epoch time of the start.
      Returns:
      The CssSeismogram start epoch time value
    • getValueAt

      float getValueAt(double epochtime)
      Get the value at a specific point in time
      Parameters:
      epochtime - The time expressed as a double epoch time.
      Returns:
      the value at the requested time
    • getVariance

      double getVariance()
      Gets the variance of the time series of the CssSeismogram object
      Returns:
      The variance value
    • isEmpty

      boolean isEmpty()
    • normalize

      void normalize()
    • quickMedian

      double quickMedian()
      Computed the median in O(n) time in contrast to standard O(n lg n) time. The only tradeoff is that the median is not the average of the two center points for series with even length. Rather, the median is arbitrarily selected from amongst one of those two approximate centers.
      Returns:
      The median or pseudo-median for even length series
    • removeGlitches

      void removeGlitches(double Threshhold)

      Remove glitches from the seismogram where glitches are defined by data that exceed a threshhold above the variance defined by a moving window

      value = Math.abs((data[j] - median)); if (value GT Threshhold * Math.sqrt(variance)) replace data[j] with the median value
      Parameters:
      Threshhold - - the threshhold value
    • removeTrend

      void removeTrend()
      Remove a linear trend from the time series data of this CssSeismogram.
    • reverse

      void reverse()
      Reverse the data series. This method is used in cross correlation routines. Note none of the times are being reset. The user must be careful to understand the implications
    • scaleTo

      void scaleTo(double min, double max)
    • setMaximumRange

      void setMaximumRange(double maxRange)
    • setSamprate

      void setSamprate(double samprate)
    • triangleTaper

      void triangleTaper(double taperPercent)
    • getMinMax

      MinMax getMinMax()
    • getZeroTimeOffsetSeconds

      double getZeroTimeOffsetSeconds()
      This method returns what the zero time offset of the series is for this segment. This should define where your time axis should set 0 at in the trace relative to the begin time of the segment.
      Returns:
      double Offset defining time in seconds that the segment should be shifted.
    • setZeroTimeOffsetSeconds

      void setZeroTimeOffsetSeconds(double zeroTimeOffsetSeconds)
      This method sets what the zero time offset of the series is for this segment. This should define where your time axis should set 0 at in the trace relative to the begin time of the segment.
      Parameters:
      zeroTimeOffsetSeconds - Offset defining time in seconds that the segment should be shifted.