org.das2.dataset
Class TableUtil
java.lang.Object
org.das2.dataset.TableUtil
public class TableUtil
- extends java.lang.Object
Method Summary |
protected static void |
checkForNaN(double[][] t)
|
static void |
checkForNaN(TableDataSet tds)
|
static Datum |
closestDatum(TableDataSet table,
Datum x,
Datum y)
|
static int |
closestRow(TableDataSet table,
int itable,
Datum datum)
|
static int |
closestRow(TableDataSet table,
int itable,
double x,
Units units)
|
static VectorDataSet |
collapse(TableDataSet ds,
int offset,
int length)
|
static void |
dumpToAsciiStream(TableDataSet tds,
Datum xmin,
Datum xmax,
java.io.OutputStream out)
|
static void |
dumpToAsciiStream(TableDataSet tds,
java.io.OutputStream out)
|
static void |
dumpToAsciiStream(TableDataSet tds,
java.nio.channels.WritableByteChannel out)
|
static void |
dumpToBinaryStream(TableDataSet tds,
java.io.OutputStream out)
|
static void |
dumpToDas2Stream(TableDataSet tds,
java.io.OutputStream out,
boolean asciiTransferTypes)
|
static DatumVector |
getDatumVector(TableDataSet tds,
int i)
|
static Datum |
getLargestYTag(TableDataSet tds)
|
static int |
getNextRow(TableDataSet ds,
int itable,
Datum datum)
return the first row after the datum. |
static int |
getPreviousRow(TableDataSet ds,
int itable,
Datum datum)
return the first row before the datum. |
static Datum |
getSmallestYTag(TableDataSet tds)
|
static double[] |
getYTagArrayDouble(TableDataSet table,
int itable,
Units units)
|
static DatumVector |
getYTagsDatumVector(TableDataSet tds,
int itable)
|
static Datum |
guessYTagWidth(TableDataSet table)
|
static Datum |
guessYTagWidth(TableDataSet table,
int itable)
guess the y tag cadence by returning the difference of the first two tags. |
static int |
tableIndexAt(TableDataSet table,
int i)
|
static double |
tableMax(TableDataSet tds,
Units units)
|
static java.lang.String |
toString(TableDataSet tds)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableUtil
public TableUtil()
getYTagArrayDouble
public static double[] getYTagArrayDouble(TableDataSet table,
int itable,
Units units)
getLargestYTag
public static Datum getLargestYTag(TableDataSet tds)
getSmallestYTag
public static Datum getSmallestYTag(TableDataSet tds)
closestRow
public static int closestRow(TableDataSet table,
int itable,
Datum datum)
closestRow
public static int closestRow(TableDataSet table,
int itable,
double x,
Units units)
closestDatum
public static Datum closestDatum(TableDataSet table,
Datum x,
Datum y)
tableIndexAt
public static int tableIndexAt(TableDataSet table,
int i)
guessYTagWidth
public static Datum guessYTagWidth(TableDataSet table)
guessYTagWidth
public static Datum guessYTagWidth(TableDataSet table,
int itable)
- guess the y tag cadence by returning the difference of the first two tags.
If the tags appear to be log spaced, then a ratiometric unit (e.g. percentIncrease)
is returned. monotonically decreasing is handled, in which case a positive tag cadence
is returned.
- Parameters:
table
- the
- table index.
- Returns:
- the norminal cadence of the tags.
tableMax
public static double tableMax(TableDataSet tds,
Units units)
checkForNaN
public static void checkForNaN(TableDataSet tds)
checkForNaN
protected static void checkForNaN(double[][] t)
toString
public static java.lang.String toString(TableDataSet tds)
getDatumVector
public static DatumVector getDatumVector(TableDataSet tds,
int i)
getYTagsDatumVector
public static DatumVector getYTagsDatumVector(TableDataSet tds,
int itable)
dumpToAsciiStream
public static void dumpToAsciiStream(TableDataSet tds,
Datum xmin,
Datum xmax,
java.io.OutputStream out)
dumpToAsciiStream
public static void dumpToAsciiStream(TableDataSet tds,
java.io.OutputStream out)
dumpToAsciiStream
public static void dumpToAsciiStream(TableDataSet tds,
java.nio.channels.WritableByteChannel out)
dumpToDas2Stream
public static void dumpToDas2Stream(TableDataSet tds,
java.io.OutputStream out,
boolean asciiTransferTypes)
dumpToBinaryStream
public static void dumpToBinaryStream(TableDataSet tds,
java.io.OutputStream out)
getPreviousRow
public static int getPreviousRow(TableDataSet ds,
int itable,
Datum datum)
- return the first row before the datum. Handles mono decreasing.
- Returns:
- the row which is less than or equal to the datum
getNextRow
public static int getNextRow(TableDataSet ds,
int itable,
Datum datum)
- return the first row after the datum. Handles mono decreasing.
- Returns:
- the row which is greater than or equal to the datum
collapse
public static VectorDataSet collapse(TableDataSet ds,
int offset,
int length)