public class GridMath
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AXIS_X
axis identifier - X
|
static java.lang.String |
AXIS_Y
axis identifier - Y
|
static java.lang.String |
FUNC_AVERAGE
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_DIFFERENCE
function for the timeStepFunc routine
|
static java.lang.String |
FUNC_EXP |
static java.lang.String |
FUNC_MAX
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_MIN
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_MODE
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_POW
function for the applyFunctionOverTime 10 base pow routine
|
static java.lang.String |
FUNC_PRCNTL
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_RNG
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_STDEV
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_SUM
function for the applyFunctionOverTime routine
|
static java.lang.String |
FUNC_UPROB
function for the applyFunctionOverTime routine
|
static visad.Real |
NEGATIVE_ONE
negative one
|
static int |
OPT_CYCLIC
cyclic option
|
static int |
OPT_MISSING
missing option
|
static int |
OPT_SYMMETRIC
symmetric option
|
static java.lang.String |
PRCNTL |
Constructor and Description |
---|
GridMath() |
Modifier and Type | Method and Description |
---|---|
static visad.FieldImpl |
add(visad.FieldImpl grid1,
visad.FieldImpl grid2)
Add two grids together
|
static visad.FieldImpl |
add(visad.FieldImpl grid1,
visad.FieldImpl grid2,
boolean useWA)
Add two grids together
|
static visad.FieldImpl |
applyFunctionOverGrid2D(visad.FieldImpl grid,
java.lang.String function,
visad.FieldImpl grid1,
java.lang.String function1,
float percentile)
Evaluate the function of the grid and the function1 to the grid1.
|
static visad.FieldImpl |
applyFunctionOverGrid2D(visad.FieldImpl grid,
java.lang.String function,
java.lang.String statThreshold)
Apply the function to the 2D grid.
|
static visad.FlatField |
applyFunctionOverGrids(visad.FlatField[] grids,
java.lang.String function)
Apply the function to the grids.
|
static visad.FlatField |
applyFunctionOverGrids0(visad.FlatField[] grids,
java.lang.String function) |
static visad.FieldImpl |
applyFunctionOverGridsExt(visad.FieldImpl field,
java.lang.String function) |
static visad.FieldImpl |
applyFunctionOverLevels(visad.FieldImpl grid,
java.lang.String function)
Apply the function to the time steps of the given grid over the levels.
|
static visad.FieldImpl |
applyFunctionOverMembers(visad.FieldImpl grid,
float statThreshold,
float exptdLoBound,
float exptdUpBound,
java.lang.String function)
Apply the function to the ens members of the given grid.
|
static visad.FieldImpl |
applyFunctionOverMembers(visad.FieldImpl grid,
java.lang.String function)
Apply the function to the ens members of the given grid.
|
static visad.FieldImpl |
applyFunctionOverMembers(visad.FieldImpl grid,
java.lang.String statThreshold,
java.lang.String exptdLoBoundIn,
java.lang.String exptdUpBoundIn,
java.lang.String function)
Apply the function to the ens members of the given grid.
|
static visad.FieldImpl |
applyFunctionOverTime(visad.FieldImpl grid,
java.lang.String function,
boolean makeTimes)
Apply the function to the time steps of the given grid.
|
static visad.FieldImpl |
applyFunctionOverTime(visad.FieldImpl grid,
java.lang.String function,
int startIdx,
int idxStride,
boolean makeTimes)
Apply the function to the time steps of the given grid.
|
static visad.FieldImpl |
applyFunctionToAxis(visad.FieldImpl grid,
java.lang.String function,
java.lang.String axis)
Apply the function to the x or y of the given grid at each level.
|
static visad.FieldImpl |
applyFunctionToLevels(visad.FieldImpl grid,
java.lang.String function)
Apply the function to the time steps of the given grid at each level.
|
static visad.FieldImpl |
atan2(visad.FieldImpl grid1,
visad.FieldImpl grid2)
Take the arctangent of two grids
|
static visad.FieldImpl |
atan2(visad.FieldImpl grid1,
visad.FieldImpl grid2,
boolean useWA)
Take the arctangent of two grids
|
static visad.FieldImpl |
averageOverMembers(visad.FieldImpl grid)
Average the grid over member
|
static visad.FieldImpl |
averageOverTime(visad.FieldImpl grid,
boolean makeTimes)
Average the grid at each point over time
|
static visad.FieldImpl |
calculateHelicity(visad.FieldImpl gridu,
visad.FieldImpl gridv,
float bottom,
float top,
float ux,
float vy)
Calculate Helicity to the time steps of the given grid at each level.
|
static float |
calculateL1Norm(float[] vector) |
static float |
calculateL2Norm(float[] vector) |
static visad.FieldImpl |
ddx(visad.FieldImpl grid)
Take the partial derivative with respect to X of the given field.
|
static visad.FieldImpl |
ddy(visad.FieldImpl grid)
Take the partial derivative with respect to Y of the given field.
|
static visad.FieldImpl |
differenceFromBaseTime(visad.FieldImpl grid)
This creates a field where D(T) = D(T)-D(0)
Any time steps up to the offset time are set to missing
|
static visad.FieldImpl |
divide(visad.FieldImpl grid1,
visad.FieldImpl grid2)
Divide two grids
|
static visad.FieldImpl |
divide(visad.FieldImpl grid1,
visad.FieldImpl grid2,
boolean useWA)
Divide two grids
|
static visad.FieldImpl |
ensembleHighestValues(visad.FieldImpl grid)
ensemble grid max values
|
static visad.FieldImpl |
ensembleLowestValues(visad.FieldImpl grid)
ensemble grid min values
|
static visad.FieldImpl |
ensembleModeValues(visad.FieldImpl grid)
ensemble grid min values
|
static visad.FieldImpl |
ensemblePercentileValues(visad.FieldImpl grid,
int percent)
ensemble grid min values
|
static visad.FieldImpl |
ensemblePercentileValues(visad.FieldImpl grid,
java.lang.String percent)
ensemble grid min values
|
static visad.FieldImpl |
ensembleRangeValues(visad.FieldImpl grid)
ensemble grid range values
|
static visad.FieldImpl |
ensembleStandardDeviation(visad.FieldImpl grid)
ensemble Standard Deviation
|
static visad.FieldImpl |
ensembleUProbabilityValues(visad.FieldImpl grid,
java.lang.String logicalOp,
float pValue,
float exptdLoBound,
float exptdUpBound)
ensemble grid univariate probability
|
static visad.FieldImpl |
ensembleUProbabilityValues(visad.FieldImpl grid,
java.lang.String logicalOp,
java.lang.String pValue,
java.lang.String exptdLoBound,
java.lang.String exptdUpBound)
ensemble grid univariate probability
|
static float |
evaluateMode(float[] data)
evaluate mode value
|
static float |
evaluatePercentile(float[][] values,
double p) |
static float |
evaluatePercentile(float[] values,
double p) |
static float |
evaluatePercentile(float[] values,
int begin,
int length,
double p)
evaluate percentile value
|
static float |
evaluateUProbability(float[] values,
float pValue,
int length)
evaluate univariate probability of "variable with n ensemble values" smaller than pValue
code from $NAWIPS/gempak/source/diaglib/de/decprb.c used to make this function.
|
static visad.FieldImpl |
maxOverTime(visad.FieldImpl grid,
boolean makeTimes)
Take the max value at each grid point
|
static visad.FieldImpl |
minOverTime(visad.FieldImpl grid,
boolean makeTimes)
Take the min value at each grid point
|
static visad.FieldImpl |
multiply(visad.FieldImpl grid1,
visad.FieldImpl grid2)
Multiply two grids
|
static visad.FieldImpl |
multiply(visad.FieldImpl grid1,
visad.FieldImpl grid2,
boolean useWA)
Multiply two grids
|
static visad.FieldImpl |
partial(visad.FieldImpl grid) |
static visad.FieldImpl |
partial(visad.FieldImpl grid,
int domainIndex)
Take the partial derivative with respect variable at the domain index.
|
static visad.FlatField |
powerTransformerFF(visad.FlatField grid,
double lambda) |
static visad.FlatField |
quantileTransformerFF(visad.FlatField grid) |
static visad.FieldImpl |
replaceNegativeValue(visad.FieldImpl grid,
float newValue) |
static visad.FieldImpl |
replacePositiveValue(visad.FieldImpl grid,
float newValue) |
static visad.FlatField |
robustScalerFF(visad.FlatField grid) |
static visad.FieldImpl |
standardDeviationOverTime(visad.FieldImpl grid,
boolean makeTimes)
Compute the standard deviation of the grid at each point over time
|
static edu.wisc.ssec.mcidasv.data.hydra.Statistics |
statisticsFF(visad.FlatField grid) |
static visad.FieldImpl |
subtract(visad.FieldImpl grid1,
visad.FieldImpl grid2)
Subtract two grids
|
static visad.FieldImpl |
subtract(visad.FieldImpl grid1,
visad.FieldImpl grid2,
boolean useWA)
Subtract two grids
|
static visad.FieldImpl |
subtractExt(visad.FieldImpl grid,
visad.FieldImpl grid2d)
substractExt subtract a grid2d from each level of the 3d grid
|
static visad.FieldImpl |
sumFromBaseTime(visad.FieldImpl grid)
This creates a field where D(T) = D(0)+D(1)+...+D(T-1)+D(T)
|
static visad.FieldImpl |
sumOverTime(visad.FieldImpl grid,
boolean makeTimes)
Sum each grid point
|
static visad.FieldImpl |
timeRunningAverage(visad.FieldImpl grid,
int nave,
int opt)
Create a running average across the time dimension.
|
static visad.FieldImpl |
timeRunningAverage(visad.FieldImpl grid,
int nave,
int opt,
boolean skipMissing)
Create a running average across the time dimension.
|
static visad.FieldImpl |
timeStepDifference(visad.FieldImpl grid,
int offset)
This creates a field where D(T) = D(T)-D(T+offset)
Any time steps up to the offset time are set to missing
|
static visad.FieldImpl |
timeStepFunc(visad.FieldImpl grid,
int offset,
java.lang.String func)
This creates a field where is either D(T) = D(T)-D(T+offset)
or D(T) = D(T)+D(T+offset) depending on the value of the func argument
Any time steps up to the offset time are set to missing.
|
static visad.FieldImpl |
timeStepSum(visad.FieldImpl grid,
int offset)
This creates a field where D(T) = D(T)+D(T+offset)
Any time steps up to the offset time are set to missing
|
static visad.FieldImpl |
timeWeightedRunningAverage(visad.FieldImpl grid,
float[] wgts,
int opt)
Create a running average across the time dimension.
|
static visad.FieldImpl |
timeWeightedRunningAverage(visad.FieldImpl grid,
float[] wgts,
int opt,
boolean skipMissing)
Create a running average across the time dimension.
|
static float[] |
twoDConvert(float[][] nums) |
public static final java.lang.String FUNC_AVERAGE
public static final java.lang.String FUNC_STDEV
public static final java.lang.String FUNC_PRCNTL
public static final java.lang.String PRCNTL
public static final java.lang.String FUNC_UPROB
public static final java.lang.String FUNC_SUM
public static final java.lang.String FUNC_MAX
public static final java.lang.String FUNC_MIN
public static final java.lang.String FUNC_RNG
public static final java.lang.String FUNC_MODE
public static final java.lang.String FUNC_EXP
public static final java.lang.String FUNC_POW
public static final java.lang.String FUNC_DIFFERENCE
public static final int OPT_CYCLIC
public static final int OPT_MISSING
public static final int OPT_SYMMETRIC
public static final java.lang.String AXIS_X
public static final java.lang.String AXIS_Y
public static final visad.Real NEGATIVE_ONE
public static visad.FieldImpl add(visad.FieldImpl grid1, visad.FieldImpl grid2) throws visad.VisADException
grid1
- first gridgrid2
- second gridvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl add(visad.FieldImpl grid1, visad.FieldImpl grid2, boolean useWA) throws visad.VisADException
grid1
- first gridgrid2
- second griduseWA
- use WEIGHTED_AVERAGE for resamplingvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl subtract(visad.FieldImpl grid1, visad.FieldImpl grid2) throws visad.VisADException
grid1
- first gridgrid2
- second gridvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl subtract(visad.FieldImpl grid1, visad.FieldImpl grid2, boolean useWA) throws visad.VisADException
grid1
- first gridgrid2
- second griduseWA
- true to use weighted averagevisad.VisADException
- problem doing the mathpublic static visad.FieldImpl multiply(visad.FieldImpl grid1, visad.FieldImpl grid2) throws visad.VisADException
grid1
- first gridgrid2
- second gridvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl multiply(visad.FieldImpl grid1, visad.FieldImpl grid2, boolean useWA) throws visad.VisADException
grid1
- first gridgrid2
- second griduseWA
- true to use WEIGHTED_AVERAGEvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl divide(visad.FieldImpl grid1, visad.FieldImpl grid2) throws visad.VisADException
grid1
- first gridgrid2
- second gridvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl divide(visad.FieldImpl grid1, visad.FieldImpl grid2, boolean useWA) throws visad.VisADException
grid1
- first gridgrid2
- second griduseWA
- true to use WEIGHTED_AVERAGEvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl atan2(visad.FieldImpl grid1, visad.FieldImpl grid2) throws visad.VisADException
grid1
- first gridgrid2
- second gridvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl atan2(visad.FieldImpl grid1, visad.FieldImpl grid2, boolean useWA) throws visad.VisADException
grid1
- first gridgrid2
- second griduseWA
- true to use WEIGHTED_AVERAGEvisad.VisADException
- problem doing the mathpublic static visad.FieldImpl averageOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to averagemakeTimes
- If true then make a time field with the range being the same computed value
If false then just return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl standardDeviationOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to compute stdmakeTimes
- If true then make a time field with the range being the same computed value
If false then just return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl averageOverMembers(visad.FieldImpl grid) throws visad.VisADException
grid
- ensemble grid to averagevisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleStandardDeviation(visad.FieldImpl grid) throws visad.VisADException
grid
- ensemble gridvisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleLowestValues(visad.FieldImpl grid) throws visad.VisADException
grid
- ensemble gridvisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleHighestValues(visad.FieldImpl grid) throws visad.VisADException
grid
- ensemble gridvisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleRangeValues(visad.FieldImpl grid) throws visad.VisADException
grid
- ensemble gridvisad.VisADException
- On badnesspublic static visad.FieldImpl ensemblePercentileValues(visad.FieldImpl grid, java.lang.String percent) throws visad.VisADException
grid
- ensemble gridpercent
- the percentvisad.VisADException
- On badnesspublic static visad.FieldImpl ensemblePercentileValues(visad.FieldImpl grid, int percent) throws visad.VisADException
grid
- ensemble gridpercent
- the percentvisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleUProbabilityValues(visad.FieldImpl grid, java.lang.String logicalOp, float pValue, float exptdLoBound, float exptdUpBound) throws visad.VisADException
grid
- ensemble gridlogicalOp
- gt or lt for P(X > | < pValue)pValue
- probability threshold value P(valueAtGridPoint < pValue)exptdLoBound
- expected lo boundexptdUpBound
- expected hi boundvisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleUProbabilityValues(visad.FieldImpl grid, java.lang.String logicalOp, java.lang.String pValue, java.lang.String exptdLoBound, java.lang.String exptdUpBound) throws visad.VisADException
grid
- ensemble gridlogicalOp
- gt or lt for P(X > | < pValue)pValue
- probability threshold value P(valueAtGridPoint < pValue)exptdLoBound
- expected lo boundexptdUpBound
- expected hi boundvisad.VisADException
- On badnesspublic static visad.FieldImpl ensembleModeValues(visad.FieldImpl grid) throws visad.VisADException
grid
- ensemble gridvisad.VisADException
- On badnesspublic static visad.FieldImpl timeStepDifference(visad.FieldImpl grid, int offset) throws visad.VisADException
grid
- grid to averageoffset
- time step offset. e.g., offset=-1 results in D(T)=D(T)-D(T-1)visad.VisADException
- On badnesspublic static visad.FieldImpl timeStepSum(visad.FieldImpl grid, int offset) throws visad.VisADException
grid
- grid to averageoffset
- time step offset. e.g., offset=-1 results in D(T)=D(T)+D(T-1)visad.VisADException
- On badnesspublic static visad.FieldImpl differenceFromBaseTime(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to averagevisad.VisADException
- On badnesspublic static visad.FieldImpl sumFromBaseTime(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to sumvisad.VisADException
- On badnesspublic static visad.FieldImpl timeStepFunc(visad.FieldImpl grid, int offset, java.lang.String func) throws visad.VisADException
grid
- grid to averageoffset
- time step offset.func
- which function to apply, SUM or DIFFERENCEvisad.VisADException
- On badnesspublic static visad.FieldImpl timeWeightedRunningAverage(visad.FieldImpl grid, float[] wgts, int opt) throws visad.VisADException
grid
- grid to averagewgts
- weights per step (usually odd and add to 1)opt
- options for end points
N = {last point in the series} xi = {input series} xo = {output series} nwgt = {number of wgts} opt < 0 : utilize cyclic conditions e.g., nwgt = 2 xo(0) = w(0) * xi(0) + w(1) * xi(1) xo(N) = w(0) * xi(N) + w(1) * xi(0) e.g., nwgt = 3 xo(0) = w(0) * xi(N) + w(1) * xi(0) + w(2) * xi(1) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(0) e.g., nwgt = 4 xo(0) = w(0) * xi(N) + w(1) * xi(0) + w(2) * xi(1) + w(3) * xi(2) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(1) + w(3) * xi(2) opt = 0 : set unsmoothed beginning and end pts to x@_FillValue (most common) e.g., nwgt = 2 xo(0) = w(0) * xi(0) + w(1) * xi(1) xo(N) = xi@_FillValue e.g., nwgt = 3 xo(0) = xi@_FillValue xo(1) = w(0) * xi(0) + w(1) * xi(1) + w(2) * xi(2) xi(N) = xi@_FillValue e.g., nwgt = 4 xo(0) = xi@_FillValue xo(1) = w(0) * xi(0) + w(1) * xi(1) + w(2) * xi(2) + w(3) * xi(3) xo(N - 2) = w(0) * xi(N - 3) + w(1) * xi(N - 2) + w(2) * xi(N - 1) + w(3) * xi(N) xo(N - 1) = xi@_FillValue xo(N) = xi@_FillValue opt > 0 : utilize reflective (symmetric) conditions e.g., nwgt = 2 xo(0) = w(0) * xi(0) + w(1) * xi(1) xo(N) = w(0) * xi(N) + w(0) * xi(0) e.g., nwgt = 3 xo(0) = w(0) * xi(1) + w(1) * xi(0) + w(2) * xi(1) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(N - 1) e.g., nwgt = 4 xo(0) = w(0) * xi(1) + w(1) * xi(0) + w(2) * xi(1) + w(3) * xi(2) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(0) + w(3) * xi(2)
visad.VisADException
- On badnesspublic static visad.FieldImpl timeWeightedRunningAverage(visad.FieldImpl grid, float[] wgts, int opt, boolean skipMissing) throws visad.VisADException
grid
- grid to averagewgts
- weights per step (usually odd and add to 1)opt
- options for end points
N = {last point in the series} xi = {input series} xo = {output series} nwgt = {number of wgts} opt < 0 : utilize cyclic conditions e.g., nwgt = 2 xo(0) = w(0) * xi(0) + w(1) * xi(1) xo(N) = w(0) * xi(N) + w(1) * xi(0) e.g., nwgt = 3 xo(0) = w(0) * xi(N) + w(1) * xi(0) + w(2) * xi(1) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(0) e.g., nwgt = 4 xo(0) = w(0) * xi(N) + w(1) * xi(0) + w(2) * xi(1) + w(3) * xi(2) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(1) + w(3) * xi(2) opt = 0 : set unsmoothed beginning and end pts to x@_FillValue (most common) e.g., nwgt = 2 xo(0) = w(0) * xi(0) + w(1) * xi(1) xo(N) = xi@_FillValue e.g., nwgt = 3 xo(0) = xi@_FillValue xo(1) = w(0) * xi(0) + w(1) * xi(1) + w(2) * xi(2) xi(N) = xi@_FillValue e.g., nwgt = 4 xo(0) = xi@_FillValue xo(1) = w(0) * xi(0) + w(1) * xi(1) + w(2) * xi(2) + w(3) * xi(3) xo(N - 2) = w(0) * xi(N - 3) + w(1) * xi(N - 2) + w(2) * xi(N - 1) + w(3) * xi(N) xo(N - 1) = xi@_FillValue xo(N) = xi@_FillValue opt > 0 : utilize reflective (symmetric) conditions e.g., nwgt = 2 xo(0) = w(0) * xi(0) + w(1) * xi(1) xo(N) = w(0) * xi(N) + w(0) * xi(0) e.g., nwgt = 3 xo(0) = w(0) * xi(1) + w(1) * xi(0) + w(2) * xi(1) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(N - 1) e.g., nwgt = 4 xo(0) = w(0) * xi(1) + w(1) * xi(0) + w(2) * xi(1) + w(3) * xi(2) xo(N) = w(0) * xi(N - 1) + w(1) * xi(N) + w(2) * xi(0) + w(3) * xi(2)
skipMissing
- if true, missing timesteps will not be included in the average
and the average will be done on the non-missing timesvisad.VisADException
- On badnesspublic static visad.FieldImpl timeRunningAverage(visad.FieldImpl grid, int nave, int opt) throws visad.VisADException
grid
- grid to averagenave
- number of steps to averageopt
- options for end points
In the following: N = {last point in the series, i.e. N = npts - 1} xi = {input series} xo = {output series} opt < 0 : utilize cyclic conditions e.g., nave = 2 xo(0) = (xi(0) + xi(1))/nave xo(N) = (xi(N) + xi(0))/nave e.g., nave = 3 xo(0) = (xi(N) + xi(0) + xi(1)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(0)) / nave e.g., nave = 4 xo(0) = (xi(N) + xi(0) + xi(1) + xi(2)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(0) + xi(1)) / nave opt = 0 : set unsmoothed beginning and end pts to x@_FillValue [most common] e.g., nave = 2 xo(0) = (xi(0) + xi(1)) / nave xo(N) = xi@_FillValue e.g., nave = 3 xo(0) = xi@_FillValue xo(1) = (xi(0) + xi(1) + xi(2)) / nave xi(N) = xi@_FillValue e.g., nave = 4 xo(0) = xi@_FillValue xo(1) = (xi(0) + xi(1) + xi(2) + xi(3)) / nave xo(N - 2) = (xi(N - 3) + xi(N - 2) + xi(N - 1) + xi(N)) / nave xo(N - 1)= xi@_FillValue xo(N)= xi@_FillValue opt > 0 : utilize reflective (symmetric) conditions e.g., nave = 2 xo(0) = (xi(0) + xi(1)) / nave xo(N) = (xi(N) + xi(N-1)) / nave e.g., nave = 3 xo(0) = (xi(1) + xi(0) + xi(1)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(N-1)) / nave e.g., nave = 4 xo(0) = (xi(2) + xi(1) + xi(0) + xi(1)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(N - 1) + xi(N - 2)) / nave
visad.VisADException
- On badnesspublic static visad.FieldImpl timeRunningAverage(visad.FieldImpl grid, int nave, int opt, boolean skipMissing) throws visad.VisADException
grid
- grid to averagenave
- number of steps to averageopt
- options for end points
In the following: N = {last point in the series, i.e. N = npts - 1} xi = {input series} xo = {output series} opt < 0 : utilize cyclic conditions e.g., nave = 2 xo(0) = (xi(0) + xi(1))/nave xo(N) = (xi(N) + xi(0))/nave e.g., nave = 3 xo(0) = (xi(N) + xi(0) + xi(1)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(0)) / nave e.g., nave = 4 xo(0) = (xi(N) + xi(0) + xi(1) + xi(2)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(0) + xi(1)) / nave opt = 0 : set unsmoothed beginning and end pts to x@_FillValue [most common] e.g., nave = 2 xo(0) = (xi(0) + xi(1)) / nave xo(N) = xi@_FillValue e.g., nave = 3 xo(0) = xi@_FillValue xo(1) = (xi(0) + xi(1) + xi(2)) / nave xi(N) = xi@_FillValue e.g., nave = 4 xo(0) = xi@_FillValue xo(1) = (xi(0) + xi(1) + xi(2) + xi(3)) / nave xo(N - 2) = (xi(N - 3) + xi(N - 2) + xi(N - 1) + xi(N)) / nave xo(N - 1)= xi@_FillValue xo(N)= xi@_FillValue opt > 0 : utilize reflective (symmetric) conditions e.g., nave = 2 xo(0) = (xi(0) + xi(1)) / nave xo(N) = (xi(N) + xi(N-1)) / nave e.g., nave = 3 xo(0) = (xi(1) + xi(0) + xi(1)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(N-1)) / nave e.g., nave = 4 xo(0) = (xi(2) + xi(1) + xi(0) + xi(1)) / nave xo(N) = (xi(N - 1) + xi(N) + xi(N - 1) + xi(N - 2)) / nave
skipMissing
- if true, missing timesteps will not be included in the average
and the average will be done on the non-missing timesvisad.VisADException
- On badnesspublic static visad.FieldImpl sumOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to analyzemakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl minOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to analyzemakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl maxOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to analyzemakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverTime(visad.FieldImpl grid, java.lang.String function, boolean makeTimes) throws visad.VisADException
grid
- grid to averagefunction
- One of the FUNC_ enumsmakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverTime(visad.FieldImpl grid, java.lang.String function, int startIdx, int idxStride, boolean makeTimes) throws visad.VisADException
grid
- grid to apply function tofunction
- One of the FUNC_ enumsstartIdx
- starting time indexidxStride
- stride for time indexmakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FlatField applyFunctionOverGrids(visad.FlatField[] grids, java.lang.String function) throws visad.VisADException
grids
- grids to apply function tofunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FlatField applyFunctionOverGrids0(visad.FlatField[] grids, java.lang.String function) throws visad.VisADException
visad.VisADException
public static visad.FieldImpl applyFunctionOverMembers(visad.FieldImpl grid, java.lang.String statThreshold, java.lang.String exptdLoBoundIn, java.lang.String exptdUpBoundIn, java.lang.String function) throws visad.VisADException
grid
- grid to averagestatThreshold
- percent for FUNC_PRCNTL, probability threshold for FUNC_UPROBexptdLoBoundIn
- expected lo boundexptdUpBoundIn
- expected hi boundfunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverMembers(visad.FieldImpl grid, float statThreshold, float exptdLoBound, float exptdUpBound, java.lang.String function) throws visad.VisADException
grid
- grid to averagestatThreshold
- percent for FUNC_PRCNTL, probability threshold for FUNC_UPROBexptdLoBound
- expected lo boundexptdUpBound
- expected hi boundfunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverMembers(visad.FieldImpl grid, java.lang.String function) throws visad.VisADException
grid
- grid to averagefunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverLevels(visad.FieldImpl grid, java.lang.String function) throws visad.VisADException
grid
- grid to averagefunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverGrid2D(visad.FieldImpl grid, java.lang.String function, java.lang.String statThreshold) throws visad.VisADException
grid
- grid to averagestatThreshold
- percent for FUNC_PRCNTL, probability threshold for FUNC_UPROBfunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverGrid2D(visad.FieldImpl grid, java.lang.String function, visad.FieldImpl grid1, java.lang.String function1, float percentile) throws visad.VisADException
grid
- 2d grid to apply function (max, min, average)grid1
- 2d grid to apply function1 (percentile)function
- One of the FUNC_ enumsfunction1
- another function namevisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionToLevels(visad.FieldImpl grid, java.lang.String function) throws visad.VisADException
grid
- grid to averagefunction
- One of the FUNC_ enumsvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionToAxis(visad.FieldImpl grid, java.lang.String function, java.lang.String axis) throws visad.VisADException
grid
- grid to applyfunction
- One of the FUNC_ enumerationsaxis
- the axis to apply the function (AXIS_X or AXIS_Y)visad.VisADException
- On badnesspublic static visad.FieldImpl ddx(visad.FieldImpl grid) throws visad.VisADException, java.rmi.RemoteException
grid
- grid to parializejava.rmi.RemoteException
- Java RMI errorvisad.VisADException
- VisAD Errorpublic static visad.FieldImpl ddy(visad.FieldImpl grid) throws visad.VisADException, java.rmi.RemoteException
grid
- grid to parializejava.rmi.RemoteException
- Java RMI errorvisad.VisADException
- VisAD Errorpublic static visad.FieldImpl partial(visad.FieldImpl grid, int domainIndex) throws visad.VisADException, java.rmi.RemoteException
grid
- grid to parializedomainIndex
- index of variable to use for derivativejava.rmi.RemoteException
- Java RMI errorvisad.VisADException
- VisAD Errorpublic static visad.FieldImpl partial(visad.FieldImpl grid) throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
java.rmi.RemoteException
public static float evaluatePercentile(float[] values, int begin, int length, double p) throws visad.VisADException
values
- the valuesbegin
- the starting indexlength
- number of pointsp
- the percentagevisad.VisADException
- VisAD Errorpublic static float evaluatePercentile(float[][] values, double p) throws visad.VisADException
visad.VisADException
public static float evaluatePercentile(float[] values, double p) throws visad.VisADException
visad.VisADException
public static float[] twoDConvert(float[][] nums)
public static float evaluateMode(float[] data)
data
- the datapublic static float evaluateUProbability(float[] values, float pValue, int length) throws visad.VisADException
values
- the values, within the userspecified range, at a given grid point
from an ensemble model runpValue
- the threshold used in the probability calculation - P(value smaller than pValue)length
- number of ensemble members (might not be the same as values.length)visad.VisADException
- VisAD Errorpublic static visad.FieldImpl applyFunctionOverGridsExt(visad.FieldImpl field, java.lang.String function) throws visad.VisADException
visad.VisADException
public static visad.FieldImpl calculateHelicity(visad.FieldImpl gridu, visad.FieldImpl gridv, float bottom, float top, float ux, float vy) throws visad.VisADException
gridu
- u component gridgridv
- v component gridbottom
- in metertop
- in meterux
- average u windvy
- average v windvisad.VisADException
- On badnesspublic static visad.FieldImpl subtractExt(visad.FieldImpl grid, visad.FieldImpl grid2d) throws visad.VisADException, java.rmi.RemoteException
grid
- 3d gridgrid2d
- 2d gridvisad.VisADException
- On badnessjava.rmi.RemoteException
- for badpublic static visad.FieldImpl replaceNegativeValue(visad.FieldImpl grid, float newValue) throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
java.rmi.RemoteException
public static visad.FieldImpl replacePositiveValue(visad.FieldImpl grid, float newValue) throws visad.VisADException, java.rmi.RemoteException
visad.VisADException
java.rmi.RemoteException
public static edu.wisc.ssec.mcidasv.data.hydra.Statistics statisticsFF(visad.FlatField grid) throws visad.VisADException
visad.VisADException
public static visad.FlatField quantileTransformerFF(visad.FlatField grid) throws visad.VisADException
visad.VisADException
public static visad.FlatField powerTransformerFF(visad.FlatField grid, double lambda) throws visad.VisADException
visad.VisADException
public static visad.FlatField robustScalerFF(visad.FlatField grid) throws visad.VisADException
visad.VisADException
public static float calculateL2Norm(float[] vector)
public static float calculateL1Norm(float[] vector)