R: Methods to report the locations or scales associated with the...

LKrigLatticeCenters

R Documentation

Methods to report the locations or scales associated with the lattice points.

Description

These method takes the lattice information for a particular geometry
from an LKinfo object and finds the locations or scales at each lattice points.
These locations are the
"nodes" or centers of the basis functions. The "scales" scales that distance function when the
basis functions are evaluated and combine the spacing of lattice and the specificed overlap.

Usage

LKrigLatticeCenters(object, ...)
## Default S3 method:
LKrigLatticeCenters(object, ...)
## S3 method for class 'LKInterval'
LKrigLatticeCenters(object, Level, ...)
## S3 method for class 'LKRectangle'
LKrigLatticeCenters(object, Level, ...)
## S3 method for class 'LKBox'
LKrigLatticeCenters(object, Level, ...)
## S3 method for class 'LKCylinder'
LKrigLatticeCenters(object, Level = 1, physicalCoordinates = FALSE, ...)
## S3 method for class 'LKRing'
LKrigLatticeCenters(object, Level = 1, physicalCoordinates = FALSE, ...)
LKrigLatticeScales(object, ...)
## Default S3 method:
LKrigLatticeScales(object, ...)

Arguments

object

An LKinfo object.

Level

The multiresolution level.

physicalCoordinates

If TRUE the centers are returned in the
untransformed scale. See the explanation of the
V matrix in LKrigSetup. This is useful to relate the lattice points to
other physical components of the problem.

For example with the LKRing geometry
representing the equatorial slice of the solar atmosphere one observes a line of
sight integral through the domain. This integral is obvious found with respect to the physical coordinates and not the lattice points.

...

Any additional arguments for this method.

Details

This method is of course geometry dependent and the default version just
gives an error warning that a version based on the geometry is required.
Typically generating these lattice points from the information in LKinfo
should be easy as the grid points are already determined.

The scales reported are in the simplest form delta*overlap where delta is a
vector of the lattice spacings and overlap (default is 2.5) is the amount of
overlap between basis functions.

See the source for the function LKrig.basis for how each of these
is used to evaluate the basis functions.

Value

Centers A matrix where the rows index the points and columns index dimension.
In the case of the LKRectangle geometry attribute is added to indicate the
grid points used to generate the lattice.

Scales The default method returns the vector delta*offset with length being the
number of multiresolution levels.

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LatticeKrig)
Loading required package: spam
Loading required package: grid
Spam version 1.3-0 (2015-10-24) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: 'spam'
The following objects are masked from 'package:base':
backsolve, forwardsolve
Loading required package: fields
Loading required package: maps
# maps v3.1: updated 'world': all lakes moved to separate new #
# 'lakes' database. Type '?world' or 'news(package="maps")'. #
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LatticeKrig/LKrigLatticeCenters.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LKrigLatticeCenters
> ### Title: Methods to report the locations or scales associated with the
> ### lattice points.
> ### Aliases: LKrigLatticeCenters LKrigLatticeCenters.default
> ### LKrigLatticeScales LKrigLatticeScales.default
> ### LKrigLatticeCenters.LKBox LKrigLatticeCenters.LKInterval
> ### LKrigLatticeCenters.LKRectangle LKrigLatticeCenters.LKRing
> ### LKrigLatticeCenters.LKCylinder
> ### Keywords: spatial
>
> ### ** Examples
>
> x<- cbind( c(-1,2), c(-1,2))
> LKinfo<- LKrigSetup( x, alpha=c( 1,.2,.01),
+ nlevel=3, a.wght=4.5, NC= 10)
> # lattice centers for the second level
> # not points added for buffer outside of spatial domain
> look<- LKrigLatticeCenters(LKinfo, Level=2)
> # convert grid format (gridList) to just locations
> look<- make.surface.grid( look)
> plot( look, cex=.5)
> rect( -1,-1,2,2, border="red4")
>
> x<- cbind( c(0, 360), c( 1,3))
> LKinfo<- LKrigSetup( x, LKGeometry="LKRing",
+ nlevel=1, a.wght=4.5, NC= 10, V= diag(c( 1,.01) ) )
>
> polar2xy<- function(x){
+ x[,2]*cbind( cos(pi*x[,1]/180), sin(pi*x[,1]/180))}
>
> look1<- LKrigLatticeCenters( LKinfo, Level=1)
> look2<- LKrigLatticeCenters( LKinfo, Level=1, physicalCoordinates=TRUE )
> look3<- polar2xy( look2$Locations )
> # Basis scales:
> LKrigLatticeScales( LKinfo)
[1] 81.81818
>
> set.panel(3,1)
plot window will lay out plots in a 3 by 1 matrix
> plot( make.surface.grid( look1))
> plot( look2$Locations)
> plot( look3)
>
>
>
>
>
>
>
> dev.off()
null device
1
>