Learn R Programming

SpatialVx (version 1.0-2)

saller: Feature-based Analysis of a Field (Image)

Description

Feature-based analysis of a field (image)

Usage

saller(x, d = NULL, distfun = "rdist", ...)

# S3 method for saller print(x, ...)

# S3 method for saller summary(object, ...)

Value

saller returns a list with components:

A

numeric giving the amplitude component.

L

numeric giving the lcoation component.

S

numeric giving the structure component.

L1,L2

numeric giving the values that sum together to give L.

L1.alt, L.alt

numeric giving an alternative L1 component, and subsequently alternative L where it is calculated using the centroid of the field containing only defined features rather than the original raw field.

print invisibly returns a named vector with S, A and L.

summary does not return anything.

Arguments

x

saller: x is a list object returned by FeatureFinder or other feature identification function that returns a list with components X.feats, Y.feats (themselves lists with owin class objects defining separate features in the verification and forecast fields, resp.), and X.labeled, Y.labeled (fields with the numbers from 0 to the number of features also defining the separate feature locations (e.g., as returned by the connected function of package spatstat.

print: list object returned by saller.

object

summary: object the returned by saller.

d

(optional) the SAL (saller) method requires division by the longest distance between two border points. If NULL, this is taken to be simply the length of the longest side.

distfun

Function with which to calculate centroid distances. Default uses straight Euclidean. To do great-circle distance, use rdist.earth and be sure that object has a loc attribute with lon/lat coordinates.

...

Optional arguments to distfun. Not used by print or summary.

Author

Eric Gilleland

Details

saller: Computes S, A, and L of the SAL method introduced by Wernli et al. (2008).

References

Wernli, H., Paulat, M., Hagen, M. and Frei, C. (2008) SAL--A novel quality measure for the verification of quantitative precipitation forecasts. Mon. Wea. Rev., 136, 4470--4487, doi:10.1175/2008MWR2415.1.

See Also

centroid.owin, connected, tiles, tess, deltamm, make.SpatialVx

Examples

Run this code

data( "ExampleSpatialVxSet" )

x <- ExampleSpatialVxSet$vx
xhat <- ExampleSpatialVxSet$fcst

q <- mean( c(c(x[x>0]),c(xhat[xhat>0])), na.rm=TRUE)

hold <- make.SpatialVx( x, xhat, field.type="contrived", units="none",
    data.name = "Example", obs.name = "x", model.name = "xhat" )

hold2 <- FeatureFinder(hold, smoothpar=5, thresh=q)
if (FALSE) plot(hold2)

look <- saller(hold2)   
summary(look)


Run the code above in your browser using DataLab