visad.python
Class JPythonMethods

java.lang.Object
  extended by visad.python.JPythonMethods

public abstract class JPythonMethods
extends Object

A collection of methods for working with VisAD, callable from the JPython editor.


Field Summary
static Hashtable JyVars
          Make a Hashtable available for everyone
 
Constructor Summary
JPythonMethods()
           
 
Method Summary
static Data abs_data(Data data)
          Return point-wise absolute value of data name changed 1/11/02 to avoid conflicts with Jython built-in
static Data abs(Data data)
          Deprecated. Consider using abs_data(Data) instead.
static double abs(double value)
          Deprecated. Consider using Jython's builtin function or Math.abs(double).
static int abs(int value)
          Deprecated. Consider using Jython's builtin function or Math.abs(int).
static long abs(long value)
          Deprecated. Consider using Jython's builtin function or Math.abs(long).
static Data acos(Data data)
          Return point-wise arccosine value of data, in radians.
static Data acosDegrees(Data data)
          return point-wise arccosine value of data, in degrees.
static Data asin(Data data)
          return point-wise arcsine value of data, in radians
static Data asinDegrees(Data data)
          return point-wise arcsine value of data, in degrees.
static Data atan(Data data)
          return point-wise arctangent value of data, in radians.
static Data atan2(Data data1, Data data2)
          return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in radians.
static Data atan2(Data data1, double data2)
          Return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in radians.
static Data atan2(double data1, Data data2)
          Return point-wise arctangent value of data1 / data2 over full (-pi, pi) range, returned in radians.
static Data atan2Degrees(Data data1, Data data2)
          return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in degrees.
static Data atan2Degrees(Data data1, double data2)
          Return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in degrees.
static Data atan2Degrees(double data1, Data data2)
          Return point-wise arctangent value of data1 / data2 over full (-pi, pi) range, returned in degrees.
static Data atanDegrees(Data data)
          return point-wise arctangent value of data, in degrees.
static Data ceil(Data data)
          return point-wise ceil value of data (smallest integer not less than).
static JamaCholeskyDecomposition chol(FlatField data)
          return matrix Cholesky Decomposition of data, as a 1-Tuple (lower_triangular_factor); data should have either a 1-D or 2-D gridded domain
static void clearplot()
          clear the onscreen data display
static void clearplot(String name)
          clear the onscreen data display with the given name
static Field combine(Field[] fields)
          combines fields
static double computeAverage(FlatField f, int[] list)
          Compute the average of each point named in the list (see "createArea" method)
static double computeSum(FlatField f, int[] list)
          Sum up the values of each point named in the list (see "createAreaField" method)
static double cond(FlatField data)
          return matrix condition of data (ratio of largest to smallest singular value), which should have either a 1-D or 2-D gridded domain
static Data cos(Data data)
          return point-wise cosine value of data, assuming input values are in radians unless they have units convertable with radians, in which case those units are converted to radians
static Data cosDegrees(Data data)
          return point-wise cosine value of data, assuming input values are in degrees unless they have units convertable with degrees, in which case those units are converted to degrees
static FlatField createAreaField(FieldImpl f)
          construct a Field containing the computed area of each data point
static double det(FlatField data)
          return matrix determinant of data, which should have either a 1-D or 2-D gridded domain
static int domainDimension(Data data)
          Get the domain dimension of the Data object
static Field domainFactor(Field data, int comp)
          Factors out the given domain component (by index) and creates a new data object.
static Field domainFactor(Field data, RealType factor)
          Factors out the given MathType from the domain of the data object.
static RealTupleType domainType(Data data)
          Get the domain Type for the Data object
static String domainType(Data data, int comp)
          Get the name of the given component of the domain RealType.
static void dumpType(Data d)
          helper method for dumpMathType() only This just dumps out the MathType of the Data object.
static void dumpTypes(Data d)
          Helper method for the dump(Data|Math)Type() methods.
static JamaEigenvalueDecomposition eig(FlatField data)
          return matrix Eigenvalue Decomposition of data, as a 3-Tuple (eigenvector_matrix, real_eigenvalue_components, imaginary_eigenvalue_components); data should have either a 1-D or 2-D gridded domain
static Data evaluate(Field data, double domain)
           
static Data evaluate(Field data, Real domain)
          Creates a VisAD Data by evaluating the Field at the point given in the domain.
static Data exp(Data data)
          return point-wise exp value of data.
static Field extract(Field data, int comp)
          Extracts a component of the Field
static Field extract(Field data, MathType t)
          Extracts a component of the Field
static Field extract(Field data, String s)
          Extracts a component of the Field
static FlatField fft(Field field)
          return forward Fourier transform of field, which should have either a 1-D or 2-D gridded domain; uses FFT when domain size is a power of two; returns real and imaginary parts
static FlatField field(float[] values)
          Return a VisAD FlatField with default 1-D domain and with range values given by values array
static FlatField field(float[][] values)
          Return a VisAD FlatField with default 2-D domain and with range values given by values array
static FlatField field(Set set, String name, float[] values)
          Return a VisAD FlatField with given 1-D domain set, with range values given by values array, and with given range RealType name
static FlatField field(Set set, String name, float[][] values)
          return a VisAD FlatField with given 2-D domain set, with range values given by values array, and with given range RealType name
static FlatField field(String name, float[] values)
          Return a VisAD FlatField with default 1-D domain, with range values given by values array, and with given range RealType name
static FlatField field(String name, float[][] values)
          Return a VisAD FlatField with default 2-D domain, with range values given by values array, and with given range RealType name
static FlatField field(String dom0, String name, float[] values)
          Return a VisAD FlatField with default 1-D domain, with range values given by values array, and with given range RealType name
static FlatField field(String dom0, String dom1, String rng, float[][] values)
          Return a VisAD FlatField with named default 2-D domain, with range values given by values array and with given range RealType name
static int[] find(Data f, String op, Data v)
          Get a list of points where a comparison is true.
static int[] find(FieldImpl f, String op, double v)
          Get a list of points where a comparison is true.
static int[] findOutsideRange(FieldImpl f, double vmin, double vmax)
          Get a list of points where values fall outside the given range
static int[] findWithinRange(FieldImpl f, double vmin, double vmax)
          Get a list of points where values fall within the given range
static Data floor(Data data)
          return point-wise floor value of data (largest integer not greater than)
static Set getDomain(Data data)
          Return the sampling set for the domain of the Data object
static int getDomainDimension(Data data)
          Get the number of domain components from a given Data object.
static Set getDomainSet(Data data)
          Return the sampling set for the domain of the Data object
static int[] getDomainSizes(Data data)
          Return the lengths of the components of the sampling set
static RealTupleType getDomainType(Data data)
          Get the domain Type for the Data object
static RealTupleType getDomainType(FunctionType type)
          Get the domain Type for the FunctionType
static float[][] getEarthLocationPoints(GriddedSet domain)
          Convert the domain to the reference earth located points
static float[][] getLatLons(GriddedSet domain)
          Convert the domain to the reference earth located points.
static float[][] getLatLons(GriddedSet domain, int[] index)
          Convert the domain to the reference earth located points.
static float[][][] getLatLons2D(GriddedSet domain)
          Convert the domain to the reference earth located points.
static double[] getMinMax(FieldImpl f)
          Find the minium and maximum values of the FlatField or a sequence within a FieldImpl.
static Data getNetcdfData(String filename)
          Helper method to read netcdf files with possible factor
static Data getNetcdfData(String filename, String factor)
          Try to create a Data object from a NetCDF file
static PointDataAdapter getPointDataAdapter(String request)
          Get a PointDataAdapter for the given string (file, url, etc)
static int getRangeDimension(Data data)
          Get the number of range components from a given Data object.
static MathType getRangeType(Data data)
          Get the range Type for the field
static MathType getRangeType(FunctionType type)
          get the range Type for the FunctionType
static RealType getRealType(String name)
          Make or get the RealType corresponding to the name; if none exists, make one and return it.
static RealType getRealType(String name, Unit unit)
          Make or get the RealType corresponding to the name; if none exists, make one and return it.
static double[][] getScale(ScalarMap smap)
          Helper method for ScalarMap.getScale(double[], double[], double[]).
static MathType getType(Data data)
          Get the MathType of the named VisAD data object
static double getValue(Real r)
          returns the double value of a Real value.
static double[][] getValues(Field data)
          returns the double values of the range
static int[] getValuesLengths(float[][] values)
          Get the lengths of the values of the input array
static FlatField hist(Field field, int[] ranges)
          Return histogram of range values of field selected by ranges array, with dimension = ranges.length, and 64 equally spaced bins in each dimension
static FlatField hist(Field field, int[] ranges, int[] sizes)
          Return histogram of range values of field selected by ranges array, with dimension = ranges.length, and with number of equally spaced bins in each dimension determined by sizes array
static FlatField hist(Field field, Set set)
          return histogram of range values of field selected by set, with dimension and bin sampling defined by set
static FlatField ifft(Field field)
          return backward Fourier transform of field, which should have either a 1-D or 2-D gridded domain; uses fft when domain size is a power of two; returns real and imaginary parts
static JamaMatrix inverse(FlatField data)
          return matrix inverse of data, which should have either a 1-D or 2-D gridded domain
static boolean isLatLonOrder(SampledSet spatialSet)
          Check to see if this is a navigated domain (can be converted to lat/lon)
static DataImpl load(String location)
          Reads in data from the given location (filename or URL).
static Data log(Data data)
          return point-wise log value of data
static JamaLUDecomposition lu(FlatField data)
          return matrix LU Decomposition of data, as a 3-Tuple (lower_triangular_factor, upper_triangular_factor, pivot_permutation_vector); data should have either a 1-D or 2-D gridded domain
static Linear1DSet makeDomain(double first, double last, int length)
          Create a Linear1DSet for domain samples
static Linear2DSet makeDomain(double first1, double last1, int length1, double first2, double last2, int length2)
          Create a Linear2DSet for domain samples
static Linear3DSet makeDomain(double first1, double last1, int length1, double first2, double last2, int length2, double first3, double last3, int length3)
          Create a Linear3DSet for domain samples
static Integer1DSet makeDomain(int length)
          Make an Integer1DSet of given length
static Integer2DSet makeDomain(int lengthX, int lengthY)
          Make an Integer2DSet of given lengths.
static Linear1DSet makeDomain(MathType type, double first, double last, int length)
          Create a Linear1DSet for domain samples
static Linear2DSet makeDomain(MathType type, double first1, double last1, int length1, double first2, double last2, int length2)
          Create a Linear2DSet for domain samples
static Linear3DSet makeDomain(MathType type, double first1, double last1, int length1, double first2, double last2, int length2, double first3, double last3, int length3)
          Create a Linear3DSet for domain samples
static Integer1DSet makeDomain(MathType type, int length)
          Make an Integer1DSet of given length and MathType
static Integer2DSet makeDomain(MathType type, int lengthX, int lengthY)
          Make an Integer2DSet of given lengths
static Linear1DSet makeDomain(String name, double first, double last, int length)
          Create a Linear1DSet for domain samples
static Linear2DSet makeDomain(String name, double first1, double last1, int length1, double first2, double last2, int length2)
          Create a Linear2DSet for domain samples
static Linear3DSet makeDomain(String name, double first1, double last1, int length1, double first2, double last2, int length2, double first3, double last3, int length3)
          Create a Linear3DSet for domain samples
static Integer1DSet makeDomain(String name, int length)
          Make an Integer1DSet of given length and make a MathType
static Integer2DSet makeDomain(String name, int lengthX, int lengthY)
          Make an Integer2DSet of given lengths.
static UnionSet makePairedLines(MathType mt, double[][] points)
          Construct a UnionSet of the given MathType for the pairs of points given
static RealType makeRealType(String name)
          Make or get the RealType corresponding to the name; if none exists, make one and return it.
static RealType makeRealType(String name, Unit unit)
          Make or get the RealType corresponding to the name; if none exists, make one and return it.
static MathType makeType(String s)
          Creates a VisAD MathType from the given string
static RealTupleType makeType(String[] s, CoordinateSystem c)
          make a MathType with a Coordinate System.
static Unit makeUnit(String name)
          get a VisAD Unit from the name given
static FieldImpl mask(Data f, String op, Data v)
          Mask out values outside testing limits...
static FieldImpl mask(FieldImpl f, String op, Data v)
          Mask out values outside testing limits in a FieldImpl
static FieldImpl mask(FieldImpl f, String op, Data v, boolean useNaN)
          Mask out values outside testing limits in a FieldImpl
static FieldImpl mask(FieldImpl f, String op, double v)
          Mask out values outside testing limits in a FieldImpl
static FieldImpl mask(FieldImpl f, String op, double v, boolean useNaN)
          Mask out values outside testing limits in a FieldImpl
static FlatField maskNoNavigation(FieldImpl f)
          Return a mask for points with navigation (1) or not (0)
static FieldImpl maskOutsideRange(FieldImpl f, double vmin, double vmax, boolean useNaN)
          Mask out with 1.0's those values outside the given range; otherwise, set the values to zero or NaN.
static FieldImpl maskWithinRange(FieldImpl f, double vmin, double vmax, boolean useNaN)
          Mask out with 1.0's those values inside the given range; set values outside the range with zero or NaN.
static JamaMatrix matrixMultiply(FlatField data1, FlatField data2)
          return matrix multiply of data1 * data2, which should have either 1-D or 2-D gridded domains
static Data max_data(Data data1, Data data2)
          Return point-wise maximum value of data1 and data2.
static Data max_data(Data data1, double data2)
          Return point-wise maximum value of data1 and data2.
static Data max_data(double data1, Data data2)
          Return point-wise maximum value of data1 and data2.
static Data min_data(Data data1, Data data2)
          return point-wise minimum value of data1 and data2 name changed 1/11/02 to avoid conflicts with Jython built-in
static Data min_data(Data data1, double data2)
          return point-wise minimum value of data1 and data2 name changed 1/11/02 to avoid conflicts with Jython built-in
static Data min_data(double data1, Data data2)
          Return point-wise minimum value of data1 and data2.
static double norm1(FlatField data)
          return matrix one norm of data (maximum column sum), which should have either a 1-D or 2-D gridded domain
static double norm2(FlatField data)
          return matrix two norm of data (maximum singular value), which should have either a 1-D or 2-D gridded domain
static double normF(FlatField data)
          return matrix Frobenius norm of data (sqrt of sum of squares of all elements), which should have either a 1-D or 2-D gridded domain
static double normInf(FlatField data)
          return matrix infinity norm of data (maximum row sum), which should have either a 1-D or 2-D gridded domain
static void plot(DataImpl data)
           
static void plot(DataImpl data, boolean editMaps)
           
static void plot(DataImpl data, double red, double green, double blue)
           
static void plot(DataImpl data, ScalarMap[] maps)
           
static void plot(float[] data)
          Displays the given data onscreen.
static void plot(float[][] data)
           
static void plot(float[][] data, boolean editMaps)
           
static void plot(float[][] data, double red, double green, double blue)
           
static void plot(float[][] data, ScalarMap[] maps)
           
static void plot(float[] data, boolean editMaps)
          Displays the given data onscreen, displaying the edit mappings dialog if specified.
static void plot(float[] data, double red, double green, double blue)
          Displays the given data onscreen, using given color default.
static void plot(float[] data, ScalarMap[] maps)
          Displays the given data onscreen.
static void plot(String name, DataImpl data)
           
static void plot(String name, DataImpl data, boolean editMaps)
           
static void plot(String name, DataImpl data, boolean editMaps, double red, double green, double blue)
           
static void plot(String name, DataImpl data, boolean editMaps, double red, double green, double blue, ScalarMap[] maps)
           
static void plot(String name, DataImpl data, ScalarMap[] maps)
           
static void plot(String name, float[] data)
          Displays the given data onscreen.
static void plot(String name, float[][] data)
           
static void plot(String name, float[][] data, boolean editMaps)
           
static void plot(String name, float[][] data, boolean editMaps, double red, double green, double blue)
           
static void plot(String name, float[][] data, ScalarMap[] maps)
           
static void plot(String name, float[] data, boolean editMaps)
          Displays the given data onscreen in a display with the given name, displaying the edit mappings dialog if specified.
static void plot(String name, float[] data, boolean editMaps, double red, double green, double blue)
          Displays the given data onscreen in a display with the given name, using the given color default and displaying the edit mappings dialog if specified.
static void plot(String name, float[] data, ScalarMap[] maps)
          Displays the given data onscreen.
static JamaQRDecomposition qr(FlatField data)
          return matrix QR Decomposition of data, as a 2-Tuple (orthogonal_factor, upper_triangular_factor); data should have either a 1-D or 2-D gridded domain
static int rangeDimension(Data data)
          get the number of range components of the Data object
static MathType rangeType(Data data)
          get the range Type for the field
static String rangeType(Data data, int comp)
          Get the name of the given component of the range RealType.
static double rank(FlatField data)
          return matrix effective numerical rank (from SVD) of data, which should have either a 1-D or 2-D gridded domain
static FlatField replace(FieldImpl f, double v)
          Replaces all the values in a FlatField with the constant given
static FlatField replace(FieldImpl f, int[] list, double v)
          Replaces specified values in a FlatField with the constant given
static FlatField replace(FieldImpl f, int[] list, Real v)
          Replaces specified values in a FlatField with the constant given
static FlatField replace(FieldImpl f, Real v)
          Replaces all the values in a FlatField with the constant given
static FlatField replaceMissing(FieldImpl f, double v)
          Replaces all the missing values in a FlatField with the constant given
static Field resample(Field data, Set s)
          resample the data field into the defined domain set
static Field resample(Field data, Set s, int mode)
          resample the data field into the defined domain set
static FieldImpl rescale(FieldImpl f, double outlo, double outhi)
          Re-scale the values in a FieldImpl using auto-scaling
static FieldImpl rescale(FieldImpl f, double inlo, double inhi, double outlo, double outhi)
          Re-scale the values in a FieldIimpl
static Data rint(Data data)
          return point-wise rint value of data (closest integer)
static Data round(Data data)
          return point-wise round value of data (closest integer).
static double round(double value)
          Return round value of value (closest integer).
static double round(double value, int digits)
          Return rounded value of value (closest integer).
static void saveNetcdf(String fn, Data d)
          Save the Data in a netcdf file
static void saveplot(DisplayImpl disp, String filename)
          Save the display genreated by a quick graph or showDisplay
static void saveplot(String filename)
          save the onscreen data display generated by plot()
static void saveplot(String name, String filename)
          clear the onscreen data display with the given name
static void setAxesScalesFont(ScalarMap[] sm, Font f)
          Set the font to be used for the axes labels and scales
static void setAxesScalesLabel(ScalarMap[] sm, String[] labels)
          Set the Label to be used for the axes
static FlatField setMissingNoNavigation(FieldImpl f)
          For all non-navigatable points in the given FlatField, replace the FF's values with missing (Float.NaN).
static FlatField setToMissing(FieldImpl f, double v)
          Replaces all the given values in a FlatField with the missing value (Float.NaN);
static void setValues(Field f, double[][] vals)
          Sets the sample values into the Field
static void showAxesScales(DisplayImpl d, boolean on)
          Turn on/off the axes labels & scales on a Display
static Data sin(Data data)
          return point-wise sine value of data, assuming input values are in radians unless they have units convertable with radians, in which case those units are converted to radians
static Data sinDegrees(Data data)
          return point-wise sine value of data, assuming input values are in degrees unless they have units convertable with degrees, in which case those units are converted to degrees
static JamaMatrix solve(FlatField data1, FlatField data2)
          return matrix soluton X of data1 * X = data2; data12 and data2 should have either 1-D or 2-D gridded domains; return solution if data1 is is square, least squares solution otherwise
static Data sqrt(Data data)
          return point-wise square root value of data
static JamaSingularValueDecomposition svd(FlatField data)
          return matrix Singular Value Decomposition of data, as a 3-Tuple (left_singular_vectors, right_singular_vectors, singular_value_vector); data should have either a 1-D or 2-D gridded domain
static Data tan(Data data)
          return point-wise tan value of data, assuming input values are in radians unless they have units convertable with radians, in which case those units are converted to radians
static Data tanDegrees(Data data)
          return point-wise tangent value of data, assuming input values are in degrees unless they have units convertable with degrees, in which case those units are converted to degrees
static double trace(FlatField data)
          return matrix trace of data (sum of the diagonal elements), which should have either a 1-D or 2-D gridded domain
static JamaMatrix transpose(FlatField data)
          return matrix transpose of data, which should have either a 1-D or 2-D gridded domain
static ByteArrayOutputStream whatType(Data d)
          helper method for dumpMathType() only This just dumps out the MathType of the Data object into a ByteArrayOutputStream which is returned.
static ByteArrayOutputStream whatTypes(Data d)
          helper method for the dump(Data|Math)Type() methods this will list both the MathType and DataType information to a ByteArrayOutputStream which is returned.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JyVars

public static Hashtable JyVars
Make a Hashtable available for everyone

Constructor Detail

JPythonMethods

public JPythonMethods()
Method Detail

load

public static DataImpl load(String location)
                     throws VisADException
Reads in data from the given location (filename or URL).

Parameters:
location -
Returns:
DataImpl for the specified location/type
Throws:
VisADException

plot

public static void plot(float[] data)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen.

Parameters:
data - VisAD data object to plot; alternatively this may be a float[] or float[][].
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(float[][] data)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
Throws:
VisADException
RemoteException

plot

public static void plot(DataImpl data)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
Throws:
VisADException
RemoteException

plot

public static void plot(float[] data,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen.

Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
maps - ScalarMaps for the display
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(float[][] data,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
maps - ScalarMaps for display
Throws:
VisADException
RemoteException

plot

public static void plot(DataImpl data,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
maps - ScalarMaps for display
Throws:
VisADException
RemoteException

plot

public static void plot(float[] data,
                        boolean editMaps)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen, displaying the edit mappings dialog if specified.

Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(float[][] data,
                        boolean editMaps)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
Throws:
VisADException
RemoteException

plot

public static void plot(DataImpl data,
                        boolean editMaps)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        float[] data)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen.

Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(String name,
                        float[][] data)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        DataImpl data)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        float[] data,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen.

Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
maps - ScalarMaps for display
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(String name,
                        float[][] data,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
maps - ScalarMaps for display
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        DataImpl data,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
maps - ScalarMaps for display
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        float[] data,
                        boolean editMaps)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen in a display with the given name, displaying the edit mappings dialog if specified.

Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(String name,
                        float[][] data,
                        boolean editMaps)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        DataImpl data,
                        boolean editMaps)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
Throws:
VisADException
RemoteException

plot

public static void plot(float[] data,
                        double red,
                        double green,
                        double blue)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen, using given color default.

Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(float[][] data,
                        double red,
                        double green,
                        double blue)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
Throws:
VisADException
RemoteException

plot

public static void plot(DataImpl data,
                        double red,
                        double green,
                        double blue)
                 throws VisADException,
                        RemoteException
Parameters:
data - VisAD data object to plot; may also be a float[] or float[][]
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        float[] data,
                        boolean editMaps,
                        double red,
                        double green,
                        double blue)
                 throws VisADException,
                        RemoteException
Displays the given data onscreen in a display with the given name, using the given color default and displaying the edit mappings dialog if specified.

Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur

plot

public static void plot(String name,
                        float[][] data,
                        boolean editMaps,
                        double red,
                        double green,
                        double blue)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        DataImpl data,
                        boolean editMaps,
                        double red,
                        double green,
                        double blue)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
Throws:
VisADException
RemoteException

plot

public static void plot(String name,
                        DataImpl data,
                        boolean editMaps,
                        double red,
                        double green,
                        double blue,
                        ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
Parameters:
name - name of display in which to plot data
data - VisAD data object to plot; may also be a float[] or float[][]
editMaps - whether to initially display edit mappings dialog
red - red component of default color to use if there are no color mappings from data's RealTypes; color component values between 0.0 and 1.0
green - green component of default color
blue - blue component of default color
maps - ScalarMaps for display
Throws:
VisADException
RemoteException

clearplot

public static void clearplot()
                      throws VisADException,
                             RemoteException
clear the onscreen data display

Throws:
VisADException - part of data and display APIs, shouldn't occur
RemoteException - part of data and display APIs, shouldn't occur

clearplot

public static void clearplot(String name)
                      throws VisADException,
                             RemoteException
clear the onscreen data display with the given name

Parameters:
name - name of the display to clear
Throws:
VisADException - part of data and display APIs, shouldn't occur
RemoteException - part of data and display APIs, shouldn't occur

saveNetcdf

public static void saveNetcdf(String fn,
                              Data d)
                       throws VisADException,
                              RemoteException,
                              IOException
Save the Data in a netcdf file

Parameters:
fn -
d -
Throws:
VisADException
RemoteException
IOException

saveplot

public static void saveplot(DisplayImpl disp,
                            String filename)
                     throws VisADException,
                            RemoteException,
                            IOException
Save the display genreated by a quick graph or showDisplay

Parameters:
disp - is the DisplayImpl to save
filename - is the name of the JPG file to write
Throws:
VisADException
RemoteException
IOException

saveplot

public static void saveplot(String filename)
                     throws VisADException,
                            RemoteException,
                            IOException
save the onscreen data display generated by plot()

Parameters:
filename - Name of the file to save display into.
Throws:
VisADException - part of data and display APIs, shouldn't occur
RemoteException - part of data and display APIs, shouldn't occur
IOException

saveplot

public static void saveplot(String name,
                            String filename)
                     throws VisADException,
                            RemoteException,
                            IOException
clear the onscreen data display with the given name

Parameters:
name - name of the display to clear
filename - name of the file to save display into
Throws:
VisADException - part of data and display APIs, shouldn't occur
RemoteException - part of data and display APIs, shouldn't occur
IOException - part of data and display APIs, shouldn't occur

abs_data

public static Data abs_data(Data data)
                     throws VisADException,
                            RemoteException
Return point-wise absolute value of data name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data - VisAD data object
Returns:
Point-wise absolute value of the given data object.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

abs

@Deprecated
public static Data abs(Data data)
                throws VisADException,
                       RemoteException
Deprecated. Consider using abs_data(Data) instead.

Return point-wise absolute value of data

Parameters:
data - VisAD data object
Returns:
Point-wise absolute value of the given data object.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

abs

@Deprecated
public static double abs(double value)
Deprecated. Consider using Jython's builtin function or Math.abs(double).

Return absolute value of value

Parameters:
value - value
Returns:
Absolute value of value.

abs

@Deprecated
public static int abs(int value)
Deprecated. Consider using Jython's builtin function or Math.abs(int).

return absolute value of value

Parameters:
value - value
Returns:
Absolute value of value.

abs

@Deprecated
public static long abs(long value)
Deprecated. Consider using Jython's builtin function or Math.abs(long).

return absolute value of value

Parameters:
value - value
Returns:
Absolute value of value.

acos

public static Data acos(Data data)
                 throws VisADException,
                        RemoteException
Return point-wise arccosine value of data, in radians.

Parameters:
data - VisAD data object
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

acosDegrees

public static Data acosDegrees(Data data)
                        throws VisADException,
                               RemoteException
return point-wise arccosine value of data, in degrees.

Parameters:
data - VisAD data object
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

asin

public static Data asin(Data data)
                 throws VisADException,
                        RemoteException
return point-wise arcsine value of data, in radians

Parameters:
data - VisAD data object
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

asinDegrees

public static Data asinDegrees(Data data)
                        throws VisADException,
                               RemoteException
return point-wise arcsine value of data, in degrees.

Parameters:
data - VisAD data object
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan

public static Data atan(Data data)
                 throws VisADException,
                        RemoteException
return point-wise arctangent value of data, in radians.

Parameters:
data - VisAD data object
Returns:
Point-wise arctangent of data, as radians.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atanDegrees

public static Data atanDegrees(Data data)
                        throws VisADException,
                               RemoteException
return point-wise arctangent value of data, in degrees.

Parameters:
data - VisAD data object
Returns:
Point-wise arctangent in degrees
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

ceil

public static Data ceil(Data data)
                 throws VisADException,
                        RemoteException
return point-wise ceil value of data (smallest integer not less than).

Parameters:
data - VisAD data object
Returns:
Point-wise ceiling value of data.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

cos

public static Data cos(Data data)
                throws VisADException,
                       RemoteException
return point-wise cosine value of data, assuming input values are in radians unless they have units convertable with radians, in which case those units are converted to radians

Parameters:
data - VisAD data object
Returns:
Point-wise cosine value of data as radians.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

cosDegrees

public static Data cosDegrees(Data data)
                       throws VisADException,
                              RemoteException
return point-wise cosine value of data, assuming input values are in degrees unless they have units convertable with degrees, in which case those units are converted to degrees

Parameters:
data - VisAD data object
Returns:
Point-wise cosine value of data as degrees.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

exp

public static Data exp(Data data)
                throws VisADException,
                       RemoteException
return point-wise exp value of data.

Parameters:
data - VisAD data object
Returns:
Point-wise exp value of data.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

floor

public static Data floor(Data data)
                  throws VisADException,
                         RemoteException
return point-wise floor value of data (largest integer not greater than)

Parameters:
data - VisAD data object
Returns:
Point-wise floor of data
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

log

public static Data log(Data data)
                throws VisADException,
                       RemoteException
return point-wise log value of data

Parameters:
data - VisAD data object
Returns:
Point-wise log of data
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

rint

public static Data rint(Data data)
                 throws VisADException,
                        RemoteException
return point-wise rint value of data (closest integer)

Parameters:
data - VisAD data object
Returns:
Point-wise rint of data
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

round

public static Data round(Data data)
                  throws VisADException,
                         RemoteException
return point-wise round value of data (closest integer).

Parameters:
data - VisAD data object
Returns:
Point-wise rounding of data.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

round

public static double round(double value,
                           int digits)
Return rounded value of value (closest integer).

Parameters:
value - value
digits - Length of the fractional part of the result.
Returns:
Rounded value.

round

public static double round(double value)
Return round value of value (closest integer).

Parameters:
value - Value to round to closest integer.
Returns:
Closest integer to value.
See Also:
round(double, int)

sin

public static Data sin(Data data)
                throws VisADException,
                       RemoteException
return point-wise sine value of data, assuming input values are in radians unless they have units convertable with radians, in which case those units are converted to radians

Parameters:
data - VisAD data object
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

sinDegrees

public static Data sinDegrees(Data data)
                       throws VisADException,
                              RemoteException
return point-wise sine value of data, assuming input values are in degrees unless they have units convertable with degrees, in which case those units are converted to degrees

Parameters:
data - VisAD data object
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

sqrt

public static Data sqrt(Data data)
                 throws VisADException,
                        RemoteException
return point-wise square root value of data

Parameters:
data - VisAD data object
Returns:
Point-wise square root of data.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

tan

public static Data tan(Data data)
                throws VisADException,
                       RemoteException
return point-wise tan value of data, assuming input values are in radians unless they have units convertable with radians, in which case those units are converted to radians

Parameters:
data - VisAD data object
Returns:
Point-wise tangent of data, as radians.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

tanDegrees

public static Data tanDegrees(Data data)
                       throws VisADException,
                              RemoteException
return point-wise tangent value of data, assuming input values are in degrees unless they have units convertable with degrees, in which case those units are converted to degrees

Parameters:
data - VisAD data object
Returns:
Point-wise tangent of data, as degrees.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan2

public static Data atan2(Data data1,
                         Data data2)
                  throws VisADException,
                         RemoteException
return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in radians.

Parameters:
data1 - VisAD data object
data2 - VisAD data object
Returns:
Point-wise arctangent value of data1 / data2 over full (-pi, pi) range, as radians.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan2Degrees

public static Data atan2Degrees(Data data1,
                                Data data2)
                         throws VisADException,
                                RemoteException
return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in degrees.

Parameters:
data1 - VisAD data object
data2 - VisAD data object
Returns:
Point-wise arctangent value of data1 / data2 over full (-pi, pi) range, as degrees.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan2

public static Data atan2(Data data1,
                         double data2)
                  throws VisADException,
                         RemoteException
Return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in radians.

Parameters:
data1 - VisAD data object
data2 - double value
Returns:
Point-wise arctangent value of data1 / data2 over full (-pi, pi) range, as radians.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan2Degrees

public static Data atan2Degrees(Data data1,
                                double data2)
                         throws VisADException,
                                RemoteException
Return point-wise arc tangent value of data1 / data2 over full (-pi, pi) range, returned in degrees.

Parameters:
data1 - VisAD data object
data2 - double value
Returns:
Point-wise arctangent value of data1 / data2 over full (-pi, pi) range, as degrees.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

max_data

public static Data max_data(Data data1,
                            Data data2)
                     throws VisADException,
                            RemoteException
Return point-wise maximum value of data1 and data2. name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data1 - VisAD data object
data2 - VisAD data object
Returns:
Point-wise maximum value of data1 and data2.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

max_data

public static Data max_data(Data data1,
                            double data2)
                     throws VisADException,
                            RemoteException
Return point-wise maximum value of data1 and data2. name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data1 - VisAD data object
data2 - double value
Returns:
Point-wise maximum value of data1 and data2.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

max_data

public static Data max_data(double data1,
                            Data data2)
                     throws VisADException,
                            RemoteException
Return point-wise maximum value of data1 and data2. name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data1 - double value
data2 - VisAD data object
Returns:
Point-wise maximum value of data1 and data2.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

min_data

public static Data min_data(Data data1,
                            Data data2)
                     throws VisADException,
                            RemoteException
return point-wise minimum value of data1 and data2 name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data1 - VisAD data object
data2 - VisAD data object
Returns:
Point-wise minimum value of data1 and data2.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

min_data

public static Data min_data(Data data1,
                            double data2)
                     throws VisADException,
                            RemoteException
return point-wise minimum value of data1 and data2 name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data1 - VisAD data object
data2 - double value
Returns:
Point-wise minimum value of data1 and data2.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

min_data

public static Data min_data(double data1,
                            Data data2)
                     throws VisADException,
                            RemoteException
Return point-wise minimum value of data1 and data2. name changed 1/11/02 to avoid conflicts with Jython built-in

Parameters:
data1 - double value
data2 - VisAD data object
Returns:
Point-wise minimum value of data1 and data2.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan2

public static Data atan2(double data1,
                         Data data2)
                  throws VisADException,
                         RemoteException
Return point-wise arctangent value of data1 / data2 over full (-pi, pi) range, returned in radians.

Parameters:
data1 - double value
data2 - VisAD data object
Returns:
Point-wise arctangent of data1 / data2
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

atan2Degrees

public static Data atan2Degrees(double data1,
                                Data data2)
                         throws VisADException,
                                RemoteException
Return point-wise arctangent value of data1 / data2 over full (-pi, pi) range, returned in degrees.

Parameters:
data1 - double value
data2 - VisAD data object
Returns:
Point-wise arctangent of data1 / data2 over full (-pi, pi) range, as degrees.
Throws:
VisADException - invalid data
RemoteException - unable to access remote data

fft

public static FlatField fft(Field field)
                     throws VisADException,
                            RemoteException
return forward Fourier transform of field, which should have either a 1-D or 2-D gridded domain; uses FFT when domain size is a power of two; returns real and imaginary parts

Parameters:
field - VisAD Field data object
Returns:
forward Fourier transform of field.
Throws:
VisADException - invalid data
RemoteException - unable to access remote field

ifft

public static FlatField ifft(Field field)
                      throws VisADException,
                             RemoteException
return backward Fourier transform of field, which should have either a 1-D or 2-D gridded domain; uses fft when domain size is a power of two; returns real and imaginary parts

Parameters:
field - VisAD Field data object
Returns:
Backward Fourier transform of field
Throws:
VisADException - invalid data
RemoteException - unable to access remote field

matrixMultiply

public static JamaMatrix matrixMultiply(FlatField data1,
                                        FlatField data2)
                                 throws VisADException,
                                        RemoteException,
                                        IllegalAccessException,
                                        InstantiationException,
                                        InvocationTargetException
return matrix multiply of data1 * data2, which should have either 1-D or 2-D gridded domains

Parameters:
data1 - VisAD FlatField data object
data2 - VisAD FlatField data object
Returns:
Matrix multiply of data1 x data2
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

solve

public static JamaMatrix solve(FlatField data1,
                               FlatField data2)
                        throws VisADException,
                               RemoteException,
                               IllegalAccessException,
                               InstantiationException,
                               InvocationTargetException
return matrix soluton X of data1 * X = data2; data12 and data2 should have either 1-D or 2-D gridded domains; return solution if data1 is is square, least squares solution otherwise

Parameters:
data1 - VisAD FlatField data object
data2 - VisAD FlatField data object
Returns:
Matrix solution X of: data1 * X = data2
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

inverse

public static JamaMatrix inverse(FlatField data)
                          throws VisADException,
                                 RemoteException,
                                 IllegalAccessException,
                                 InstantiationException,
                                 InvocationTargetException
return matrix inverse of data, which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix inverse of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

transpose

public static JamaMatrix transpose(FlatField data)
                            throws VisADException,
                                   RemoteException,
                                   IllegalAccessException,
                                   InstantiationException,
                                   InvocationTargetException
return matrix transpose of data, which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix transpose of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

det

public static double det(FlatField data)
                  throws VisADException,
                         RemoteException,
                         IllegalAccessException,
                         InstantiationException,
                         InvocationTargetException
return matrix determinant of data, which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix determinant of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

norm1

public static double norm1(FlatField data)
                    throws VisADException,
                           RemoteException,
                           IllegalAccessException,
                           InstantiationException,
                           InvocationTargetException
return matrix one norm of data (maximum column sum), which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix one norm of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

norm2

public static double norm2(FlatField data)
                    throws VisADException,
                           RemoteException,
                           IllegalAccessException,
                           InstantiationException,
                           InvocationTargetException
return matrix two norm of data (maximum singular value), which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix two norm of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

normInf

public static double normInf(FlatField data)
                      throws VisADException,
                             RemoteException,
                             IllegalAccessException,
                             InstantiationException,
                             InvocationTargetException
return matrix infinity norm of data (maximum row sum), which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix infiinity norm of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

normF

public static double normF(FlatField data)
                    throws VisADException,
                           RemoteException,
                           IllegalAccessException,
                           InstantiationException,
                           InvocationTargetException
return matrix Frobenius norm of data (sqrt of sum of squares of all elements), which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix Frobenius norm of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

rank

public static double rank(FlatField data)
                   throws VisADException,
                          RemoteException,
                          IllegalAccessException,
                          InstantiationException,
                          InvocationTargetException
return matrix effective numerical rank (from SVD) of data, which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix effective numerical rank of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

cond

public static double cond(FlatField data)
                   throws VisADException,
                          RemoteException,
                          IllegalAccessException,
                          InstantiationException,
                          InvocationTargetException
return matrix condition of data (ratio of largest to smallest singular value), which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix condition of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

trace

public static double trace(FlatField data)
                    throws VisADException,
                           RemoteException,
                           IllegalAccessException,
                           InstantiationException,
                           InvocationTargetException
return matrix trace of data (sum of the diagonal elements), which should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix trace of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

chol

public static JamaCholeskyDecomposition chol(FlatField data)
                                      throws VisADException,
                                             RemoteException,
                                             IllegalAccessException,
                                             InstantiationException,
                                             InvocationTargetException
return matrix Cholesky Decomposition of data, as a 1-Tuple (lower_triangular_factor); data should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix Cholesky decomponsition of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

eig

public static JamaEigenvalueDecomposition eig(FlatField data)
                                       throws VisADException,
                                              RemoteException,
                                              IllegalAccessException,
                                              InstantiationException,
                                              InvocationTargetException
return matrix Eigenvalue Decomposition of data, as a 3-Tuple (eigenvector_matrix, real_eigenvalue_components, imaginary_eigenvalue_components); data should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix Eigenvalue decomposition of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

lu

public static JamaLUDecomposition lu(FlatField data)
                              throws VisADException,
                                     RemoteException,
                                     IllegalAccessException,
                                     InstantiationException,
                                     InvocationTargetException
return matrix LU Decomposition of data, as a 3-Tuple (lower_triangular_factor, upper_triangular_factor, pivot_permutation_vector); data should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
Matrix LU decomposition of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

qr

public static JamaQRDecomposition qr(FlatField data)
                              throws VisADException,
                                     RemoteException,
                                     IllegalAccessException,
                                     InstantiationException,
                                     InvocationTargetException
return matrix QR Decomposition of data, as a 2-Tuple (orthogonal_factor, upper_triangular_factor); data should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix QR decomposition of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

svd

public static JamaSingularValueDecomposition svd(FlatField data)
                                          throws VisADException,
                                                 RemoteException,
                                                 IllegalAccessException,
                                                 InstantiationException,
                                                 InvocationTargetException
return matrix Singular Value Decomposition of data, as a 3-Tuple (left_singular_vectors, right_singular_vectors, singular_value_vector); data should have either a 1-D or 2-D gridded domain

Parameters:
data - VisAD FlatField data object
Returns:
matrix singular value decomposition of data
Throws:
VisADException - invalid data
RemoteException - part of data and display APIs, shouldn't occur
IllegalAccessException - Jama not installed
InstantiationException - Jama not installed
InvocationTargetException - Jama not installed

hist

public static FlatField hist(Field field,
                             Set set)
                      throws VisADException,
                             RemoteException
return histogram of range values of field selected by set, with dimension and bin sampling defined by set

Parameters:
field - VisAD Field data object whose range values are analyzed in histogram
set - VisAD Set data object that defines dimension and bin sampling for histogram
Returns:
histogram of range values of field
Throws:
VisADException - invalid data
RemoteException - unable to access remote field

hist

public static FlatField hist(Field field,
                             int[] ranges)
                      throws VisADException,
                             RemoteException
Return histogram of range values of field selected by ranges array, with dimension = ranges.length, and 64 equally spaced bins in each dimension

Parameters:
field - VisAD Field data object whose range values are analyzed in histogram
ranges - int[] array whose elements are indices of into the range Tuple of field, selecting range components as dimensions of the histogram
Returns:
histogram of range values of field
Throws:
VisADException - invalid data
RemoteException - unable to access remote field

hist

public static FlatField hist(Field field,
                             int[] ranges,
                             int[] sizes)
                      throws VisADException,
                             RemoteException
Return histogram of range values of field selected by ranges array, with dimension = ranges.length, and with number of equally spaced bins in each dimension determined by sizes array

Parameters:
field - VisAD Field data object whose range values are analyzed in histogram
ranges - int[] array whose elements are indices of into the range Tuple of field, selecting range components as dimensions of the histogram
sizes - int[] array whose elements are numbers of equally spaced bins for each dimension
Returns:
histogram of range value of field
Throws:
VisADException - invalid data
RemoteException - unable to access remote field

field

public static FlatField field(float[] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with default 1-D domain and with range values given by values array

Parameters:
values - float[] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(String name,
                              float[] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with default 1-D domain, with range values given by values array, and with given range RealType name

Parameters:
name - String defining range RealType name
values - float[] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(String dom0,
                              String name,
                              float[] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with default 1-D domain, with range values given by values array, and with given range RealType name

Parameters:
dom0 - String defining domain RealType name
name - String defining range RealType name
values - float[] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(Set set,
                              String name,
                              float[] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with given 1-D domain set, with range values given by values array, and with given range RealType name

Parameters:
set - VisAD Set defining 1-D domain
name - String defining range RealType name
values - float[] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(float[][] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with default 2-D domain and with range values given by values array

Parameters:
values - float[][] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(String name,
                              float[][] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with default 2-D domain, with range values given by values array, and with given range RealType name

Parameters:
name - String defining range RealType name
values - float[][] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(String dom0,
                              String dom1,
                              String rng,
                              float[][] values)
                       throws VisADException,
                              RemoteException
Return a VisAD FlatField with named default 2-D domain, with range values given by values array and with given range RealType name

Parameters:
dom0 - String defines first domain component
dom1 - String defines second domain component
rng - String defining range RealType name
values - float[][] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

field

public static FlatField field(Set set,
                              String name,
                              float[][] values)
                       throws VisADException,
                              RemoteException
return a VisAD FlatField with given 2-D domain set, with range values given by values array, and with given range RealType name

Parameters:
set - VisAD Set defining 2-D domain
name - String defining range RealType name
values - float[][] array defining range values of field
Returns:
the new FlatField
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getValuesLengths

public static int[] getValuesLengths(float[][] values)
                              throws VisADException
Get the lengths of the values of the input array

Parameters:
values -
Returns:
the array of lengths (sizes)
Throws:
VisADException

getDomainDimension

public static int getDomainDimension(Data data)
                              throws VisADException,
                                     RemoteException
Get the number of domain components from a given Data object.

Parameters:
data - VisAD Data object
Returns:
Number of domain components
Throws:
VisADException - Unable to construct field
RemoteException - Part of data and display APIs, shouldn't occur

domainDimension

public static int domainDimension(Data data)
                           throws VisADException,
                                  RemoteException
Get the domain dimension of the Data object

Parameters:
data -
Returns:
the domain dimension
Throws:
VisADException
RemoteException

getRangeDimension

public static int getRangeDimension(Data data)
                             throws VisADException,
                                    RemoteException
Get the number of range components from a given Data object.

Parameters:
data - VisAD Data object
Returns:
Number of range components.
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

rangeDimension

public static int rangeDimension(Data data)
                          throws VisADException,
                                 RemoteException
get the number of range components of the Data object

Parameters:
data - VisAD Data object
Returns:
Number of range components
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getDomainType

public static RealTupleType getDomainType(Data data)
                                   throws VisADException,
                                          RemoteException
Get the domain Type for the Data object

Parameters:
data - is the field to get the domain Type for
Returns:
the domain type of the data
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

domainType

public static RealTupleType domainType(Data data)
                                throws VisADException,
                                       RemoteException
Get the domain Type for the Data object

Parameters:
data - is the field to get the domain Type for
Returns:
the domain type of the data
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getDomainType

public static RealTupleType getDomainType(FunctionType type)
                                   throws VisADException,
                                          RemoteException
Get the domain Type for the FunctionType

Parameters:
type - is the FunctionType
Returns:
the domain type
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getRangeType

public static MathType getRangeType(Data data)
                             throws VisADException,
                                    RemoteException
Get the range Type for the field

Parameters:
data - is the field to get the range Type for
Returns:
the range type
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

rangeType

public static MathType rangeType(Data data)
                          throws VisADException,
                                 RemoteException
get the range Type for the field

Parameters:
data - is the field to get the range Type for
Returns:
the range type
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getRangeType

public static MathType getRangeType(FunctionType type)
                             throws VisADException,
                                    RemoteException
get the range Type for the FunctionType

Parameters:
type - is the FunctionType
Returns:
the range Type
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

domainType

public static String domainType(Data data,
                                int comp)
                         throws VisADException,
                                RemoteException
Get the name of the given component of the domain RealType.

Parameters:
data - VisAD Data object
comp - the domain component index (0...)
Returns:
Name of the Type of the selected domain component
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

rangeType

public static String rangeType(Data data,
                               int comp)
                        throws VisADException,
                               RemoteException
Get the name of the given component of the range RealType.

Parameters:
data - VisAD Data object
comp - the component index (0...)
Returns:
the name of the RealType of the range component
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

makeUnit

public static Unit makeUnit(String name)
                     throws NoSuchUnitException,
                            ParseException
get a VisAD Unit from the name given

Parameters:
name - name of unit desired (degC, etc)
Returns:
the Unit object corresponding to the name
Throws:
NoSuchUnitException
ParseException

makeDomain

public static Integer1DSet makeDomain(int length)
                               throws VisADException
Make an Integer1DSet of given length

Parameters:
length - is the desired length of the 1D Integer Set
Returns:
the Integer1DSet
Throws:
VisADException

makeDomain

public static Integer1DSet makeDomain(MathType type,
                                      int length)
                               throws VisADException
Make an Integer1DSet of given length and MathType

Parameters:
type - is the MathType of the Set
length - is the desired length of the 1D Integer Set
Returns:
the Integer1DSet
Throws:
VisADException

makeDomain

public static Integer1DSet makeDomain(String name,
                                      int length)
                               throws VisADException
Make an Integer1DSet of given length and make a MathType

Parameters:
name - is the MathType name to use to create the MathType
length - is the desired length of the 1D Integer Set
Returns:
the Integer1DSet
Throws:
VisADException

makeDomain

public static Integer2DSet makeDomain(int lengthX,
                                      int lengthY)
                               throws VisADException
Make an Integer2DSet of given lengths.

Parameters:
lengthX - is the desired length of the 2D Integer Set x
lengthY - is the desired length of the 2D Integer Set y
Returns:
the Integer2DSet
Throws:
VisADException

makeDomain

public static Integer2DSet makeDomain(MathType type,
                                      int lengthX,
                                      int lengthY)
                               throws VisADException
Make an Integer2DSet of given lengths

Parameters:
type - is the MathType of the Set
lengthX - is the desired length of the 2D Integer Set x
lengthY - is the desired length of the 2D Integer Set y
Returns:
the Integer2DSet
Throws:
VisADException

makeDomain

public static Integer2DSet makeDomain(String name,
                                      int lengthX,
                                      int lengthY)
                               throws VisADException,
                                      RemoteException
Make an Integer2DSet of given lengths.

Parameters:
name - is the MathType name to use to create the MathType (should be in the form: "(xx,yy)" )
lengthX - is the desired length of the 2D Integer Set x
lengthY - is the desired length of the 2D Integer Set y
Returns:
the Integer2DSet
Throws:
VisADException
RemoteException

makeDomain

public static Linear1DSet makeDomain(double first,
                                     double last,
                                     int length)
                              throws VisADException
Create a Linear1DSet for domain samples

Parameters:
first - is the first value in the linear set
last - is the last value in the linear set
length - is the number of values in the set
Returns:
the created visad.Linear1DSet
Throws:
VisADException

makeDomain

public static Linear1DSet makeDomain(MathType type,
                                     double first,
                                     double last,
                                     int length)
                              throws VisADException
Create a Linear1DSet for domain samples

Parameters:
type - is the VisAD MathType of this set
first - is the first value in the linear set
last - is the last value in the linear set
length - is the number of values in the set
Returns:
the created visad.Linear1DSet
Throws:
VisADException

makeDomain

public static Linear1DSet makeDomain(String name,
                                     double first,
                                     double last,
                                     int length)
                              throws VisADException
Create a Linear1DSet for domain samples

Parameters:
name - is the name of the VisAD MathType of this set
first - is the first value in the linear set
last - is the last value in the linear set
length - is the number of values in the set
Returns:
the created visad.Linear1DSet
Throws:
VisADException

makeDomain

public static Linear2DSet makeDomain(double first1,
                                     double last1,
                                     int length1,
                                     double first2,
                                     double last2,
                                     int length2)
                              throws VisADException
Create a Linear2DSet for domain samples

Parameters:
first1 - is the first value in the linear set's 1st dimension
last1 - is the last value in the linear set's 1st dimension
length1 - is the number of values in the set's 1st dimension
first2 - is the first value in the linear set's 2nd dimension
last2 - is the last value in the linear set's 2nd dimension
length2 - is the number of values in the set's 2nd dimension
Returns:
the created visad.Linear2DSet
Throws:
VisADException

makeDomain

public static Linear2DSet makeDomain(MathType type,
                                     double first1,
                                     double last1,
                                     int length1,
                                     double first2,
                                     double last2,
                                     int length2)
                              throws VisADException
Create a Linear2DSet for domain samples

Parameters:
type - is the VisAD MathType of this set
first1 - is the first value in the linear set's 1st dimension
last1 - is the last value in the linear set's 1st dimension
length1 - is the number of values in the set's 1st dimension
first2 - is the first value in the linear set's 2nd dimension
last2 - is the last value in the linear set's 2nd dimension
length2 - is the number of values in the set's 2nd dimension
Returns:
the created visad.Linear2DSet
Throws:
VisADException

makeDomain

public static Linear2DSet makeDomain(String name,
                                     double first1,
                                     double last1,
                                     int length1,
                                     double first2,
                                     double last2,
                                     int length2)
                              throws VisADException,
                                     RemoteException
Create a Linear2DSet for domain samples

Parameters:
name - is the name of the VisAD MathType of this set
first1 - is the first value in the linear set's 1st dimension
last1 - is the last value in the linear set's 1st dimension
length1 - is the number of values in the set's 1st dimension
first2 - is the first value in the linear set's 2nd dimension
last2 - is the last value in the linear set's 2nd dimension
length2 - is the number of values in the set's 2nd dimension
Returns:
the created visad.Linear2DSet
Throws:
VisADException
RemoteException

makeDomain

public static Linear3DSet makeDomain(double first1,
                                     double last1,
                                     int length1,
                                     double first2,
                                     double last2,
                                     int length2,
                                     double first3,
                                     double last3,
                                     int length3)
                              throws VisADException
Create a Linear3DSet for domain samples

Parameters:
first1 - is the first value in the linear set's 1st dimension
last1 - is the last value in the linear set's 1st dimension
length1 - is the number of values in the set's 1st dimension
first2 - is the first value in the linear set's 2nd dimension
last2 - is the last value in the linear set's 2nd dimension
length2 - is the number of values in the set's 2nd dimension
first3 - is the first value in the linear set's 3rd dimension
last3 - is the last value in the linear set's 3rd dimension
length3 - is the number of values in the set's 3rd dimension
Returns:
the created visad.Linear3DSet
Throws:
VisADException

makeDomain

public static Linear3DSet makeDomain(MathType type,
                                     double first1,
                                     double last1,
                                     int length1,
                                     double first2,
                                     double last2,
                                     int length2,
                                     double first3,
                                     double last3,
                                     int length3)
                              throws VisADException
Create a Linear3DSet for domain samples

Parameters:
type - is the VisAD MathType of this set
first1 - is the first value in the linear set's 1st dimension
last1 - is the last value in the linear set's 1st dimension
length1 - is the number of values in the set's 1st dimension
first2 - is the first value in the linear set's 2nd dimension
last2 - is the last value in the linear set's 2nd dimension
length2 - is the number of values in the set's 2nd dimension
first3 - is the first value in the linear set's 3rd dimension
last3 - is the last value in the linear set's 3rd dimension
length3 - is the number of values in the set's 3rd dimension
Returns:
the created visad.Linear3DSet
Throws:
VisADException

makeDomain

public static Linear3DSet makeDomain(String name,
                                     double first1,
                                     double last1,
                                     int length1,
                                     double first2,
                                     double last2,
                                     int length2,
                                     double first3,
                                     double last3,
                                     int length3)
                              throws VisADException,
                                     RemoteException
Create a Linear3DSet for domain samples

Parameters:
name - is the name of the VisAD MathType of this set
first1 - is the first value in the linear set's 1st dimension
last1 - is the last value in the linear set's 1st dimension
length1 - is the number of values in the set's 1st dimension
first2 - is the first value in the linear set's 2nd dimension
last2 - is the last value in the linear set's 2nd dimension
length2 - is the number of values in the set's 2nd dimension
first3 - is the first value in the linear set's 3rd dimension
last3 - is the last value in the linear set's 3rd dimension
length3 - is the number of values in the set's 3rd dimension
Returns:
the created visad.Linear3DSet
Throws:
RemoteException
VisADException

getDomainSet

public static Set getDomainSet(Data data)
                        throws VisADException,
                               RemoteException
Return the sampling set for the domain of the Data object

Parameters:
data - is the VisAD data object
Returns:
the sampling Set
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getDomain

public static Set getDomain(Data data)
                     throws VisADException,
                            RemoteException
Return the sampling set for the domain of the Data object

Parameters:
data - is the VisAD data object
Returns:
the sampling Set
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

getDomainSizes

public static int[] getDomainSizes(Data data)
                            throws VisADException,
                                   RemoteException
Return the lengths of the components of the sampling set

Parameters:
data - is the VisAD data object (Field or Set or Tuple; Scalars return 1.
Returns:
an int[] of the length(s)
Throws:
VisADException - unable to construct field
RemoteException - part of data and display APIs, shouldn't occur

replace

public static FlatField replace(FieldImpl f,
                                int[] list,
                                Real v)
                         throws VisADException,
                                RemoteException
Replaces specified values in a FlatField with the constant given

Parameters:
f - is the input FlatField
list - is the int[] list of indecies into f to replace
v - is the value to insert into f.
Returns:
a new FlatField
Throws:
RemoteException
VisADException

replace

public static FlatField replace(FieldImpl f,
                                int[] list,
                                double v)
                         throws VisADException,
                                RemoteException
Replaces specified values in a FlatField with the constant given

Parameters:
f - is the input FlatField
list - is the int[] list of indecies into f to replace
v - is the value to insert into f.
Returns:
the new FlatField
Throws:
VisADException
RemoteException

maskNoNavigation

public static FlatField maskNoNavigation(FieldImpl f)
                                  throws VisADException,
                                         RemoteException
Return a mask for points with navigation (1) or not (0)

Parameters:
f - is the input FieldImpl -- if not a FlatField, then try to get one!
Returns:
the FlatField of mask values
Throws:
VisADException
RemoteException

setMissingNoNavigation

public static FlatField setMissingNoNavigation(FieldImpl f)
                                        throws VisADException,
                                               RemoteException
For all non-navigatable points in the given FlatField, replace the FF's values with missing (Float.NaN). This is useful when an AREA file is off the planet, since there is no explicit "missing" value in AREA files, and it only indicated by "missing" navigation (lat/lon) information.

Parameters:
f - is the input FieldImpl -- if not a FlatField, then try to get one!
Returns:
the FlatField with missing values where there is no navigation
Throws:
VisADException
RemoteException

setToMissing

public static FlatField setToMissing(FieldImpl f,
                                     double v)
                              throws VisADException,
                                     RemoteException
Replaces all the given values in a FlatField with the missing value (Float.NaN);

Parameters:
f - is the input FlatField
v - is the value to replace with NaN.
Returns:
the new FlatField
Throws:
VisADException
RemoteException

replaceMissing

public static FlatField replaceMissing(FieldImpl f,
                                       double v)
                                throws VisADException,
                                       RemoteException
Replaces all the missing values in a FlatField with the constant given

Parameters:
f - is the input FlatField
v - is the value to insert into f.
Returns:
the new FlatField
Throws:
VisADException
RemoteException

replace

public static FlatField replace(FieldImpl f,
                                double v)
                         throws VisADException,
                                RemoteException
Replaces all the values in a FlatField with the constant given

Parameters:
f - is the input FlatField
v - is the value to insert into f.
Returns:
the new FlatField
Throws:
VisADException
RemoteException

replace

public static FlatField replace(FieldImpl f,
                                Real v)
                         throws VisADException,
                                RemoteException
Replaces all the values in a FlatField with the constant given

Parameters:
f - is the input FlatField
v - is the value to insert into f.
Throws:
VisADException
RemoteException

getMinMax

public static double[] getMinMax(FieldImpl f)
                          throws VisADException,
                                 RemoteException
Find the minium and maximum values of the FlatField or a sequence within a FieldImpl.

Parameters:
f - the FlatField (or FieldImpl - for a sequence)
Returns:
double[2]. double[0] = min, double[1] = max if the fields are all missing, then return min = max = Double.NaN
Throws:
VisADException
RemoteException

rescale

public static FieldImpl rescale(FieldImpl f,
                                double outlo,
                                double outhi)
                         throws VisADException,
                                RemoteException
Re-scale the values in a FieldImpl using auto-scaling

Parameters:
f - the FlatField (or FieldImpl sequence)
outlo - the output low-range value
outhi - the output high range value Values of the original field will be linearly scaled from their "min:max" to "outlo:outhi" If input FieldImpl is a sequence, then all items in sequence are done but the "min" and "max" are computed from all members of the sequence!
Returns:
new FieldImpl
Throws:
VisADException
RemoteException

rescale

public static FieldImpl rescale(FieldImpl f,
                                double inlo,
                                double inhi,
                                double outlo,
                                double outhi)
                         throws VisADException,
                                RemoteException
Re-scale the values in a FieldIimpl

Parameters:
f - the FieldImpl or FlatField
inlo - the input low-range value
inhi - the input high-range value
outlo - the output low-range value
outhi - the output high range value Values of the original field will be linearly scaled from "inlo:inhi" to "outlo:outhi" Values < inlo will be set to outlo; values > inhi set to outhi If input FieldImpl is a sequence, then all items in sequence are done
Returns:
values in new FieldImpl
Throws:
VisADException
RemoteException

getLatLons

public static float[][] getLatLons(GriddedSet domain,
                                   int[] index)
                            throws VisADException
Convert the domain to the reference earth located points. If the domain is not in lat/lon order then reset the order so that result[0] is the latitudes, result[1] is the longitudes by Don Murray

Parameters:
domain - the domain set
index - is the (optional) array of indecies to get points at
Returns:
the lat/lon/(alt) points
Throws:
VisADException - problem converting points

getLatLons

public static float[][] getLatLons(GriddedSet domain)
                            throws VisADException
Convert the domain to the reference earth located points. If the domain is not in lat/lon order then reset the order so that result[0] is the latitudes, result[1] is the longitudes by Don Murray

Parameters:
domain - the domain set
Returns:
the lat/lon/(alt) points
Throws:
VisADException - problem converting points

getLatLons2D

public static float[][][] getLatLons2D(GriddedSet domain)
                                throws VisADException
Convert the domain to the reference earth located points. If the domain is not in lat/lon order then reset the order so that result[0] is the latitudes, result[1] is the longitudes by Tom Whittaker

Parameters:
domain - the domain set
Returns:
the lat/lon/(alt) points
Throws:
VisADException - problem converting points

getEarthLocationPoints

public static float[][] getEarthLocationPoints(GriddedSet domain)
                                        throws VisADException
Convert the domain to the reference earth located points

Parameters:
domain - the domain set
Returns:
the lat/lon/(alt) points
Throws:
VisADException - problem converting points by Don Murray

isLatLonOrder

public static boolean isLatLonOrder(SampledSet spatialSet)
                             throws VisADException
Check to see if this is a navigated domain (can be converted to lat/lon)

Parameters:
spatialSet - spatial domain of the grid
Returns:
true if the domain of the grid is in or has a reference to Latitude/Longitude
Throws:
VisADException - can't get at VisAD objects by Don Murray

createAreaField

public static FlatField createAreaField(FieldImpl f)
                                 throws VisADException,
                                        RemoteException
construct a Field containing the computed area of each data point

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
Returns:
FlatField of the computed areas
Throws:
VisADException
RemoteException

computeSum

public static double computeSum(FlatField f,
                                int[] list)
                         throws VisADException,
                                RemoteException
Sum up the values of each point named in the list (see "createAreaField" method)

Parameters:
f - VisAD FlatField containing the values to be summed at each point
list - an array of points to be used to sum up the values (see the "find" method)
Returns:
the summation of the data values defined in the list or -1 if unable to compute.
Throws:
VisADException
RemoteException

computeAverage

public static double computeAverage(FlatField f,
                                    int[] list)
                             throws VisADException,
                                    RemoteException
Compute the average of each point named in the list (see "createArea" method)

Parameters:
f - VisAD FlatField containing the values to be averaged at each point
list - an array of points to be used to compute the average values (see the "find" method)
Returns:
the average of the data values defined in the list
Throws:
VisADException
RemoteException

mask

public static FieldImpl mask(FieldImpl f,
                             String op,
                             double v)
                      throws VisADException,
                             RemoteException
Mask out values outside testing limits in a FieldImpl

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
op - Comparison operator as string ('gt','le',...)
v - Numeric operand for comparison
Returns:
a FieldImpl with values of either 0 (did not meet criterion) or 1 (met criteron). Example: b = mask(a, 'gt', 100) if 'a' is an image, 'b' will be an image with values of 1 where 'a' was > 100, and zero elsewhere.
Throws:
VisADException
RemoteException

mask

public static FieldImpl mask(FieldImpl f,
                             String op,
                             double v,
                             boolean useNaN)
                      throws VisADException,
                             RemoteException
Mask out values outside testing limits in a FieldImpl

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
op - Comparison operator as string ('gt','le',...)
v - Numeric operand for comparison
useNaN - if true, then NaN is used instead of zero for result.
Returns:
a FieldImpl with values of either 0 (did not meet criterion) or 1 (met criteron). Example: b = mask(a, 'gt', 100) if 'a' is an image, 'b' will be an image with values of 1 where 'a' was > 100, and zero elsewhere.
Throws:
VisADException
RemoteException

mask

public static FieldImpl mask(Data f,
                             String op,
                             Data v)
                      throws VisADException,
                             RemoteException
Mask out values outside testing limits...

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
op - Comparison operator as string ('gt','le',...)
v - Numeric operand for comparison
Returns:
a FieldImpl with values of either 0 (did not meet criterion) or 1 (met criteron).
Throws:
VisADException
RemoteException

mask

public static FieldImpl mask(FieldImpl f,
                             String op,
                             Data v)
                      throws VisADException,
                             RemoteException
Mask out values outside testing limits in a FieldImpl

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
op - Comparison operator as string ('gt','le',...)
v - VisAd operand for comparison. If the value of 'v' is a Field, then it will be resampled to the domain of 'f' is possible before the comparison.
Returns:
a FieldImpl with values of either 0 (did not meet criterion) or 1 (met criteron). Example: b = mask(a, 'gt', c) if 'a' is an image, 'b' will be an image with values of 1 where 'a' was > the corresponding value of 'c', and zero elsewhere.
Throws:
VisADException
RemoteException

mask

public static FieldImpl mask(FieldImpl f,
                             String op,
                             Data v,
                             boolean useNaN)
                      throws VisADException,
                             RemoteException
Mask out values outside testing limits in a FieldImpl

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
op - Comparison operator as string ('gt','le',...)
v - VisAd operand for comparison.
useNaN - if true, then NaN will be used for "false" If the value of 'v' is a Field, then it will be resampled to the domain of 'f' is possible before the comparison.
Returns:
a FieldImpl with values of either 0 or NaN (did not meet criterion) or 1 (met criteron). Example: b = mask(a, 'gt', c) if 'a' is an image, 'b' will be an image with values of 1 where 'a' was > the corresponding value of 'c', and zero or NaN elsewhere.
Throws:
VisADException
RemoteException

maskWithinRange

public static FieldImpl maskWithinRange(FieldImpl f,
                                        double vmin,
                                        double vmax,
                                        boolean useNaN)
                                 throws VisADException,
                                        RemoteException
Mask out with 1.0's those values inside the given range; set values outside the range with zero or NaN.

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
vmin - The lower limit of the range
vmax - The upper limit of the range
useNaN - Set to true to use NaN as the "outside the range" value; otherwise, use zero. The range is exclusive; that is if vmin < values < vmax then 1.0 is returned.
Returns:
a FieldImpl with values of either 0 (or NaN, meaning: did not meet criterion) or 1 (met criteron). Example: b = maskWithinRange(a, 100, 200, true) if 'a' is an image, 'b' will be an image with values of 1 where values in 'a' were between 'vmin' and 'vmax' and zero (or NaN) elsewhere.
Throws:
VisADException
RemoteException

maskOutsideRange

public static FieldImpl maskOutsideRange(FieldImpl f,
                                         double vmin,
                                         double vmax,
                                         boolean useNaN)
                                  throws VisADException,
                                         RemoteException
Mask out with 1.0's those values outside the given range; otherwise, set the values to zero or NaN.

Parameters:
f - VisAD data object (FlatField or FieldImpl) as source
vmin - The lower limit of the range
vmax - The upper limit of the range
useNaN - Set to true to use NaN as the "not outside the range" value; otherwise, use zero. The range is exclusive; that is for values < vmin or values > vmax, the returned value will be 1.0.
Returns:
a FieldImpl with values of either 0 (or NaN, meaning: did not meet criterion) or 1 (met criteron). Example: b = maskOutsideRange(a, 100, 200, true) if 'a' is an image, 'b' will be an image with values of 1 where values in 'a' were less than 'vmin' or greater than 'vmax' and zero (or NaN) elsewhere.
Throws:
VisADException
RemoteException

find

public static int[] find(FieldImpl f,
                         String op,
                         double v)
                  throws VisADException,
                         RemoteException
Get a list of points where a comparison is true.

Parameters:
f - VisAD data object (FlatField) as source
op - Comparison operator as string ('gt','le',...)
v - Numeric operand for comparison
Returns:
an int[] containing the sampling indecies where the criterion was met. Example: b = find(a, 'gt', 100) if 'a' is an image, 'b' will be a list of indecies in 'a' where the values are > 100.
Throws:
VisADException
RemoteException

find

public static int[] find(Data f,
                         String op,
                         Data v)
                  throws VisADException,
                         RemoteException
Get a list of points where a comparison is true.

Parameters:
f - VisAD data object (usually FlatField) as source
op - Comparison operator as string ('gt','le',...)
v - VisAd operand for comparison.
Returns:
an int[] containing the sampling indecies where the criterion was met. If the value of 'v' is a Field, then it will be resampled to the domain of 'f' is possible before the comparison. Example: b = find(a, 'gt', c) if 'a' is an image, 'b' will be a list of indecies in 'a' where the values are greater than the corresponding values of 'c'.
Throws:
VisADException
RemoteException

findWithinRange

public static int[] findWithinRange(FieldImpl f,
                                    double vmin,
                                    double vmax)
                             throws VisADException,
                                    RemoteException
Get a list of points where values fall within the given range

Parameters:
f - VisAD data object (usually FlatField) as source
vmin - The minimum value for the range
vmax - The maximum value for the range
Returns:
an int[] containing the sampling indecies where the values fall within the range ( vmin < value < vmax ) Example: b = findWithinRange(a, 100, 200) if 'a' is an image, 'b' will be a list of indecies in 'a' where the values are greater than 'vmin' and less than 'vmax'
Throws:
VisADException
RemoteException

findOutsideRange

public static int[] findOutsideRange(FieldImpl f,
                                     double vmin,
                                     double vmax)
                              throws VisADException,
                                     RemoteException
Get a list of points where values fall outside the given range

Parameters:
f - VisAD data object (usually FlatField) as source
vmin - The minimum value for the range
vmax - The maximum value for the range
Returns:
an int[] containing the sampling indecies where the values fall within the range (value < vmin or value > vmax ) Example: b = findOutsideRange(a, 100, 200) if 'a' is an image, 'b' will be a list of indecies in 'a' where the values are less than 'vmin' or greater than 'vmax'
Throws:
VisADException
RemoteException

resample

public static Field resample(Field data,
                             Set s)
                      throws VisADException,
                             RemoteException
resample the data field into the defined domain set

Parameters:
data - is the input Field
s - is the Set which must have a domain MathType identical to data's original
Returns:
the new Field
Throws:
VisADException
RemoteException

resample

public static Field resample(Field data,
                             Set s,
                             int mode)
                      throws VisADException,
                             RemoteException
resample the data field into the defined domain set

Parameters:
data - is the input Field
s - is the Set which must have a domain MathType identical to data's original
mode - is the sampling mode (e.g. Data.NEAREST_NEIGHBOR)
Returns:
the new Field
Throws:
VisADException
RemoteException

getValue

public static double getValue(Real r)
returns the double value of a Real value.

Parameters:
r - is the Real
Returns:
double value of the Real

getValues

public static double[][] getValues(Field data)
                            throws VisADException,
                                   RemoteException
returns the double values of the range

Parameters:
data - is the Field from which to get the numeric values
Returns:
values for all range components in the Field
Throws:
VisADException
RemoteException

setValues

public static void setValues(Field f,
                             double[][] vals)
                      throws VisADException,
                             RemoteException
Sets the sample values into the Field

Parameters:
f - is the Field to put the samples into
vals - are the values for all range components in the Field
Throws:
VisADException
RemoteException

combine

public static Field combine(Field[] fields)
                     throws VisADException,
                            RemoteException
combines fields

Parameters:
fields - array of fields
Returns:
the new Field
Throws:
VisADException
RemoteException

extract

public static Field extract(Field data,
                            MathType t)
                     throws VisADException,
                            RemoteException
Extracts a component of the Field

Parameters:
data - the field with multiple range componenents
t - the MathType of the field to extract
Returns:
the new Field
Throws:
VisADException
RemoteException

extract

public static Field extract(Field data,
                            String s)
                     throws VisADException,
                            RemoteException
Extracts a component of the Field

Parameters:
data - the field with multiple range componenents
s - the name of the components to extract
Returns:
the new Field
Throws:
VisADException
RemoteException

extract

public static Field extract(Field data,
                            int comp)
                     throws VisADException,
                            RemoteException
Extracts a component of the Field

Parameters:
data - the field with multiple range componenents
comp - the index of the component to extract
Returns:
the new Field
Throws:
VisADException
RemoteException

domainFactor

public static Field domainFactor(Field data,
                                 RealType factor)
                          throws VisADException,
                                 RemoteException
Factors out the given MathType from the domain of the data object.

For example, if the data has a MathType: (Line, Element)->(value) then factoring out Element creates a new data object with a MathType: Element->(Line->(value))

Parameters:
data - is the Field Data object
factor - is the domain component Type to factor out
Returns:
the new Field
Throws:
VisADException
RemoteException

domainFactor

public static Field domainFactor(Field data,
                                 int comp)
                          throws VisADException,
                                 RemoteException
Factors out the given domain component (by index) and creates a new data object.

Parameters:
data - is the Field Data object
comp - is the domain component index
Returns:
the new Field
Throws:
VisADException
RemoteException
See Also:
domainFactor(Field, RealType)

evaluate

public static Data evaluate(Field data,
                            Real domain)
                     throws VisADException,
                            RemoteException
Creates a VisAD Data by evaluating the Field at the point given in the domain.

Parameters:
data - is the field
domain - is the Real domain where the field should be evaluated
Returns:
the Data object for the evaluated point
Throws:
VisADException
RemoteException

evaluate

public static Data evaluate(Field data,
                            double domain)
                     throws VisADException,
                            RemoteException
Parameters:
data - is the field
domain - is the Real domain where the field should be evaluated
Returns:
the Data object for the evaluated point
Throws:
VisADException
RemoteException

makeType

public static MathType makeType(String s)
                         throws VisADException,
                                RemoteException
Creates a VisAD MathType from the given string

Parameters:
s - is the string describing the names in the form: (x,y)->(a) for a Field.

Forms allowed:

  • "Foo" will make and return a RealType
  • "(Foo)" makes a RealType and returns a RealTupleType
  • "Foo,Bar" will make two RealTypes and return a RealTupleType
  • "(Foo,Bar)" does the same thing
  • "(Foo,Bar)->val" makes 3 RealTypes and returns a FunctionType (use getDomainType(type) and getRangeType(type) to get the parts

Returns:
the MathType
Throws:
VisADException
RemoteException

makeType

public static RealTupleType makeType(String[] s,
                                     CoordinateSystem c)
                              throws VisADException,
                                     RemoteException
make a MathType with a Coordinate System. This is just a short-hand for visad.RealTupleType(RealType[], CS, Set)

Parameters:
s - is an array of names for (or of) the RealType
c - is a CoordinateSystem
Returns:
RealTupleType of the input RealTypes and CoordinateSystem
Throws:
VisADException
RemoteException

makeRealType

public static RealType makeRealType(String name)
Make or get the RealType corresponding to the name; if none exists, make one and return it.

Parameters:
name - is the name of the RealType type.
Returns:
the RealType for the given name

getRealType

public static RealType getRealType(String name)
Make or get the RealType corresponding to the name; if none exists, make one and return it.

Parameters:
name - is the name of the RealType type.
Returns:
the RealType for the given name

makeRealType

public static RealType makeRealType(String name,
                                    Unit unit)
Make or get the RealType corresponding to the name; if none exists, make one and return it.

Parameters:
name - is the name of the RealType type.
unit - is the new Unit to associate with this (must be compatible with any existing Unit)
Returns:
the RealType

getRealType

public static RealType getRealType(String name,
                                   Unit unit)
Make or get the RealType corresponding to the name; if none exists, make one and return it.

Parameters:
name - is the name of the RealType type.
unit - is the new Unit to associate with this (must be compatible with any existing Unit)
Returns:
the RealType

getType

public static MathType getType(Data data)
                        throws VisADException,
                               RemoteException
Get the MathType of the named VisAD data object

Parameters:
data - is the VisAD Data object
Returns:
the MathType
Throws:
VisADException
RemoteException

showAxesScales

public static void showAxesScales(DisplayImpl d,
                                  boolean on)
                           throws VisADException,
                                  RemoteException
Turn on/off the axes labels & scales on a Display

Parameters:
d - the DisplayImpl to address
on - whether to turn the axes labels on (true)
Throws:
VisADException
RemoteException

setAxesScalesLabel

public static void setAxesScalesLabel(ScalarMap[] sm,
                                      String[] labels)
                               throws VisADException,
                                      RemoteException
Set the Label to be used for the axes

Parameters:
sm - the array of ScalarMaps
labels - the array of strings to use for labels
Throws:
VisADException
RemoteException

setAxesScalesFont

public static void setAxesScalesFont(ScalarMap[] sm,
                                     Font f)
                              throws VisADException,
                                     RemoteException
Set the font to be used for the axes labels and scales

Parameters:
sm - the array of ScalarMaps
f - the java.awt.Font to use
Throws:
VisADException
RemoteException

makePairedLines

public static UnionSet makePairedLines(MathType mt,
                                       double[][] points)
                                throws VisADException,
                                       RemoteException
Construct a UnionSet of the given MathType for the pairs of points given

Parameters:
mt - the MathType for the UnionSet
points - the point paris to use
Returns:
the UnionSet
Throws:
VisADException
RemoteException

dumpTypes

public static void dumpTypes(Data d)
                      throws VisADException,
                             RemoteException
Helper method for the dump(Data|Math)Type() methods. This will list both the MathType and DataType information to stdout.

Parameters:
d - is the Data object
Throws:
VisADException
RemoteException

whatTypes

public static ByteArrayOutputStream whatTypes(Data d)
                                       throws VisADException,
                                              RemoteException
helper method for the dump(Data|Math)Type() methods this will list both the MathType and DataType information to a ByteArrayOutputStream which is returned.

Parameters:
d - is the Data object
Returns:
the printable ByteArrayOutputStream
Throws:
VisADException
RemoteException

dumpType

public static void dumpType(Data d)
                     throws VisADException,
                            RemoteException
helper method for dumpMathType() only This just dumps out the MathType of the Data object.

Parameters:
d - is the Data object
Throws:
VisADException
RemoteException

whatType

public static ByteArrayOutputStream whatType(Data d)
                                      throws VisADException,
                                             RemoteException
helper method for dumpMathType() only This just dumps out the MathType of the Data object into a ByteArrayOutputStream which is returned.

Parameters:
d - is the Data object
Returns:
the printable ByteArrayOutputStream
Throws:
VisADException
RemoteException

getPointDataAdapter

public static PointDataAdapter getPointDataAdapter(String request)
                                            throws VisADException,
                                                   RemoteException
Get a PointDataAdapter for the given string (file, url, etc)

Parameters:
request -
Returns:
the new PointDataAdapter
Throws:
VisADException
RemoteException

getNetcdfData

public static Data getNetcdfData(String filename)
                          throws VisADException,
                                 RemoteException,
                                 IOException
Helper method to read netcdf files with possible factor

Parameters:
filename -
Returns:
the Data object
Throws:
VisADException
RemoteException
IOException

getNetcdfData

public static Data getNetcdfData(String filename,
                                 String factor)
                          throws VisADException,
                                 RemoteException,
                                 IOException
Try to create a Data object from a NetCDF file

Parameters:
filename -
factor -
Returns:
the Data object
Throws:
VisADException
RemoteException
IOException

getScale

public static double[][] getScale(ScalarMap smap)
Helper method for ScalarMap.getScale(double[], double[], double[]).

Parameters:
smap - the ScalarMap to get the values from
Returns:
get the getScale() results: so = scale and offset data = the data range display = the display range