edu.sc.seis.fissuresUtil.database
Class DataCenterUtil

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.database.DataCenterUtil

public class DataCenterUtil
extends java.lang.Object

DataCenterUtil.java Created: Tue Dec 4 10:40:27 2001


Constructor Summary
DataCenterUtil()
           
 
Method Summary
static edu.iris.Fissures.IfSeismogramDC.RequestFilter getRequestFilter(java.util.List chunks)
          Concatenates DataChunks into a single RequestFilter.
static edu.iris.Fissures.model.SamplingImpl getSampling(edu.iris.Fissures.IfRealTimeCollector.DataChunk chunk)
           
static edu.iris.Fissures.seismogramDC.LocalSeismogramImpl getSeismogram(java.util.List chunks)
          Concatenates DataChunks into a single LocalSeismogram.
static edu.iris.Fissures.IfSeismogramDC.RequestFilter[] makeRequestFilter(float tolerance, java.util.List chunks)
          Create LocalSeismograms from a List of DataChunks.
static edu.iris.Fissures.IfSeismogramDC.LocalSeismogram[] makeSeismograms(float tolerance, java.util.List chunks)
          Create LocalSeismograms from a List of DataChunks.
static java.util.List splitGaps(float tolerance, java.util.List chunks)
          Analyzes the List of dataChunks and creates a list of lists where each sublist has datachunks without any gaps exceeding the tolerance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataCenterUtil

public DataCenterUtil()
Method Detail

makeRequestFilter

public static edu.iris.Fissures.IfSeismogramDC.RequestFilter[] makeRequestFilter(float tolerance,
                                                                                 java.util.List chunks)
Create LocalSeismograms from a List of DataChunks. The DataChunks are assumed all to come from the same channel, and to be in time order.


makeSeismograms

public static edu.iris.Fissures.IfSeismogramDC.LocalSeismogram[] makeSeismograms(float tolerance,
                                                                                 java.util.List chunks)
Create LocalSeismograms from a List of DataChunks. The DataChunks are assumed all to come from the same channel, and to be in time order.


splitGaps

public static java.util.List splitGaps(float tolerance,
                                       java.util.List chunks)
Analyzes the List of dataChunks and creates a list of lists where each sublist has datachunks without any gaps exceeding the tolerance.

Parameters:
tolerance - The maximum time shift away from a sample that is not considered a time tear, expressed as a percentage of the sample period.
chunks - a List of DataChunks to be analyzed for gaps.

getSampling

public static edu.iris.Fissures.model.SamplingImpl getSampling(edu.iris.Fissures.IfRealTimeCollector.DataChunk chunk)

getSeismogram

public static edu.iris.Fissures.seismogramDC.LocalSeismogramImpl getSeismogram(java.util.List chunks)
Concatenates DataChunks into a single LocalSeismogram. It is assumed that there are no gaps, and that the chunks are in the correct order. The sampling is calculated from the begin time of the first data chunk, the end time of the last chunk, and the total number of points, and thus may be slightly different from the actual sampling of any particular chunk. It is also assumed that all of the chunks have the same TimeSeriesType, ie short[], int[], float[], double[] or encoded[].


getRequestFilter

public static edu.iris.Fissures.IfSeismogramDC.RequestFilter getRequestFilter(java.util.List chunks)
Concatenates DataChunks into a single RequestFilter. It is assumed that there are no gaps, and that the chunks are in the correct order.