# NOT RUN {
# }
# NOT RUN {
x <- y <- matrix(0, 100, 100)
x[2:3,c(3:6, 8:10)] <- 1
y[c(4:7, 9:10),c(7:9, 11:12)] <- 1
x[30:50,45:65] <- 1
y[c(22:24, 99:100),c(50:52, 99:100)] <- 1
hold <- make.SpatialVx( x, y, field.type = "contrived", units = "none",
data.name = "Example", obs.name = "x", model.name = "y" )
look <- FeatureFinder(hold, smoothpar=0.5)
par( mfrow=c(1,2))
image.plot(look$X.labeled)
image.plot(look$Y.labeled)
look2 <- centmatch(look)
FeatureTable(look2)
look3 <- deltamm( look, N = 201, verbose = TRUE )
FeatureTable( look3 )
data( "pert000" )
data( "pert004" )
data( "ICPg240Locs" )
hold <- make.SpatialVx( pert000, pert004,
loc = ICPg240Locs, projection = TRUE, map = TRUE, loc.byrow = TRUE,
field.type = "Precipitation", units = "mm/h",
data.name = "ICP Perturbed Cases", obs.name = "pert000",
model.name = "pert004" )
look <- FeatureFinder(hold, smoothpar=10.5, thresh = 5)
plot(look)
look2 <- deltamm( look, N = 701, verbose = TRUE )
look2 <- MergeForce( look2 )
plot(look2)
summary( look2 )
# Now remove smallest features ( those with fewer than 700 grid squares).
look <- FeatureFinder( hold, smoothpar = 10.5, thresh = 5, min.size = 700 )
look # Now only two features.
plot( look )
# Now remove the largest features (those with more than 1000 grid squares).
look <- FeatureFinder( hold, smoothpar = 10.5, thresh = 5, max.size = 1000 )
look
plot( look )
# Remove any features smaller than 700 and larger than 2000 grid squares).
look <- FeatureFinder( hold, smoothpar = 10.5, thresh = 5,
min.size = 700, max.size = 2000 )
look
plot( look )
# Find features according to Wernli et al. (2008).
look <- FeatureFinder( hold, thresh = 5, do.smooth = FALSE, fac = 1 / 15 )
look
plot( look )
# Now do a mix of the two types of methods.
look <- FeatureFinder( hold, smoothpar = 10.5, thresh = 5, fac = 1 / 15 )
look
plot( look )
# }
Run the code above in your browser using DataLab