public class SimplePlotUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static TimeInterval |
ONE_DAY |
Constructor and Description |
---|
SimplePlotUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canMakeAtLeastOnePixel(LocalSeismogram seis,
int pixelsPerDay) |
static int[][] |
compressXvalues(LocalSeismogram seismogram,
MicroSecondTimeRange timeRange,
java.awt.Dimension size) |
static java.util.List<PlottableChunk> |
convertToCommonPixelScale(java.util.List<PlottableChunk> chunks,
MicroSecondTimeRange requestRange,
int pixelsPerDay) |
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 int |
getPixels(int pixelsPerDay,
MicroSecondTimeRange tr) |
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) |
public static final TimeInterval ONE_DAY
public static Plottable makePlottable(LocalSeismogramImpl seis, int pixelsPerDay) throws CodecException
CodecException
public static Plottable getEmptyPlottable()
public static void debugExtraPixel(MicroSecondTimeRange correctedSeisRange, MicroSecondDate rangeEnd, LocalSeismogramImpl seis, int startPoint, int endPoint, int numPixels, IntRange seisPixelRange, int startPixel, TimeInterval pixelPeriod)
public static TimeInterval getPixelPeriod(int pixelsPerDay)
public static MicroSecondDate getBeginningOfDay(MicroSecondDate date)
public static MicroSecondTimeRange getDay(MicroSecondDate date)
public static MicroSecondDate getPixelBeginTime(MicroSecondTimeRange day, int pixel, int pixelsPerDay)
public static MicroSecondTimeRange getPixelTimeRange(MicroSecondDate point, int pixelsPerDay, boolean after)
public static IntRange getDayPixelRange(LocalSeismogram seis, int pixelsPerDay)
public static IntRange getDayPixelRange(LocalSeismogram seis, int pixelsPerDay, MicroSecondDate startOfDay)
public static boolean canMakeAtLeastOnePixel(LocalSeismogram seis, int pixelsPerDay)
public static MicroSecondTimeRange correctTimeRangeForPixelData(LocalSeismogram seis, int pixelsPerDay)
public static int[][] compressXvalues(LocalSeismogram seismogram, MicroSecondTimeRange timeRange, java.awt.Dimension size) throws CodecException
CodecException
public static final double linearInterp(double xa, double ya, double xb, double yb, double x)
public static final int getPixel(int totalPixels, MicroSecondTimeRange tr, MicroSecondDate value)
public static final int getPoint(LocalSeismogramImpl seis, MicroSecondDate time)
public static final int getPixel(int totalPixels, MicroSecondDate begin, MicroSecondDate end, MicroSecondDate value)
public static final int getPixel(int startPixel, int endPixel, MicroSecondDate begin, MicroSecondDate end, MicroSecondDate value)
public static final MicroSecondDate getValue(int totalPixels, MicroSecondDate begin, MicroSecondDate end, int pixel)
public static final MicroSecondDate getValue(int startPixel, int endPixel, MicroSecondDate begin, MicroSecondDate end, int pixel)
public static final int getPixel(int totalPixels, UnitRangeImpl range, QuantityImpl value)
public static final int getPixel(int totalPixels, UnitRangeImpl range, double value)
public static final QuantityImpl getValue(int totalPixels, UnitRangeImpl range, int pixel)
public static final MicroSecondDate getTimeForIndex(int index, MicroSecondDate beginTime, SamplingImpl sampling)
public static java.util.List<PlottableChunk> makePlottables(LocalSeismogram[] seis, int pixelsPerDay) throws java.io.IOException
java.io.IOException
public static java.util.List<PlottableChunk> convertToCommonPixelScale(java.util.List<PlottableChunk> chunks, MicroSecondTimeRange requestRange, int pixelsPerDay)
public static int getPixels(int pixelsPerDay, MicroSecondTimeRange tr)