Learn R Programming

LatticeKrig (version 9.3.0)

LKrigLatticeCenters: 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 specified overlap.

Usage

LKrigLatticeCenters(object, ...)
# S3 method for default
LKrigLatticeCenters(object, ...)
# S3 method for LKInterval
LKrigLatticeCenters(object, Level, ...)
# S3 method for LKRectangle
LKrigLatticeCenters(object, Level, ...)
# S3 method for LKBox
LKrigLatticeCenters(object, Level, ...)
# S3 method for LKCylinder
LKrigLatticeCenters(object, Level = 1, physicalCoordinates = FALSE, ...)
# S3 method for LKRing
LKrigLatticeCenters(object, Level = 1, 
                    physicalCoordinates = FALSE, ...)
# S3 method for LKSphere
LKrigLatticeCenters(object, Level, ...)
# S3 method for default
LKrigLatticeScales(object, ...)
LKrigLatticeScales(object, ...)

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. For LKSphere the centers are in lon/lat degrees. ( Use directionCosines to convert to 3-d coordinates from lon/lat.)

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

Arguments

object

An LKinfo object.

Level

The multi-resolution 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.

Author

Doug Nychka

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.

See Also

LKrig.basis LKrigSetup, LKrigSetupAwght, LKrigSAR, LKrig

Examples

Run this code
  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)
    
    set.panel(3,1)
    plot( make.surface.grid( look1))
    plot( look2$Locations)
    plot( look3)

                 

Run the code above in your browser using DataLab