edu.sc.seis.fissuresUtil.bag
Class Cut
java.lang.Object
edu.sc.seis.fissuresUtil.bag.Cut
- All Implemented Interfaces:
- LocalSeismogramFunction
public class Cut
- extends java.lang.Object
- implements LocalSeismogramFunction
Cuts seismograms based on a begin and end time.
Created: Tue Oct 1 21:23:44 2002
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SEC_PER_SEC
public static final UnitImpl SEC_PER_SEC
Cut
public Cut(MicroSecondDate begin,
MicroSecondDate end)
Cut
public Cut(RequestFilter request)
apply
public LocalSeismogramImpl apply(LocalSeismogramImpl seis)
throws FissuresException
- Specified by:
apply in interface LocalSeismogramFunction
- Returns:
- - a seismogram cut to the configured time window. The original
seismogram is not modified. Returns null if no data is within the
cut window.
- Throws:
FissuresException
cut
public static LocalSeismogramImpl cut(LocalSeismogramImpl seis,
int beginIndex,
int endIndex)
throws FissuresException
- Throws:
FissuresException
overlaps
public boolean overlaps(LocalSeismogramImpl seis)
getEndIndex
protected int getEndIndex(LocalSeismogramImpl seis)
getBeginIndex
protected int getBeginIndex(LocalSeismogramImpl seis)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getBegin
public MicroSecondDate getBegin()
getEnd
public MicroSecondDate getEnd()
apply
public RequestFilter apply(RequestFilter original)
applyEncoded
public LocalSeismogramImpl applyEncoded(LocalSeismogramImpl seis)
throws FissuresException
- Makes a seismogram covering as little extra beyond begin and end times of
this cut without extracting the data from the encoded data array. This
means there may be a few extra points around the begin and end time as
the encoded data segments probably won't line up with the cut times. If
the cut and the seismogram have no time in common, null is returned. If
the data isn't encoded, no cut is performed
- Returns:
- an encoded seismogram covering as little of cut time as possible
or null if there's no overlap
- Throws:
FissuresException
cutEncoded
public static LocalSeismogramImpl cutEncoded(LocalSeismogramImpl seis,
int beginIndex,
int endIndex)
throws FissuresException
- Throws:
FissuresException
coarseCut
public static LocalSeismogramImpl[] coarseCut(RequestFilter[] aFilterseq,
LocalSeismogram[] seis)
throws FissuresException
- Applys a coarse cut to the seismograms based on the request filter. This uses Cut.applyEncoded to cut
sections of encoded data without decompressing first. Thus large data volumes can be reduced without memory problems.
- Throws:
FissuresException