edu.sc.seis.fissuresUtil.display
Class SimplePlotUtil
java.lang.Object
edu.sc.seis.fissuresUtil.display.SimplePlotUtil
public class SimplePlotUtil
- extends java.lang.Object
SimplePlotUtil.java Created: Thu Jul 8 11:22:02 1999
|
Method Summary |
static boolean |
canMakeAtLeastOnePixel(LocalSeismogram seis,
int pixelsPerDay)
|
static int[][] |
compressXvalues(LocalSeismogram seismogram,
MicroSecondTimeRange timeRange,
java.awt.Dimension size)
|
static MicroSecondTimeRange |
correctTimeRangeForPixelData(LocalSeismogram seis,
int pixelsPerDay)
|
static void |
debugExtraPixel(MicroSecondTimeRange correctedSeisRange,
MicroSecondDate rangeEnd,
LocalSeismogramImpl seis,
int startPoint,
int endPoint,
int numPixels,
IntRange seisPixelRange,
int startPixel,
TimeInterval pixelPeriod)
|
static MicroSecondDate |
getBeginningOfDay(MicroSecondDate date)
|
static MicroSecondTimeRange |
getDay(MicroSecondDate date)
|
static IntRange |
getDayPixelRange(LocalSeismogram seis,
int pixelsPerDay)
|
static IntRange |
getDayPixelRange(LocalSeismogram seis,
int pixelsPerDay,
MicroSecondDate startOfDay)
|
static Plottable |
getEmptyPlottable()
|
static int |
getPixel(int startPixel,
int endPixel,
MicroSecondDate begin,
MicroSecondDate end,
MicroSecondDate value)
|
static int |
getPixel(int totalPixels,
MicroSecondDate begin,
MicroSecondDate end,
MicroSecondDate value)
|
static int |
getPixel(int totalPixels,
MicroSecondTimeRange tr,
MicroSecondDate value)
|
static int |
getPixel(int totalPixels,
UnitRangeImpl range,
double value)
|
static int |
getPixel(int totalPixels,
UnitRangeImpl range,
QuantityImpl value)
|
static MicroSecondDate |
getPixelBeginTime(MicroSecondTimeRange day,
int pixel,
int pixelsPerDay)
|
static TimeInterval |
getPixelPeriod(int pixelsPerDay)
|
static MicroSecondTimeRange |
getPixelTimeRange(MicroSecondDate point,
int pixelsPerDay,
boolean after)
|
static int |
getPoint(LocalSeismogramImpl seis,
MicroSecondDate time)
|
static MicroSecondDate |
getTimeForIndex(int index,
MicroSecondDate beginTime,
SamplingImpl sampling)
|
static MicroSecondDate |
getValue(int startPixel,
int endPixel,
MicroSecondDate begin,
MicroSecondDate end,
int pixel)
|
static MicroSecondDate |
getValue(int totalPixels,
MicroSecondDate begin,
MicroSecondDate end,
int pixel)
|
static QuantityImpl |
getValue(int totalPixels,
UnitRangeImpl range,
int pixel)
|
static double |
linearInterp(double xa,
double ya,
double xb,
double yb,
double x)
solves the equation (yb-ya)/(xb-xa) = (y-ya)/(x-xa) for y given x. |
static Plottable |
makePlottable(LocalSeismogramImpl seis,
int pixelsPerDay)
Creates a plottable with all the data from the seismogram that falls
inside of the time range at samplesPerDay. |
static java.util.List<PlottableChunk> |
makePlottables(LocalSeismogram[] seis,
int pixelsPerDay)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ONE_DAY
public static final TimeInterval ONE_DAY
SimplePlotUtil
public SimplePlotUtil()
makePlottable
public static Plottable makePlottable(LocalSeismogramImpl seis,
int pixelsPerDay)
throws CodecException
- Creates a plottable with all the data from the seismogram that falls
inside of the time range at samplesPerDay. Each pixel in the plottable is
of 1/pixelsPerDay days long. Two points are returned for each pixel. The
first value is the min value over the time covered in the seismogram, and
the second value is the max. The seismogram points in a plottable pixel
consist of the first point at or after the start time of the pixel to the
last point before the start time of the next pixel.
- Throws:
CodecException
getEmptyPlottable
public static Plottable getEmptyPlottable()
debugExtraPixel
public static void debugExtraPixel(MicroSecondTimeRange correctedSeisRange,
MicroSecondDate rangeEnd,
LocalSeismogramImpl seis,
int startPoint,
int endPoint,
int numPixels,
IntRange seisPixelRange,
int startPixel,
TimeInterval pixelPeriod)
getPixelPeriod
public static TimeInterval getPixelPeriod(int pixelsPerDay)
getBeginningOfDay
public static MicroSecondDate getBeginningOfDay(MicroSecondDate date)
getDay
public static MicroSecondTimeRange getDay(MicroSecondDate date)
getPixelBeginTime
public static MicroSecondDate getPixelBeginTime(MicroSecondTimeRange day,
int pixel,
int pixelsPerDay)
getPixelTimeRange
public static MicroSecondTimeRange getPixelTimeRange(MicroSecondDate point,
int pixelsPerDay,
boolean after)
getDayPixelRange
public static IntRange getDayPixelRange(LocalSeismogram seis,
int pixelsPerDay)
getDayPixelRange
public static IntRange getDayPixelRange(LocalSeismogram seis,
int pixelsPerDay,
MicroSecondDate startOfDay)
canMakeAtLeastOnePixel
public static boolean canMakeAtLeastOnePixel(LocalSeismogram seis,
int pixelsPerDay)
correctTimeRangeForPixelData
public static MicroSecondTimeRange correctTimeRangeForPixelData(LocalSeismogram seis,
int pixelsPerDay)
compressXvalues
public static int[][] compressXvalues(LocalSeismogram seismogram,
MicroSecondTimeRange timeRange,
java.awt.Dimension size)
throws CodecException
- Throws:
CodecException
linearInterp
public static final double linearInterp(double xa,
double ya,
double xb,
double yb,
double x)
- solves the equation (yb-ya)/(xb-xa) = (y-ya)/(x-xa) for y given x. Useful
for finding the pixel for a value given the dimension of the area and the
range of values it is supposed to cover. Note, this does not check for xa ==
xb, in which case a divide by zero would occur.
getPixel
public static final int getPixel(int totalPixels,
MicroSecondTimeRange tr,
MicroSecondDate value)
getPoint
public static final int getPoint(LocalSeismogramImpl seis,
MicroSecondDate time)
getPixel
public static final int getPixel(int totalPixels,
MicroSecondDate begin,
MicroSecondDate end,
MicroSecondDate value)
getPixel
public static final int getPixel(int startPixel,
int endPixel,
MicroSecondDate begin,
MicroSecondDate end,
MicroSecondDate value)
getValue
public static final MicroSecondDate getValue(int totalPixels,
MicroSecondDate begin,
MicroSecondDate end,
int pixel)
getValue
public static final MicroSecondDate getValue(int startPixel,
int endPixel,
MicroSecondDate begin,
MicroSecondDate end,
int pixel)
getPixel
public static final int getPixel(int totalPixels,
UnitRangeImpl range,
QuantityImpl value)
getPixel
public static final int getPixel(int totalPixels,
UnitRangeImpl range,
double value)
getValue
public static final QuantityImpl getValue(int totalPixels,
UnitRangeImpl range,
int pixel)
getTimeForIndex
public static final MicroSecondDate getTimeForIndex(int index,
MicroSecondDate beginTime,
SamplingImpl sampling)
makePlottables
public static java.util.List<PlottableChunk> makePlottables(LocalSeismogram[] seis,
int pixelsPerDay)
throws CodecException,
java.io.IOException
- Throws:
CodecException
java.io.IOException