Class TimeSeries
java.lang.Object
llnl.gnem.core.waveform.seismogram.TimeSeries
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<TimeSeries>,SeismicSignal
public class TimeSeries
extends Object
implements Comparable<TimeSeries>, Serializable, Cloneable, SeismicSignal
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfacestatic enumstatic interface -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionno-arg constructor only for SerializationTimeSeries(float[] data, double samprate, TimeT time) TimeSeries(BinaryData data, double samprate, TimeT time) -
Method Summary
Modifier and TypeMethodDescriptionadd(TimeSeries other) booleanAddAlignedSeismogram(TimeSeries otherseis) A method to add this seismogram to another equal length seismogram A check is made to ensure that the epoch times are aligned.voidaddInPlace(TimeSeries other) voidaddListener(TimeSeries.SeriesListener listener) voidAddScalar(double value) Add a scalar to the time series of this CssSeismogrambooleanAddSeismogram(TimeSeries otherseis) A method to add this seismogram to another equal length seismogram Note that the sample rate is not constrained and should be checked if necessary before calling this methodappend(TimeSeries other) protected Objectclone()intcompareTo(TimeSeries other) doublebooleancrop(int start, int end) voidcut(double start, double end) Truncate the CssSeismogram to be a subsection of itself.voidcut(int idx0, int idx1) voidTruncate the Seismogram to be a subsection of itself.voidvoidvoiddecimate(int decimationfactor) Decimate the data (Note this should be interchangeable with the interpolate methods)voidDifferentiate the time series of this CssSeismogram.divide(TimeSeries other) protected voiddoNormalize(double scale) voidEnvelope()booleanvoidfill(float[] buffer, int inc, double start, double end) voidfilter(double lc, double hc) voidfilter(double lc, double hc, boolean twoPass) voidApply a Butterworth filter to the time series data of this CssSeismogram.findDiscontinuities(int winLength, double factor) float[]getData()Gets the time-series data of the CssSeismogram as a float arrayintdoublegetDelta()doublegetDistinctValueRatio(int numSamples) Gets the endtime attribute of the CssSeismogram objectdoublegetEpoch()floatintgetIndexForTime(double epochtime) intgetJdate()intdoublefloatgetMax()Gets the maximum value of the time series of the CssSeismogram objectdouble[]Gets the maximum value of the series and the time offset it occurs at.doublegetMean()Gets the mean value of the time series of the CssSeismogram objectdoubleGets the median value of the time series of the CssSeismogram objectfloatgetMin()Gets the minimum value of the time series of the BasicSeismogram objectdoublegetNormalizedRMSE(TimeSeries other) intgetNsamp()doubledoubleGets the Nyquist Frequency of the CssSeismogramdoublegetPeakToPeakAmplitude(double period) Gets the peakToPeakAmplitude attribute of the CssSeismogram's timeseries at the specified period.static doublegetPeakToPeakAmplitude(float[] data, double sampleInterval, double period) Gets the peakToPeakAmplitude attribute of an input timeseries at the specified period.intgetPointsIn(double timeRange) intgetPointsIn(TimeT start, TimeT end) doublegetPower()doublegetRange()Gets the range of the time seriesdoubledoublegetRMS()Gets the RMS value of the CssSeismogram's time series.doublegetRMSE(TimeSeries other) doubleGets the samprate attribute of the CssSeismogram objectdoubleGets the segment Length in seconds of the CssSeismogram objectdoublegetSnr(double pickEpochTime, double preSeconds, double postSeconds) doubledoublegetStDev()Gets the variance of the time series of the CssSeismogram objectfloat[]getSubSection(double startEpoch, double requesteduration) Gets a float array which is a subsection of the CssSeismogram's time series.float[]getSubSection(double startEpoch, double requestedDuration, float[] result) float[]getSubSection(int startIndex, int sampsRequired) Get subsection explicitly using the data indicesfloat[]getSubSection(TimeT start, double duration) Gets a float array which is a subsection of the CssSeismogram's time series.float[]getSubSection(TimeT start, TimeT end) Gets a float array which is a subsection of the Seismogram's time series.float[]getSubSection(TimeT start, TimeT end, float[] result) doublegetSubsectionStartTime(double startEpoch) doublegetSum()Gets the sum of the time series values of this CssSeismogramgetTime()Gets the start time of the CssSeismogram as a TimeT objectdoubleGets the start time of the CssSeismogram as a double holding the epoch time of the start.floatgetValueAt(double epochtime) Get the value at a specific point in timefloatgetValueAt(int j) doubleGets the variance of the time series of the CssSeismogram objectdoubleThis method returns what the zero time offset of the series is for this segment.booleanhasFlatSegments(int minsegmentlength) Check whether the data series has flat segments - where every element of the segment is identicalinthashCode()voidinterpolate(double newsamprate) Interpolate the dataprotected TimeSeriesintersect(TimeSeries other, TimeSeries.BivariateFunction f) booleanbooleanisEmpty()booleanisSubset(TimeSeries other) voidLog10()Replaces each point in this Seismogram with its log10 value.multiply(TimeSeries other) voidMultiplyScalar(double value) Multiply the time series values of this CssSeismogram by a scalar constant.voidvoidnormalize(double value) voidNormalize the seismogram based on String input 1.voidnormalize(TimeSeries.Norm norm) Normalize all the seismograms Usage : 'normalize', 'normalize (value)' or 'normalize (type)' where (type) is 'mean' 'min' or 'max' Traces are initially demeaned then scaled default - each trace is multiplied by abs(1/extremum) value - where value is a number - the traces are normalized so that the absolute value of the extremum equals the value entered mean - traces are multiplied by the mean of the absolute values of the trace min - traces are multiplied by -1/min max - traces are multiplied by 1/maxvoidonModify()doubleComputed the median in O(n) time in contrast to standard O(n lg n) time.booleanrateIsComparable(TimeSeries other) Performs a check to see if the sample rates of two timeseries is close enough to equal.voidremoveGlitches(double Threshhold) Remove glitches from the seismogram where glitches are defined by data that exceed a threshhold above the variance defined by a moving windowvoidremoveListener(TimeSeries.SeriesListener listener) voidRemove the mean of the time series of this CssSeismogramvoidRemove the median value of the time series of this CssSeismogramvoidRemove a linear trend from the time series data of this CssSeismogram.voidresample(double newRate) voidreverse()Reverse the data series.voidstatic <T extends TimeSeries>
PairT<T,T> rotateTraces(T seis1, T seis2, double theta) voidscaleTo(double min, double max) voidsetData(float[] v) Sets the data array of the CssSeismogram objectvoidsetDataPoint(float v, int index) Sets the value of the data at a particular point to a valuevoidsetDataPoints(float[] v, int startindex) Sets the data at a collection of pointsvoidsetIdentifier(String identifier) voidsetMaximumRange(double maxRange) voidsetSampleRateErrorThreshold(double value) voidsetSamprate(double samprate) voidSets the time attribute of the CssSeismogram objectvoidsetZeroTimeOffsetSeconds(double timeOffset) This method sets what the zero time offset of the series is for this segment.shift(int samples) Shifts the values of this time series by the number of specified samples and returns the result as a new time series.shift(int samples, boolean keepLength) Shifts the values of this time series by the number of specified samples and returns the result as a new time series.voidReplaces each point in the Seismogram its signed sqrt Note: values LT 0 are returned -1* sqrt(abs(value)).voidReplaces each point in the Seismogram its signed square value Note: values LT 0 are returned -1* value*value.voidSignum()Convert to single bit (+1, -1 or 0)voidSmooth(int halfwidth) Smooth the Seismogram using a sliding window of width halfWidth.voidSqrt()Replaces each point in the Seismogram with its sqrt Note: values LT 0 are returned 0.voidSquare()Replaces each point in the Seismogram with its square valuevoidstretch(double interpolationfactor) subtract(TimeSeries other) voidTaper(double TaperPercent) Apply a cosine taper to the time series of this seismogramtoString()voidtriangleTaper(double taperPercent) trim()voidunion(TimeSeries other, boolean ignoreMismatch) voidWriteASCIIfile(String filename)
-
Field Details
-
EPSILON
public static final double EPSILON- See Also:
-
-
Constructor Details
-
TimeSeries
public TimeSeries()no-arg constructor only for Serialization -
TimeSeries
-
TimeSeries
-
TimeSeries
-
-
Method Details
-
getPeakToPeakAmplitude
public static double getPeakToPeakAmplitude(float[] data, double sampleInterval, double period) Gets the peakToPeakAmplitude attribute of an input 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.data- An array of floats whose Peak-To-Peak value is to be determined.sampleInterval- The sample interval of the data in the data array.- Returns:
- The maximum Peak-To-Peak value for the array.
-
rotateTraces
-
setSampleRateErrorThreshold
public void setSampleRateErrorThreshold(double value) -
AddAlignedSeismogram
A method to add this seismogram to another equal length seismogram A check is made to ensure that the epoch times are aligned.- Parameters:
otherseis- the other SacSeismogram object- Returns:
-
AddScalar
public void AddScalar(double value) Add a scalar to the time series of this CssSeismogram- Specified by:
AddScalarin interfaceSeismicSignal- Parameters:
value- The scalar value to be added to the time series
-
AddSeismogram
A method to add this seismogram to another equal length seismogram Note that the sample rate is not constrained and should be checked if necessary before calling this method- Parameters:
otherseis- the other CssSeismogram object- Returns:
- Returns true if the operation was successful.
-
Log10
public void Log10()Replaces each point in this Seismogram with its log10 value.- Specified by:
Log10in interfaceSeismicSignal
-
MultiplyScalar
public void MultiplyScalar(double value) Multiply the time series values of this CssSeismogram by a scalar constant.- Specified by:
MultiplyScalarin interfaceSeismicSignal- Parameters:
value- The scalar value with which to multiply the time series values
-
RemoveMean
public void RemoveMean()Remove the mean of the time series of this CssSeismogram- Specified by:
RemoveMeanin interfaceSeismicSignal
-
RemoveMedian
public void RemoveMedian()Remove the median value of the time series of this CssSeismogram- Specified by:
RemoveMedianin interfaceSeismicSignal
-
SignedSqrt
public void SignedSqrt()Replaces each point in the Seismogram its signed sqrt Note: values LT 0 are returned -1* sqrt(abs(value)).- Specified by:
SignedSqrtin interfaceSeismicSignal
-
SignedSquare
public void SignedSquare()Replaces each point in the Seismogram its signed square value Note: values LT 0 are returned -1* value*value.- Specified by:
SignedSquarein interfaceSeismicSignal
-
Signum
public void Signum()Convert to single bit (+1, -1 or 0)- Specified by:
Signumin interfaceSeismicSignal
-
Smooth
public 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- Specified by:
Smoothin interfaceSeismicSignal- Parameters:
halfwidth- half width in samples.
-
Sqrt
public void Sqrt()Replaces each point in the Seismogram with its sqrt Note: values LT 0 are returned 0.- Specified by:
Sqrtin interfaceSeismicSignal
-
Square
public void Square()Replaces each point in the Seismogram with its square value- Specified by:
Squarein interfaceSeismicSignal
-
Taper
public void Taper(double TaperPercent) Apply a cosine taper to the time series of this seismogram- Specified by:
Taperin interfaceSeismicSignal- 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.
-
WriteASCIIfile
- Throws:
IOException
-
add
-
addInPlace
-
addListener
-
append
-
compareTo
- Specified by:
compareToin interfaceComparable<TimeSeries>
-
computeExtremeStat
public double computeExtremeStat()- Specified by:
computeExtremeStatin interfaceSeismicSignal
-
contains
- Specified by:
containsin interfaceSeismicSignal
-
crop
-
crop
-
crop
-
cut
Truncate the Seismogram to be a subsection of itself. The time interval to which the Seismogram will be cut is specified by the start and end parameters. The Seismogram start time will be adjusted to conform to the new starting time.- Parameters:
start- The starting time of the desired subsection. If start is less than the Seismogram begin time, the begin time will be used. If start is GT than the Seismogram endtime, then an IllegalArgumentException will be thrown.end- The end time of the desired subsection. If end is GT than the Seismogram end, then the Seismogram end will be used. If end is less than start then an IllegalArgumentException will be thrown.
-
cut
public void cut(double start, double end) Truncate the CssSeismogram to be a subsection of itself. The time interval to which the CssSeismogram will be cut is specified by the start and end parameters. The CssSeismogram start time will be adjusted to conform to the new starting time. Note that, in this method, start and end are in seconds relative to the current Seismogram time- Parameters:
start- The start time in seconds after the start of the uncut seismogramend- The end time in seconds after the start of the uncut seismogram
-
cut
public void cut(int idx0, int idx1) -
cutAfter
-
cutBefore
-
decimate
public void decimate(int decimationfactor) Decimate the data (Note this should be interchangeable with the interpolate methods)
The data series it is decimated so that only every Nth point is retained where N is the decimationfactor
Note the samprate and number of points in the data series changes- Parameters:
decimationfactor- The amount by which to decimate the series.
-
differentiate
public 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.- Specified by:
differentiatein interfaceSeismicSignal
-
divide
-
Envelope
public void Envelope() -
equals
-
fill
public void fill(float[] buffer, int inc, double start, double end) -
filter
public void filter(double lc, double hc) - Specified by:
filterin interfaceSeismicSignal
-
filter
public void filter(double lc, double hc, boolean twoPass) - Specified by:
filterin interfaceSeismicSignal
-
filter
Description copied from interface:SeismicSignalApply a Butterworth filter to the time series data of this CssSeismogram.- Specified by:
filterin interfaceSeismicSignal- Parameters:
order- The order of the filter to be appliedpassband- The passband of the filter. Passband is one of Passband.LOW_PASS, Passband.HIGH_PASS, Passband.BAND_PASS, Passband.BAND_REJECTcutoff1- 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 frequencycutoff2- 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
- Specified by:
findDiscontinuitiesin interfaceSeismicSignal
-
getData
public float[] getData()Gets the time-series data of the CssSeismogram as a float array- Specified by:
getDatain interfaceSeismicSignal- Returns:
- The data array
-
getDataBytes
public int getDataBytes() -
getDelta
public double getDelta()- Specified by:
getDeltain interfaceSeismicSignal
-
getDistinctValueRatio
public double getDistinctValueRatio(int numSamples) - Specified by:
getDistinctValueRatioin interfaceSeismicSignal
-
getEndtime
Gets the endtime attribute of the CssSeismogram object- Specified by:
getEndtimein interfaceSeismicSignal- Returns:
- The endtime value
-
getEndtimeAsDouble
public double getEndtimeAsDouble() -
getEpoch
- Specified by:
getEpochin interfaceSeismicSignal
-
getExtremum
public float getExtremum()- Specified by:
getExtremumin interfaceSeismicSignal
-
getIdentifier
- Specified by:
getIdentifierin interfaceSeismicSignal
-
setIdentifier
- Specified by:
setIdentifierin interfaceSeismicSignal
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getIndexForTime
public int getIndexForTime(double epochtime) - Specified by:
getIndexForTimein interfaceSeismicSignal
-
getJdate
public int getJdate()- Specified by:
getJdatein interfaceSeismicSignal
-
getLength
public int getLength()- Specified by:
getLengthin interfaceSeismicSignal
-
getLengthInSeconds
public double getLengthInSeconds()- Specified by:
getLengthInSecondsin interfaceSeismicSignal
-
getMax
public float getMax()Gets the maximum value of the time series of the CssSeismogram object- Specified by:
getMaxin interfaceSeismicSignal- Returns:
- The max value
-
getMaxTime
public double[] getMaxTime()Gets the maximum value of the series and the time offset it occurs at.- Specified by:
getMaxTimein interfaceSeismicSignal- Returns:
- The (time offset at the max in seconds, the max value) of the series
-
getMean
public double getMean()Gets the mean value of the time series of the CssSeismogram object- Specified by:
getMeanin interfaceSeismicSignal- Returns:
- The mean value
-
getMedian
public double getMedian()Gets the median value of the time series of the CssSeismogram object- Specified by:
getMedianin interfaceSeismicSignal- Returns:
- The median value
-
getMin
public float getMin()Gets the minimum value of the time series of the BasicSeismogram object- Specified by:
getMinin interfaceSeismicSignal- Returns:
- The min value
-
getMinMax
- Specified by:
getMinMaxin interfaceSeismicSignal
-
getNormalizedRMSE
-
getNsamp
public int getNsamp()- Specified by:
getNsampin interfaceSeismicSignal
-
getNseconds
public double getNseconds() -
getNyquistFreq
public double getNyquistFreq()Gets the Nyquist Frequency of the CssSeismogram- Specified by:
getNyquistFreqin interfaceSeismicSignal- Returns:
- The nyquistFreq value
-
getPeakToPeakAmplitude
public 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.- Specified by:
getPeakToPeakAmplitudein interfaceSeismicSignal- Parameters:
period- The period in seconds at which to compute the value.- Returns:
- The maximum Peak-To-Peak value for the entire seismogram.
-
getPointsIn
- Specified by:
getPointsInin interfaceSeismicSignal
-
getPointsIn
public int getPointsIn(double timeRange) - Specified by:
getPointsInin interfaceSeismicSignal
-
getPower
public double getPower()- Specified by:
getPowerin interfaceSeismicSignal
-
getRMS
public double getRMS()Gets the RMS value of the CssSeismogram's time series.- Specified by:
getRMSin interfaceSeismicSignal- Returns:
- The RMS value
-
getRMSE
-
getRange
public double getRange()Gets the range of the time series- Specified by:
getRangein interfaceSeismicSignal- Returns:
- The statistical range for all values in the data
-
getRange
-
getSamprate
public double getSamprate()Gets the samprate attribute of the CssSeismogram object- Specified by:
getSampratein interfaceSeismicSignal- Returns:
- The samprate value
-
getSegmentLength
public double getSegmentLength()Gets the segment Length in seconds of the CssSeismogram object- Specified by:
getSegmentLengthin interfaceSeismicSignal- Returns:
- The segmentLength value
-
getSnr
public double getSnr(double pickEpochTime, double preSeconds, double postSeconds) - Specified by:
getSnrin interfaceSeismicSignal
-
getSnr
- Specified by:
getSnrin interfaceSeismicSignal
-
getStDev
public double getStDev()Gets the variance of the time series of the CssSeismogram object- Specified by:
getStDevin interfaceSeismicSignal- Returns:
- The variance value
-
getStatistics
-
getSubSection
Gets a float array which is a subsection of the Seismogram's time series. The start and end times must be within the Seismogram's time window or an IllegalArgument exception will be thrown- Parameters:
start- the starting time of the subsectionend- the ending time of the subsection- Returns:
- the subsection float[] array
-
getSubSection
-
getSubSection
Gets a float array which is a subsection of the CssSeismogram's time series. The subsection starts at time start (presumed to be within the CssSeismogram's time series) and has a length of duration.- Parameters:
start- The starting time of the subsection.duration- The duration in seconds of the subsection.- Returns:
- The subSection array
-
getSubSection
public float[] getSubSection(double startEpoch, double requesteduration) Gets a float array which is a subsection of the CssSeismogram's time series. The subsection starts at time start (presumed to be within the CssSeismogram's time series) and has a length of duration.- Parameters:
startEpoch- The starting time expressed as a double epoch time.requesteduration- The duration in seconds of the subsection.- Returns:
- The subSection array
-
getSubSection
public float[] getSubSection(double startEpoch, double requestedDuration, float[] result) -
getSubSection
public float[] getSubSection(int startIndex, int sampsRequired) Get subsection explicitly using the data indices- Parameters:
startIndex-sampsRequired-- Returns:
-
getSubsectionStartTime
public double getSubsectionStartTime(double startEpoch) -
getSum
public double getSum()Gets the sum of the time series values of this CssSeismogram- Specified by:
getSumin interfaceSeismicSignal- Returns:
- The sum of the time series values
-
getTime
Gets the start time of the CssSeismogram as a TimeT object- Specified by:
getTimein interfaceSeismicSignal- Returns:
- The time value
-
getTimeAsDouble
public double getTimeAsDouble()Gets the start time of the CssSeismogram as a double holding the epoch time of the start.- Specified by:
getTimeAsDoublein interfaceSeismicSignal- Returns:
- The CssSeismogram start epoch time value
-
getValueAt
public float getValueAt(double epochtime) Get the value at a specific point in time- Specified by:
getValueAtin interfaceSeismicSignal- Parameters:
epochtime- The time expressed as a double epoch time.- Returns:
- the value at the requested time
-
getValueAt
public float getValueAt(int j) -
getVariance
public double getVariance()Gets the variance of the time series of the CssSeismogram object- Specified by:
getVariancein interfaceSeismicSignal- Returns:
- The variance value
-
hasFlatSegments
public boolean hasFlatSegments(int minsegmentlength) Check whether the data series has flat segments - where every element of the segment is identical- Parameters:
minsegmentlength- the shortest number of datapoints that must be identical before it qualifies as "flat"
-
hashCode
public int hashCode() -
interpolate
public void interpolate(double newsamprate) Interpolate the data- Parameters:
newsamprate- is the new sample rate (Hz)Note the samprate changes and the number of points in the data series changes based on the new desired sample rate
-
isConstant
public boolean isConstant() -
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceSeismicSignal
-
isSubset
-
multiply
-
normalize
public void normalize()- Specified by:
normalizein interfaceSeismicSignal
-
normalize
Normalize all the seismograms Usage : 'normalize', 'normalize (value)' or 'normalize (type)' where (type) is 'mean' 'min' or 'max' Traces are initially demeaned then scaled default - each trace is multiplied by abs(1/extremum) value - where value is a number - the traces are normalized so that the absolute value of the extremum equals the value entered mean - traces are multiplied by the mean of the absolute values of the trace min - traces are multiplied by -1/min max - traces are multiplied by 1/max- Parameters:
norm-
-
normalize
public void normalize(double value) -
normalize
Normalize the seismogram based on String input 1. Attempt to parse as a Double valued number and use normalize(double) 2. Attempt to parse as a Norm object and use normalize(Norm) 3. do nothing if neither 1 or 2 passes- Parameters:
value- a String containing either a number or a Norm type e.g. normalize("10") or normalize("EXTREMUM")
-
onModify
public void onModify() -
quickMedian
public 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.- Specified by:
quickMedianin interfaceSeismicSignal- Returns:
- The median or pseudo-median for even length series
-
rateIsComparable
Performs a check to see if the sample rates of two timeseries is close enough to equal.- Parameters:
other- the other timeseries to compare this one with- Returns:
- true if the sample rates are close enough
-
removeGlitches
public 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- Specified by:
removeGlitchesin interfaceSeismicSignal- Parameters:
Threshhold- - the threshhold value
-
removeListener
-
removeTrend
public void removeTrend()Remove a linear trend from the time series data of this CssSeismogram.- Specified by:
removeTrendin interfaceSeismicSignal
-
resample
public void resample(double newRate) -
reverse
public 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- Specified by:
reversein interfaceSeismicSignal
-
reverseAt
-
scaleTo
public void scaleTo(double min, double max) - Specified by:
scaleToin interfaceSeismicSignal
-
setData
public void setData(float[] v) Sets the data array of the CssSeismogram object- Parameters:
v- The new data value
-
setDataPoint
public void setDataPoint(float v, int index) Sets the value of the data at a particular point to a value- Parameters:
v-index-
-
setDataPoints
public void setDataPoints(float[] v, int startindex) Sets the data at a collection of points- Parameters:
v-startindex-
-
setMaximumRange
public void setMaximumRange(double maxRange) - Specified by:
setMaximumRangein interfaceSeismicSignal
-
setSamprate
public void setSamprate(double samprate) - Specified by:
setSampratein interfaceSeismicSignal
-
setTime
Sets the time attribute of the CssSeismogram object- Parameters:
v- The new time value
-
shift
Shifts the values of this time series by the number of specified samples and returns the result as a new time series. this method also modifies the origin time of the new time series as appropriate.- Parameters:
samples- The number of samples to shift. a value less than 0 shifts data left, and greater than 0 shifts data right.- Returns:
- a new timeseries, based on this one, shifted by the specified number of samples. The new time series will have a length different than that of this instance.
-
shift
Shifts the values of this time series by the number of specified samples and returns the result as a new time series. this method also modifies the origin time of the new time series as appropriate.- Parameters:
samples- The number of samples to shift. a value less than 0 shifts data left, and greater than 0 shifts data right.keepLength- should the original time series data length remain unchanged regardless of shift?- Returns:
- a new timeseries, based on this one, shifted by the specified number of samples
-
stretch
public void stretch(double interpolationfactor) -
subtract
-
toString
-
triangleTaper
public void triangleTaper(double taperPercent) - Specified by:
triangleTaperin interfaceSeismicSignal
-
trim
-
trimTo
-
union
- Throws:
MergeException
-
doNormalize
protected void doNormalize(double scale) -
intersect
-
getZeroTimeOffsetSeconds
public double getZeroTimeOffsetSeconds()Description copied from interface:SeismicSignalThis 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.- Specified by:
getZeroTimeOffsetSecondsin interfaceSeismicSignal- Returns:
- double Offset defining time in seconds that the segment should be shifted.
-
setZeroTimeOffsetSeconds
public void setZeroTimeOffsetSeconds(double timeOffset) Description copied from interface:SeismicSignalThis 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.- Specified by:
setZeroTimeOffsetSecondsin interfaceSeismicSignal- Parameters:
timeOffset- Offset defining time in seconds that the segment should be shifted.
-