public class FileFlatField extends FlatField
DataImpl.SyncherRangeCoordinateSystem, RangeCoordinateSystems, RangeUnits, TupleDimensionABS, ACOS, ACOS_DEGREES, ADD, ASIN, ASIN_DEGREES, ATAN, ATAN_DEGREES, ATAN2, ATAN2_DEGREES, CEIL, COS, COS_DEGREES, DEGREES_TO_RADIANS, DEPENDENT, DIVIDE, EXP, FLOOR, INDEPENDENT, INV_ATAN2, INV_ATAN2_DEGREES, INV_DIVIDE, INV_POW, INV_REMAINDER, INV_SUBTRACT, LOG, MAX, MIN, MULTIPLY, NEAREST_NEIGHBOR, NEGATE, NO_ERRORS, NOP, POW, RADIANS_TO_DEGREES, REMAINDER, RINT, ROUND, SIN, SIN_DEGREES, SQRT, SUBTRACT, TAN, TAN_DEGREES, WEIGHTED_AVERAGE| Constructor and Description |
|---|
FileFlatField(FileAccessor accessor,
CacheStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
Data |
adjustSamplingError(Data error,
int error_mode)
return a FlatField that clones this, except its ErrorEstimate-s
are adjusted for sampling errors in error
|
Data |
binary(Data data,
int op,
int sampling_mode,
int error_mode)
Pointwise binary operation between this and data.
|
Data |
binary(Data data,
int op,
MathType new_type,
int sampling_mode,
int error_mode)
Return new Field with value 'this op data'.
|
Object |
clone()
Clones this instance.
|
DataShadow |
computeRanges(ShadowType type,
DataShadow shadow)
Recursive version of computeRanges(), called down through
Data object tree.
|
Field |
domainFactor(RealType factor)
Factors this instance into a (nested) field-of-fields.
|
Field |
extract(int component)
extract field from this[].component;
this is OK, when we get around to it
|
Unit[] |
getDefaultRangeUnits()
Get default range Unit-s for 'Flat' components.
|
CoordinateSystem |
getDomainCoordinateSystem()
Get the CoordinateSystem associated with the domain RealTuple
|
Set |
getDomainSet()
Returns the domain-set of this instance.
|
Unit[] |
getDomainUnits()
Returns the units of the values in the domain set.
|
float[][] |
getFloats(boolean copy)
Returns the range values in their default units as floats.
|
int |
getLength()
get number of samples
|
CoordinateSystem[] |
getRangeCoordinateSystem()
Returns the range CoordinateSystem assuming that the range type is
a RealTupleType (and throws a TypeException if its not).
|
CoordinateSystem[] |
getRangeCoordinateSystem(int component)
Returns the CoordinateSystem of a component of the range.
|
Unit[][] |
getRangeUnits()
return array of Units associated with each RealType
component of range; these may differ from default
Units of range RealTypes, but must be convertable;
the second index has length = 1 (since all samples
have the same Units)
|
Data |
getSample(int index)
Get the range value at the index-th sample.
|
double[][] |
getValues()
Returns the range values in their default units as doubles.
|
double[][] |
getValues(boolean copy)
Returns the range values in their default units as doubles.
|
double[] |
getValues(int index)
Get values for 'Flat' components in default range Unit-s.
|
boolean |
isFlatField()
return true if this a FlatField or a RemoteField adapting a FlatField
|
boolean |
isMissing()
Test whether range values are missing
|
String |
longString(String pre) |
Field |
resample(Set set,
int sampling_mode,
int error_mode)
Resamples the range to domain samples of a given set.
|
void |
setSample(int index,
Data range)
Set the range value at the index-th sample
|
void |
setSample(int index,
Data range,
boolean copy)
Set the range value at the index-th sample
|
void |
setSample(RealTuple domain,
Data range)
set the range value at the sample nearest to domain
|
String |
toString() |
Data |
unary(int op,
int sampling_mode,
int error_mode)
Pointwise unary operation applied to this.
|
Data |
unary(int op,
MathType new_type,
int sampling_mode,
int error_mode)
Return new FlatField with value 'this op'.
|
float[][] |
unpackFloats()
unpack an array of floats from field sample values according to the
RangeSet-s; returns a copy
|
double[][] |
unpackValues()
unpack an array of doubles from field sample values according to the
RangeSet-s; returns a copy
|
clearMissing, cloneDouble, cloneDouble, cloneFloat, cloneFloat, convertToField, derivative, derivative, derivative, derivative, derivative, equals, extract, fillField, getFloats, getRangeDimension, getRangeErrors, getRangeSets, getSample, getStringValues, grabBytes, main, makeField, makeField1, makeField2, makeRational, makeRational, nullRanges, pr, resampleDouble, setRangeErrors, setSamples, setSamples, setSamples, setSamples, setSamples, setSamples, setSamples, setSamples, setSamples, unpackFloats, unpackFloats, unpackOneFloatRangeComp, unpackOneFloatRangeComp, unpackOneRangeComp, unpackOneRangeComp, unpackValues, unpackValues__getitem__, __len__, __setitem__, __setitem__, combine, combine, combine, combine, combine, domainEnumeration, domainFactor, domainMultiply, domainMultiply, domainMultiply, domainMultiply, extract, extract, setSample, setSample, setSamples__getitem__, __getitem__, evaluate, evaluate, evaluate, evaluate, getDomainDimension, resample__add__, __add__, __div__, __div__, __mod__, __mod__, __mul__, __mul__, __neg__, __pow__, __pow__, __radd__, __rdiv__, __rmod__, __rmul__, __rpow__, __rsub__, __sub__, __sub__, abs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, notifyReferences, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegreesaddReference, removeReferencefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdomainEnumeration, domainMultiply, domainMultiply, setSampleevaluate, evaluate, evaluate, evaluate, getDomainDimension, resampleabs, abs, acos, acos, acosDegrees, acosDegrees, add, add, asin, asin, asinDegrees, asinDegrees, atan, atan, atan2, atan2, atan2Degrees, atan2Degrees, atanDegrees, atanDegrees, ceil, ceil, changeMathType, computeRanges, computeRanges, cos, cos, cosDegrees, cosDegrees, dataClone, divide, divide, exp, exp, floor, floor, getType, local, log, log, longString, max, max, min, min, multiply, multiply, negate, negate, pow, pow, remainder, remainder, rint, rint, round, round, sin, sin, sinDegrees, sinDegrees, sqrt, sqrt, subtract, subtract, tan, tan, tanDegrees, tanDegreesaddReference, removeReferencepublic FileFlatField(FileAccessor accessor, CacheStrategy strategy) throws VisADException
VisADExceptionpublic Data getSample(int index) throws VisADException, RemoteException
FlatFieldgetSample in interface FieldgetSample in class FlatFieldindex - index of requested range sampleVisADException - problem getting dataRemoteException - problem getting data from remote objectpublic int getLength()
FieldImplpublic Unit[] getDomainUnits()
FieldImplgetDomainUnits in interface FunctiongetDomainUnits in class FieldImplpublic CoordinateSystem getDomainCoordinateSystem()
FunctionImplgetDomainCoordinateSystem in interface FunctiongetDomainCoordinateSystem in class FieldImplpublic CoordinateSystem[] getRangeCoordinateSystem() throws TypeException
FlatFieldgetRangeCoordinateSystem in interface FieldgetRangeCoordinateSystem in class FlatFieldnull and will be of
length 1.TypeException - The type of the range is neither RealType nor
RealTupleType.public CoordinateSystem[] getRangeCoordinateSystem(int component) throws TypeException
FlatFieldgetRangeCoordinateSystem in interface FieldgetRangeCoordinateSystem in class FlatFieldcomponent - The index of the component. The value shall be
greater than or equal to zero and less that the
number of components in the TupleType of the
range.i-th
component. Won't be null and will
be of length 1. The single element might be
null.TypeException - The type of the range is either RealType or
RealTupleType.public Unit[][] getRangeUnits()
FlatFieldgetRangeUnits in interface FieldgetRangeUnits in class FlatFieldpublic Unit[] getDefaultRangeUnits()
FlatFieldgetDefaultRangeUnits in interface FieldgetDefaultRangeUnits in class FlatFieldpublic double[][] getValues()
throws VisADException
FlatFieldgetValues in interface FieldgetValues in class FlatFieldMathType of
the range. Element [i][j] is
the jth sample value of the
ith component of the range.VisADException - if a VisAD object couldn't be created.public double[][] getValues(boolean copy)
throws VisADException
FlatFieldgetValues in interface FieldgetValues in class FlatFieldcopy - Whether or not the returned array might be the
actual range array. If true, then
the returned array will not be the actual range
array.MathType of
the range. Element [i][j] is
the jth sample value of the
ith component of the range.VisADException - if a VisAD object couldn't be created.public double[] getValues(int index)
throws VisADException
FlatFieldgetValues in interface FlatFieldIfacegetValues in class FlatFieldMathType of
the range. Element [i] is
the value of the ith component
of the flattened range.VisADException - if a VisAD object couldn't be created.public float[][] getFloats(boolean copy)
throws VisADException
FlatFieldgetFloats in interface FieldgetFloats in class FlatFieldcopy - Whether or not the returned array might be the
actual range array. If true, then
the returned array will not be the actual range
array.MathType of
the range. Element [i][j] is
the jth sample value of the
ith component of the range.VisADException - if a VisAD object couldn't be created.public Set getDomainSet()
FieldImplReturns the domain-set of this instance. The actual set is returned: it is not a copy or a clone.
Note that it is possible to simultaneously modify the domain-set of
both this instance and of a clone by modifying the values in the array
returned by invoking getSamples(false) on the domain-set of
either this instance or the clone. Don't do this unless you enjoy
debugging.
getDomainSet in interface FieldgetDomainSet in class FieldImplpublic void setSample(int index,
Data range)
throws VisADException,
RemoteException
FlatFieldsetSample in interface FieldsetSample in class FlatFieldindex - index to setrange - range value to setVisADException - if range's MathType is incompatible or
some other error.RemoteException - if the Remote object couldn't be created.public void setSample(RealTuple domain, Data range) throws VisADException, RemoteException
FieldsetSample in interface FieldsetSample in class FieldImplVisADExceptionRemoteExceptionpublic void setSample(int index,
Data range,
boolean copy)
throws VisADException,
RemoteException
FlatFieldsetSample in interface FieldsetSample in class FlatFieldindex - index to setrange - range value to setcopy - flag to copy values - meaningless for FlatFieldVisADException - if range's MathType is incompatible or
some other error.RemoteException - if the Remote object couldn't be created.public boolean isMissing()
FlatFieldpublic Data binary(Data data, int op, int sampling_mode, int error_mode) throws VisADException, RemoteException
DataImplbinary in interface Databinary in class DataImpldata - other Data operand for binary operationop - may be Data.ADD, Data.SUBTRACT, etc; these include all
binary operations defined for Java primitive data typessampling_mode - may be Data.NEAREST_NEIGHBOR or
Data.WEIGHTED_AVERAGEerror_mode - may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;VisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic Data binary(Data data, int op, MathType new_type, int sampling_mode, int error_mode) throws VisADException, RemoteException
FlatFieldbinary in interface Databinary in class FlatFielddata - object to operate onop - operation to perform (e.g. ADD, SUB, MULT)new_type - MathType of new objectsampling_mode - sampling mode to use
(e.g., NEAREST_NEIGHBOR, WEIGHTED_AVERAGE)error_mode - error estimate mode (e.g., NO_ERROR, DEPENDENT,
independent)VisADException - couldn't create new VisAD objectRemoteException - couldn't create new Remote objectpublic Data unary(int op, int sampling_mode, int error_mode) throws VisADException, RemoteException
DataImplunary in interface Dataunary in class DataImplop - may be Data.ABS, Data.ACOS, etc; these include all
unary operations defined for Java primitive data typessampling_mode - may be Data.NEAREST_NEIGHBOR or
Data.WEIGHTED_AVERAGEerror_mode - may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;VisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic Data unary(int op, MathType new_type, int sampling_mode, int error_mode) throws VisADException
FlatFieldunary in interface Dataunary in class FlatFieldop - operation to perform (e.g., NOP, ABS, COS)new_type - MathType of new objectsampling_mode - sampling mode to use
(e.g., NEAREST_NEIGHBOR, WEIGHTED_AVERAGE)error_mode - error estimate mode (e.g., NO_ERROR, DEPENDENT,
independent)VisADException - couldn't create new VisAD objectpublic double[][] unpackValues()
throws VisADException
unpackValues in class FlatFieldVisADExceptionpublic float[][] unpackFloats()
throws VisADException
unpackFloats in class FlatFieldVisADExceptionpublic Field extract(int component) throws VisADException, RemoteException
FlatFieldextract in interface Fieldextract in class FlatFieldVisADExceptionRemoteExceptionpublic Field domainFactor(RealType factor) throws VisADException, RemoteException
FieldImpldomainFactor in interface FielddomainFactor in class FieldImplfactor - The type of the domain for the outer field.DomainException - The domain of this instance cannot be factored
as requested.VisADException - VisAD failure.RemoteException - Java RMI failure.for copy informationpublic Field resample(Set set, int sampling_mode, int error_mode) throws VisADException, RemoteException
FlatFieldresample in interface Functionresample in class FlatFieldset - The set of points at which to resample this
field.sampling_mode - Resampling mode: Data.NEAREST_NEIGHBOR or
Data.WEIGHTED_AVERAGEerror_mode - Error estimation mode: Data.DEPENDENT,
Data.INDEPENDENT, or Data.NO_ERRORS.VisADException - unable to resample functionRemoteException - Java RMI exceptionpublic DataShadow computeRanges(ShadowType type, DataShadow shadow) throws VisADException
DatacomputeRanges in interface DatacomputeRanges in class FlatFieldtype - ShadowType generated for MathType of thisshadow - DataShadow instance whose contained double[][]
array and animation sampling Set are modified
according to RealType values in this, and used
as return valueVisADException - a VisAD error occurredpublic Data adjustSamplingError(Data error, int error_mode) throws VisADException, RemoteException
FlatFieldadjustSamplingError in interface DataadjustSamplingError in class FlatFielderror_mode - may be Data.INDEPENDENT, Data.DEPENDENT or
Data.NO_ERRORS;VisADException - a VisAD error occurredRemoteException - an RMI error occurredpublic boolean isFlatField()
FieldisFlatField in interface FieldisFlatField in class FlatFieldpublic Object clone()
clone() contract in that the returned object will compare unequal to
this instance. As such, this method should probably not be invoked.public String toString()
public String longString(String pre)
longString in interface DatalongString in class FlatFieldpre - String added to start of each lineCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.