.packageName <- "fields"
"BD" <-
structure(list(KCl = c(30, 30, 20, 50, 25, 10, 40, 15, 50, 10, 
20, 45, 50, 35, 40, 35, 30, 15, 40, 30, 10, 50, 20, 10, 25, 45, 
30, 25, 45, 10, 45, 10, 30, 30, 20, 50, 10, 40, 15, 20, 45, 50, 
35, 35, 30, 15, 30, 10, 50, 20, 25, 45, 30, 25, 45, 10, 45, 10, 
30, 30, 25, 50, 10, 40, 40, 15, 35, 15, 10, 40, 10, 25, 35, 35, 
30, 25, 45, 50, 40, 20, 50, 30, 15, 10, 50, 15, 25, 45, 40), 
    MgCl2 = c(5, 5, 4, 7, 7, 4, 4, 6, 6, 7, 4, 7, 5, 6, 5, 7, 
    7, 6, 3, 4, 4, 4, 3, 3, 3, 4, 6, 3, 6, 5, 3, 6, 5, 5, 4, 
    7, 4, 4, 6, 4, 7, 5, 6, 7, 7, 6, 4, 4, 4, 3, 3, 4, 6, 3, 
    6, 5, 3, 6, 5, 5, 7, 6, 7, 5, 3, 6, 3, 5, 6, 6, 7, 7, 7, 
    5, 4, 6, 5, 6, 3, 7, 7, 4, 3, 4, 3, 3, 4, 4, 7), KPO4 = c(25, 
    25, 20, 20, 30, 25, 20, 45, 35, 25, 40, 30, 45, 20, 40, 45, 
    40, 25, 35, 45, 30, 40, 30, 20, 45, 30, 30, 35, 20, 40, 40, 
    35, 25, 25, 20, 20, 25, 20, 45, 40, 30, 45, 20, 45, 40, 25, 
    45, 30, 40, 30, 45, 30, 30, 35, 20, 40, 40, 35, 25, 25, 30, 
    35, 25, 40, 35, 40, 25, 20, 45, 25, 20, 35, 40, 30, 35, 40, 
    35, 30, 45, 40, 25, 20, 30, 45, 40, 30, 25, 25, 25), dNTP = c(625, 
    625, 1500, 250, 1500, 1250, 1250, 1250, 1500, 1250, 250, 
    1250, 1000, 1000, 1500, 750, 1000, 250, 250, 1500, 1000, 
    750, 750, 500, 500, 500, 250, 1000, 500, 500, 1250, 750, 
    625, 625, 1500, 250, 1250, 1250, 1250, 250, 1250, 1000, 1000, 
    750, 1000, 250, 1500, 1000, 750, 750, 500, 500, 250, 1000, 
    500, 500, 1250, 750, 625, 625, 1500, 1500, 1250, 1500, 250, 
    1500, 1500, 750, 250, 1500, 750, 1250, 500, 1250, 1250, 1000, 
    250, 500, 1000, 750, 1000, 250, 500, 1250, 750, 1000, 500, 
    750, 500), lnya = c(12.904207, 12.672946, 9.172639, 9.86786, 
    9.87817, 6.423247, 6.131226, 6.011267, 8.44247, 12.072541, 
    11.252859, 9.088173, 10.089967, 13.946539, 8.985946, 9.197255, 
    9.786954, 6.398595, 8.051978, 4.969813, 5.609472, 4.94876, 
    5.874931, 6.50279, 6.811244, 9.69892, 10.348173, 8.101678, 
    11.703546, 13.745088, 8.830543, 11.643954, 13.034624, 12.479909, 
    8.166216, 9.711116, 8.665613, 7.659171, 7.992945, 11.140411, 
    9.588777, 8.074026, 13.478638, 10.410305, 10.817776, 7.575585, 
    7.021084, 7.912057, 6.44254, 6.042633, 7.130899, 9.680344, 
    8.318742, 7.654443, 9.595603, 12.456831, 8.064636, 11.060369, 
    12.128111, 13.191889, 9.268609, 8.273847, 12.441145, 8.958025, 
    8.538955, 7.886081, 8.422883, 8.565983, 11.342137, 8.457443, 
    8.38936, 10.606585, 11.3679, 8.665613, 8.773385, 9.384294, 
    9.78132, 12.25009, 9.510445, 13.311329, 11.14331, 9.441452, 
    9.056023, 8.846497, 8.76873, 9.130214, 12.657148, 9.239899, 
    10.210972)), .Names = c("KCl", "MgCl2", "KPO4", "dNTP", "lnya"
), class = "data.frame", row.names = c("1", "2", "3", "4", "5", 
"6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", 
"17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", 
"28", "29", "30", "31", "32", "33", "34", "35", "36", "38", "39", 
"40", "43", "44", "45", "46", "48", "49", "50", "52", "53", "54", 
"55", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", 
"67", "68", "69", "70", "71", "72", "73", "75", "76", "77", "78", 
"79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", 
"90", "91", "92", "93", "94", "95", "96"))
"COR" <-
function (dat) 
{
    m <- ncol(dat)
    M <- nrow(dat)
    ntemp <- !is.na(dat)
    ntemp <- t(ntemp) %*% (ntemp)
    hold.mean <- apply(dat, 2, "mean", na.rm = TRUE)
    temp <- (dat - matrix(c(hold.mean), ncol = m, byrow = TRUE, 
        nrow = M))
    temp[is.na(temp)] <- 0
    temp <- ifelse(ntemp > 1, t(temp) %*% (temp)/(ntemp - 1), 
        NA)
    sd <- sqrt(diag(temp))
    list(cor = t(t(temp)/sd)/sd, N = ntemp, sd = sd, mean = hold.mean)
}
"D4transform.image" <-
function (x, inv = FALSE, transpose = FALSE, cut.min = 8) 
{
    if (transpose) 
        inv <- !inv
    n <- dim(x)[1]
    m <- dim(x)[2]
    if (n > m) {
        flip <- TRUE
        temp <- t(x)
        n <- dim(temp)[1]
        m <- dim(temp)[2]
    }
    else {
        flip <- FALSE
        temp <- x
    }
    if (n > m) 
        stop(" number of columns of x must >= to number of\nrows")
    nn <- n
    mm <- m
    if (!inv) {
        while (nn > cut.min) {
            temp[1:nn, 1:mm] <- WD42d(temp[1:nn, 1:mm])
            nn <- nn/2
            mm <- mm/2
        }
    }
    if (inv) {
        NN <- n
        MM <- m
        while (NN > cut.min) {
            NN <- NN/2
            MM <- MM/2
        }
        nn <- NN * 2
        mm <- MM * 2
        while (nn <= n) {
            temp[1:nn, 1:mm] <- WD42di(temp[1:nn, 1:mm])
            nn <- nn * 2
            mm <- mm * 2
        }
    }
    if (flip) {
        return(t(temp))
    }
    else {
        return(temp)
    }
}
"FIELDS.version" <-
c("Fields version 5.5  Copyright 1999, 2000, 2001, 2002, 2003", "Douglas Nychka, Wendy Meiring, J. Andrew Royle, Eric Gilleland, and Montserrat Fuentes", 
" ", "Aug 18 2003")
"Krig" <-
function(x, Y, cov.function = "exp.cov", lambda = NA, df = NA, cost = 1., knots,
	weights = rep(1., length(Y)), m = 2., return.matrices = TRUE, nstep.cv = 
	80., scale.type = "user", x.center = rep(0., ncol(x)), x.scale = rep(
	1., ncol(x)), rho = NA, sigma2 = NA, method = "GCV", decomp = "DR",
	verbose = FALSE, cond.number = 10.^8., mean.obj = NULL, sd.obj = NULL,
	yname = NULL, return.X = TRUE, null.function = make.tmatrix, offset = 0.,
	outputcall = NULL, cov.args = NULL, ...)
{
	# Here is the ouput list for this function
	out <- list()
	class(out) <- c("Krig")
	if(!is.character(cov.function)) {
		if(is.function(cov.function))
			cov.function <- as.character(substitute(cov.function))
	}
		out$call.name <- cov.function
	if(is.null(outputcall)) {
		out$call <- match.call()
	}
	else {
		out$call <- outputcall
	}
	N <- length(Y)
	#
	#
	if(sum(is.na(Y)) != 0.) {
		stop("Need to remove missing values\n from Y vector!")
	}
	# name of Y data
	# length of Y data
	if(is.null(yname)) out$yname <- deparse(substitute(Y)) else out$yname <-
			yname
	out$N <- N
	out$decomp <- decomp
	#
	out$make.tmatrix <- null.function
	###
	out$offset <- offset
	out$cost <- cost
		# -- covariance  parameters are passed separately into
		# -- the out list.  They will be stored in out$args
		if(!is.null(cov.args)) out$args <- cov.args else out$args <-
				list(...)
		if(verbose) {
			cat(" Local cov function arguments ", fill = TRUE)
			print(out$args)
			cat(" covariance function used is : ", fill = TRUE)
			print(out$call.name)
		}
	#
	# make sure that the columns of x have names
	#
	# add row and col names if they are missing.
	# 
	x <- as.matrix(x)
	if(length(dimnames(x)) != 2.) {
		dimnames(x) <- list(format(1.:nrow(x)), paste("X", format(
			1.:ncol(x)), sep = ""))
	}
	if(length(dimnames(x)[[1.]]) == 0.) {
		dimnames(x)[[1.]] <- format(1.:nrow(x))
	}
	#
	#
	#
	if(length(dimnames(x)[[2.]]) == 0.) {
		dimnames(x)[[2.]] <- paste("X", format(1.:ncol(x)), sep = "")
	}
	Y <- c(Y)
	out$y <- Y
	out$x <- x
	if(!is.null(sd.obj) & !is.null(mean.obj)) {
		correlation.model <- TRUE
	}
	else correlation.model <- FALSE
	out$correlation.model <- correlation.model
	#
	#
	#
	if(correlation.model) {
		Yraw <- Y
		out$mean.obj <- mean.obj
		out$sd.obj <- sd.obj
		Y <- (Y - predict(mean.obj, x))/predict(sd.obj, x)
		if(verbose)
			print(Y)
	}
	#
	## find duplicate rows of the X matrix 
	## first find integer tags to indicate replications
	out$weights <- weights
	rep.info <- cat.matrix(x)
	out$rep.info <- rep.info
	if(verbose) {
		cat("rep.info", fill = TRUE)
		print(rep.info)
	}
	if(max(rep.info) == N) {
		shat.rep <- NA
		shat.pure.error <- NA
		out$pure.ss <- 0.
		YM <- Y
		weightsM <- weights
		xM <- as.matrix(x[!duplicated(rep.info),  ])
	}
	else {
		##
		## do a simple 1-way ANOVA to get the replication error
		##
		rep.info.aov <- fast.1way(rep.info, Y, weights)
		shat.pure.error <- sqrt(rep.info.aov$MSE)
		shat.rep <- shat.pure.error
		YM <- rep.info.aov$means
		weightsM <- rep.info.aov$w.means
		xM <- as.matrix(x[!duplicated(rep.info),  ])
		out$pure.ss <- rep.info.aov$SSE
		if(verbose) {
			cat(" rep info", fill = TRUE)
			print(rep.info.aov)
		}
	}
	out$yM <- YM
	out$xM <- xM
	out$weightsM <- weightsM
	out$shat.rep <- shat.rep
	out$shat.pure.error <- shat.pure.error
	if(missing(knots)) {
		knots <- xM
		mle.calc <- TRUE
		knot.model <- FALSE
	}
	else {
		mle.calc <- FALSE
		knot.model <- TRUE
	}
	out$knot.model <- knot.model
	out$mle.calc <- mle.calc
	knots <- as.matrix(knots)
	##
	#
	## scale x and knots 
	out$knots <- knots
	xM <- transformx(xM, scale.type, x.center, x.scale)
	transform <- attributes(xM)
	if(verbose) {
		cat("transform", fill = TRUE)
		print(transform)
	}
	knots <- scale(knots, center = transform$x.center, scale = transform$
		x.scale)
	if(verbose) {
		cat("knots in transformed scale", fill = TRUE)
		print(knots)
	}
	##
	##
	##  use value of lambda implied by rho and simga2 if these are passed
	##
	out$transform <- transform
	if(!is.na(lambda) | !is.na(df))
		method <- "user"
	if(!is.na(rho) & !is.na(sigma2)) {
		lambda <- sigma2/rho
		method <- "user"
	}
	just.solve <- (lambda[1.] == 0.)
	#
	#
	if(is.na(just.solve)) just.solve <- FALSE
	#
	if(verbose) cat("lambda", lambda, fill = TRUE)
	# find the QR decopmposition of T matrix  that spans null space with
	# respect to the knots 
	# the big X matrix
	#
	d <- ncol(xM)
	if(decomp == "DR") {
		#
		qr.T <- qr(out$make.tmatrix(knots, m))
		if(verbose) {
			print(qr.T)
		}
			tempM <- qr.yq2(qr.T, do.call(out$call.name, c(out$args, list(x1 = knots, x2 = knots))))
		tempM <- qr.q2ty(qr.T, tempM)
		if(verbose) {
			print(dim(tempM))
		}
	}
	if(decomp == "WBW") {
		#
		#   construct the covariance matrix 
		#functions and Qr decomposition of T
		#
		#
		#
		qr.T <- qr(sqrt(weightsM) * out$make.tmatrix(knots, m))
		if(verbose) {
			print(qr.T)
		}
			tempM <- sqrt(weightsM) * t(sqrt(weightsM) * t(do.call(
				out$call.name, c(out$args, list(x1 = knots,
				x2 = knots)))))
		tempM <- qr.yq2(qr.T, tempM)
		tempM <- qr.q2ty(qr.T, tempM)
	}
	np <- nrow(knots)
	# number of para. in NULL space
	nt <- (qr.T$rank)
	out$np <- np
	out$nt <- nt
	if(verbose)
		cat("np, nt", np, nt, fill = TRUE)
	# if lambda = 0 then just solve the system 
	if(verbose) print(knots)
	if(just.solve) {
			beta <- qr.coef(qr(cbind(out$make.tmatrix(xM, m), 
				qr.yq2(qr.T, do.call(out$call.name, c(out$
				args, list(x1 = xM, x2 = knots)))))), YM)
	}
	else {
		#
		#   do all the heavy decompositions if lambda is not = 0
		#   or if it is omitted
		#
		#
		####
		####
		#### Block for Full Demmler Reinsch decomposition
		#####
		#####
		##### end DR decomposition block 
		#####
		####
		#### begin WBW decomposition block
		####
		if(decomp == "DR") {
			## make up penalty matrix
			#
			if(verbose) cat("Type of decomposition", decomp, fill
					 = TRUE)
			H <- matrix(0., ncol = np, nrow = np)
			#
			#
			# svd of big X matrix in preparation for finding inverse square root
			#
			H[(nt + 1.):np, (nt + 1.):np] <- tempM
				X <- cbind(out$make.tmatrix(xM, m), qr.yq2(
					qr.T, do.call(out$call.name, c(out$
					args, list(x1 = xM, x2 = knots)))))
			if(verbose) {
				print(weightsM)
				cat("first 3 rows of X", fill = TRUE)
				print(X[1.:3.,  ])
			}
			temp <- svd(sqrt(weightsM) * X)[c("v", "d")]
			cond.matrix <- max(temp$d)/min(temp$d)
			#
			# inverse symetric square root of X^T W  
			#
			if(cond.matrix > cond.number) {
				print(paste("condition number is ", cond.matrix,
					sep = ""))
				stop("Covariance matrix is close\nto\nsingular"
					)
			}
			#   eigenvalue eigenvector decomposition of BHB
			#
			B <- temp$v %*% diag(1./(temp$d)) %*% t(temp$v)
			temp <- svd(B %*% H %*% B)
			U <- temp$u
			#
			D <- temp$d
			#   We know that H has atleast nt zero singular values ( see how H is
			#   filled)
			#   So make these identically zero.
			#   the singular values are returned from largest to smallest.
			#
			if(verbose) {
				cat("singular values:", fill = TRUE)
				print(D)
			}
			D[(1.:nt) + (np - nt)] <- 0.
			#
			#   with these these decompositions it now follows that 
			#     b= B*U( I + lambda*D)^(-1) U^T * B * X^T*Y
			#      = G*( I + lambda*D)^(-1) G^T* X^T*Y
			#	
			# Now tranform  Y based on this last equation
			#
			G <- B %*% U
			u <- t(G) %*% t(X) %*% (weightsM * YM)
			#
			#
			#   So now we have   
			#
			#    b= G*( I + lambda*D)^(-1)*u 
			#   Note how in this form we can rapidly solve for b for any lambda
			#
			# save matrix decopositions in out list
			#
			# find the pure error sums of sqaures.  
			#
			if(verbose) {
				cat("DR: u", fill = TRUE)
				print(u)
			}
			out$pure.ss <- sum(weightsM * (YM - X %*% G %*% u)^
				2.) + out$pure.ss
			if(verbose) {
				cat("pure.ss", fill = TRUE)
				print(out$pure.ss)
			}
			out$matrices <- list(B = B, U = U, u = u, D = D, G = G,
				qr.T = qr.T, X = X)
		}
		#####
		##### end WBW block
		#####
		###
		### Selection of lambda
		### this is done even if the smoothing parameter or degress of freedom is
		### specified. 
		###
		if(decomp == "WBW") {
			#### decomposition of Q2TKQ2
			temp <- svd(tempM)[c("d", "v")]
			D <- c(rep(0., nt), 1./temp$d)
			if(verbose) {
				cat("singular values:", fill = TRUE)
				print(D)
			}
			G <- matrix(0., ncol = np, nrow = np)
			G[(nt + 1.):np, (nt + 1.):np] <- temp$v
			G <- G * matrix(D, ncol = np, nrow = np, byrow = TRUE)
			u <- c(rep(0., nt), t(temp$v) %*% qr.q2ty(qr.T, sqrt(
				weightsM) * YM))
			#
			# pure error in this case is found for the 1way ANOVA 
			#
			# test for replicates
			#
			if(verbose) {
				cat("WBW: u", fill = TRUE)
				print(u)
			}
			if(verbose) {
				cat("WBW: pure.ss", fill = TRUE)
				print(out$pure.ss)
			}
			out$matrices <- list(u = u, D = D, G = G, qr.T = qr.T,
				decomp = decomp, V = temp$v)
		}
		if(verbose) {
			cat("call to gcv minimization", fill = TRUE)
		}
		gcv.out <- gcv.Krig(out, nstep.cv = nstep.cv, verbose = verbose,
			cost = out$cost, offset = out$offset, lambda = lambda)
		gcv.grid <- gcv.out$gcv.grid
		out$gcv.grid <- gcv.grid
		out$lambda.est <- gcv.out$lambda.est
		if(verbose) {
			print(out$gcv.grid)
		}
	}
	out$method <- method
	if(method == "user") {
		#
		# if degrees of freedom is specified use the this implied value for lambda
		#
		if(!is.na(df)) lambda <- Krig.df.to.lambda(df, D)
		lambda.best <- lambda
		out$lambda.est.user <- summary.gcv.Krig(out, lambda.best, 
			offset = out$offset, cost = out$cost)
	}
	else {
		lambda.best <- gcv.out$lambda.est[method, 1.]
	}
	# add in null space parameters if this WBW decomp
	#
	#
	beta <- G %*% ((1./(1. + lambda.best * D)) * u)
	out$m <- m
	if(!just.solve) {
		out$eff.df <- sum(1./(1. + lambda.best * D))
		out$trace <- out$eff.df
		if(verbose) {
			cat("trace of A", fill = TRUE)
			print(out$trace)
		}
	}
	else {
		out$eff.df <- out$np
	}
	if(just.solve)
		out$lambda <- lambda
	else out$lambda <- lambda.best
	##
	#
	# tranform the beta into the parameter associated with the covariance
	# function
	# basis set. 
	#  into the c parameter vector. 
	#
	out$beta <- beta
	hold <- Krig.coef(out)
	out$c <- hold$c
	# find predicted values and residuals. 
	#
	out$d <- hold$d
	if(verbose) {
		cat(names(out), fill = TRUE)
	}
	#  need eval.correlation.model = F in order to get predicted's in the
	# standardized scale of Y
	# 
	out$fitted.values <- predict.Krig(out, x, eval.correlation.model = FALSE)
	out$residuals <- Y - out$fitted.values
	#
	# funny conversions are in case nt is equal to 1 and X is just a vector
	#
	if(verbose) {
		cat("resdiuals", out$residuals, fill = TRUE)
	}
	#
	#
	#
	out$fitted.values.null <- as.matrix(out$make.tmatrix(x, m)) %*% out$
		d
	#
	out$just.solve <- just.solve
	# fill in the linear parameters of the covariance function in 
	# the output object
	#
	# the next formula is pretty strange. It follows from solving the
	# system of equations for the basis coefficients. 
	#       
	out$shat.GCV <- sqrt(sum(out$weights * out$residuals^2.)/(length(Y) -
		out$trace))
	if(mle.calc) {
		out$rhohat <- sum(out$c * out$yM)/(N - nt)
		if(is.na(rho)) {
			out$rho <- out$rhohat
		}
		else {
			out$rho <- rho
		}
		if(is.na(sigma2))
			sigma2 <- out$rho * out$lambda
		#
		out$sigma2 <- sigma2
		out$shat.MLE <- sqrt(out$rhohat * out$lambda)
		out$best.model <- c(out$lambda, out$sigma2, out$rho)
	}
	## wipe out big matrices if they are not to be returned
	##
	##
	if(!mle.calc) {
		out$sigma2 <- out$shat.GCV^2.
		out$rho <- out$sigma2/out$lambda
		out$rhohat <- NA
		out$shat.MLE <- NA
		out$best.model <- c(out$lambda, out$sigma2)
		out$warning <- 
			"Maximum likelihood estimates not found with knots \n"
		print(paste(out$warning, " \n "))
	}
	if(!return.matrices) {
		out$xM <- NULL
		out$YM <- NULL
		out$x <- NULL
		out$y <- NULL
		out$matrices <- NULL
		out$weights <- NULL
	}
	##
	##
	if(!return.X) out$matrices$X <- NULL
	out
}
"Krig.coef" <-
function(out, u = NULL, lambda = NULL, yM = NULL)
{
	# check for C argument.
	C.arg.missing <- is.null(formals(get(out$call.name))$C)
	#
	# the key to computing the estimate are the coeffients c and d
	# or if these need to be recomputed, the vector u
	# for new data, u needs to be found 
	#
	if(is.null(u)) {
		u <- out$matrices$u
	}
	if(is.null(lambda)) {
		lambda <- out$lambda
	}
	if(is.null(yM)) {
		temp.yM <- out$yM
	}
	else {
		temp.yM <- yM
	}
	# use a different lambda or new data so we need to get the # new temp.d and
	#   temp.c  coefficients
	nt <- out$nt
	np <- out$np
	if(out$decomp == "DR") {
		beta <- out$matrices$G %*% ((1/(1 + lambda * out$matrices$
			D)) * u)
		temp.d <- beta[1:nt]
		temp <- c(rep(0, nt), beta[(nt + 1):np])
		#
		#
		# tranform the beta into the parameter associated with the covariance
		# function  basis set 
		#
		temp.c <- c(qr.qy(out$matrices$qr.T, temp))
	}
	if(out$decomp == "WBW") {
		xc <- out$transform$x.center
		xs <- out$transform$x.scale
		knots <- scale(out$knots, xc, xs)
		beta <- out$matrices$G %*% ((1/(1 + lambda * out$matrices$
			D)) * u)
		temp.c <- c(qr.qy(out$matrices$qr.T, c(rep(0, nt), beta[(nt +
			1):np])))
		temp.c <- temp.c * sqrt(out$weightsM)
		# end of if C.arg.missing stmt
		if(C.arg.missing) {
				temp <- temp.yM - lambda * temp.c - do.call(
					out$call.name, c(out$args, list(x1 = 
					knots, x2 = knots))) %*% temp.c
		}
		else {
				temp <- temp.yM - lambda * temp.c - do.call(
					out$call.name, c(out$args, list(x1 = 
					knots, x2 = knots, C = temp.c)))
		}
		# end of if else C.arg.missing stmt
		# multiply through by weights
		temp <- sqrt(out$weightsM) * temp
		temp.d <- qr.coef(out$matrices$qr.T, temp)
	}
	return(list(c = temp.c, d = temp.d))
}
"Krig.df.to.lambda" <-
function(df, D, guess = 1, tol = 1.0000000000000001e-05)
{
	#
	# grab D ( the eigenvalues) if the Krig object is passed
	#
	if(is.list(D)) {
		D <- D$matrices$D
	}
	if(is.na(df))
		return(NA)
	if(df < sum(D == 0)) {
		warning("df too small to match with a lambda value")
		return(NA)
	}
	if(df > length(D)) {
		warning(" df too large to match a lambda value")
		return(NA)
	}
	l1 <- guess
	########## find upper lambda
	for(k in 1:25) {
		tr <- sum(1/(1 + l1 * D))
		if(tr <= df)
			break
		l1 <- l1 * 4
	}
	########## find lower lambda
	##########
	l2 <- guess
	for(k in 1:25) {
		tr <- sum(1/(1 + l2 * D))
		if(tr >= df)
			break
		l2 <- l2/4
	}
	info <- list(D = D, df = df, N = length(D))
	out <- bisection.search(log(l1), log(l2), Krig.fdf, tol = tol, f.extra
		 = info)$x
 + exp(out)
}
"Krig.discretize" <-
function(x, m = 64, n = 64, xg = NULL, yg = NULL, grid = NULL, expand = c(
	1, 1))
{
	#
	# set up discretized grid based on x
	#
	out <- list()
	if(!is.null(grid)) {
		xg <- grid$x
		yg <- grid$y
		m <- length(xg)
		n <- length(yg)
	}
	if(length(expand) == 1)
		expand <- rep(expand, 2)
	if(is.null(xg)) {
		xr <- range(x[, 1])
		deltemp <- (xr[2] - xr[1]) * (expand[1] - 1) * 0.5
		xg <- seq(xr[1] - deltemp, xr[2] + deltemp,  , m)
	}
	else {
		xr <- range(xg)
	}
	if(is.null(yg)) {
		yr <- range(x[, 2])
		deltemp <- (yr[2] - yr[1]) * (expand[2] - 1) * 0.5
		yg <- seq(yr[1] - deltemp, yr[2] + deltemp,  , n)
	}
	else {
		yr <- range(yg)
	}
	del <- 1e-08 + (0.5 * (max(xr[2]) - min(xr[1])))/(m - 1)
	xcut <- seq(xr[1] - del, xr[2] + del,  , (m + 1))
	del <- 1e-08 + (0.5 * (max(yr[2]) - min(yr[1])))/(n - 1)
	ycut <- seq(yr[1] - del, yr[2] + del,  , (n + 1))
	out$m <- length(xg)
	out$n <- length(yg)
	out$index <- cbind(cut(x[, 1], xcut), cut(x[, 2], ycut))
	#	out$cut.grid <- list(x = xcut, y = ycut)	#
	#
	out$grid <- list(x = xg, y = yg)
	out$loc <- cbind(xg[out$index[, 1]], yg[out$index[, 2]])
	out
}
"Krig.fdf" <-
function(llam, info)
{
	sum(1/(1 + exp(llam) * info$D)) - info$df
}
"Krig.fgcv" <-
function(lam, obj)
{
	#
	# GCV that is leave-one-group out
	#
	lD <- obj$matrices$D * lam
	RSS <- sum(((obj$matrices$u * lD)/(1 + lD))^2)
	MSE <- RSS/length(lD)
	if((obj$N - length(lD)) > 0) {
		MSE <- MSE + obj$pure.ss/(obj$N - length(lD))
	}
	trA <- sum(1/(1 + lD))
	den <- (1 - (obj$cost * (trA - obj$nt - obj$offset) + obj$nt)/length(
		lD))
	# If the denominator is negative then flag this as a bogus case
	# by making the GCV function "infinity"
	#
	ifelse(den > 0, MSE/den^2, NA)
}
"Krig.fgcv.model" <-
function(lam, obj)
{
	lD <- obj$matrices$D * lam
	MSE <- sum(((obj$matrices$u * lD)/(1 + lD))^2)/length(lD)
	trA <- sum(1/(1 + lD))
	den <- (1 - (obj$cost * (trA - obj$nt - obj$offset) + obj$nt)/length(
		lD))
	ifelse(den > 0, obj$shat.pure.error^2 + MSE/den^2, NA)
}
"Krig.fgcv.one" <-
function(lam, obj)
{
	lD <- obj$matrices$D * lam
	RSS <- obj$pure.ss + sum(((obj$matrices$u * lD)/(1 + lD))^2)
	trA <- sum(1/(1 + lD))
	den <- 1 - (obj$cost * (trA - obj$nt - obj$offset) + obj$nt)/obj$N
	# If the denominator is negative then flag this as a bogus case
	# by making the GCV function "infinity"
	#
	ifelse(den > 0, (RSS/obj$N)/den^2, 1e+20)
}
"Krig.find.gcvmin" <-
function(info, lambda.grid, gcv, gcv.fun, tol, verbose = FALSE)
{
	# first take out NA from gcv
	ind <- !is.na(gcv)
	lambda.grid <- lambda.grid[ind]
	gcv <- gcv[ind]
	#
	#find coarse minima
	#
	nstep.cv <- length(lambda.grid)
	il <- order(gcv)[1]
	lambda.gcv <- lambda.grid[il]
	#
	#
	#
	gcv.raw <- min(gcv)
	if(verbose) {
		cat("GCV coarse search:", gcv.raw)
	}
	#
	#
	# do a golden section refined search for minimizing lamdda
	# if the minimum is in interior of the grid search. 
	#
	if((il > 1) & (il < nstep.cv)) {
		#
		# now do the Golden section refinement
		# tolerance for convergence scaled with respect to GCV from the coarse search
		#
		out <- golden.section.search(lambda.grid[il - 1], lambda.grid[
			il], lambda.grid[il + 1], gcv.fun, f.extra = info,
			tol = tol * gcv.raw)
		return(out$x)
	}
	else {
		warning("GCV search gives a minumum at the endpoints of the grid search"
			)
		return(lambda.gcv)
	}
}
"Krig.fs2hat" <-
function(lam, obj)
{
	lD <- obj$matrices$D * lam
	RSS <- obj$pure.ss + sum(((obj$matrices$u * lD)/(1 + lD))^2)
	#	print(RSS)
	#	trA <- sum(1/(1 + lD)) + obj$offset
	den <- obj$N - (sum(1/(1 + lD)) + obj$offset)
	if(den < 0) {
		return(NA)
	}
	else {
		RSS/(den)
	}
}
"Krig.ftrace" <-
function(lam, D)
{
	sum(1/(1 + lam * D))
}
"Krig.replicates" <-
function(out, verbose = FALSE)
{
	rep.info <- cat.matrix(out$x)
	if(verbose)
		print(rep.info)
	uniquerows <- !duplicated(rep.info)
	if(sum(uniquerows) == out$N) {
		shat.rep <- NA
		shat.pure.error <- NA
		pure.ss <- 0
		yM <- out$y
		weightsM <- out$weights
		xM <- as.matrix(out$x[uniquerows,  ])
	}
	else {
		rep.info.aov <- fast.1way(rep.info, out$y, out$weights)
		shat.pure.error <- sqrt(rep.info.aov$MSE)
		shat.rep <- shat.pure.error
		yM <- rep.info.aov$means
		weightsM <- rep.info.aov$w.means
		xM <- as.matrix(out$x[uniquerows,  ])
		pure.ss <- rep.info.aov$SSE
		if(verbose)
			print(rep.info.aov)
	}
	return(yM, xM, weightsM, uniquerows, shat.rep, shat.pure.error, pure.ss,
		rep.info)
}
"Krig.updateY" <-
function(out, Y, verbose = FALSE)
{
	#given new Y values but keeping everything else the same finds the 
	#new u vector and pure error SS associated with the Kriging estimate
	# the steps are
	# 1) standardize if neccesary
	# 2) find means, in the case of replicates
	# 3) based on the decomposition, multipy a weighted version of yM
	#    with a large matrix extracted from teh Krig object out. 
	#
	# The out object may be large. This function is written so that out is # #not changed with the hope that it is not copied locally  in this  #function .
	# All of the output is accumulated in the list out2
	#STEP 1
	#
	# transform Y by mean and sd if needed
	#
	if(out$correlation.model) {
		Y <- (Y - predict(out$mean.obj, out$x))/predict(out$sd.obj,
			out$x)
		if(verbose)
			print(Y)
	}
	#
	#STEP 2
	out2 <- Krig.ynew(out, Y)
	if(verbose) {
		print(out2)
	}
	#
	#STEP3
	#
	# Note how matrices are grabbed from the Krig object
	#
	if(verbose) cat("Type of decomposition", out$decomp, fill = TRUE)
	if(out$decomp == "DR") {
		#
		#
		u <- t(out$matrices$G) %*% t(out$matrices$X) %*% (out$weightsM *
			out2$yM)
		#
		# find the pure error sums of sqaures.  
		#
		temp <- out$matrices$X %*% out$matrices$G %*% u
		temp <- sum(out$weightsM * (out2$yM - temp)^2)
		out2$pure.ss <- temp + out2$pure.ss
		if(verbose) {
			cat("pure.ss", fill = TRUE)
			print(temp)
			print(out2$pure.ss)
		}
	}
	#####
	##### end DR decomposition block 
	#####
	####
	#### begin WBW decomposition block
	####
	if(out$decomp == "WBW") {
		#### decomposition of Q2TKQ2
		u <- c(rep(0, out$nt), t(out$matrices$V) %*% qr.q2ty(out$
			matrices$qr.T, sqrt(out$weightsM) * out2$yM))
		if(verbose)
			cat("u", u, fill = TRUE)
		#
		# pure error in this case from 1way ANOVA 
		#
		if(verbose) {
			cat("pure.ss", fill = TRUE)
			print(out2$pure.ss)
		}
	}
	#####
	##### end WBW block
	#####
	out2$u <- u
	out2
}
"Krig.ynew" <-
function(out, ynew, verbose = FALSE)
{
	#
	# calculates the collapsed y (weighted) mean vector based on the
	# X matrix and weights from the out object. 
	#
	if(length(ynew) != out$N) {
		stop(" the new Y vector is the wrong length!")
	}
	#
	# If there are no replicated obs. then return the full vector
	# pure error ss is zero 
	#
	if(length(unique(out$rep.info)) == out$N) {
		shat.rep <- NA
		shat.pure.error <- NA
		pure.ss <- 0
		yM <- ynew
		return(list(yM = ynew, shat.rep = NA, shat.pure.error = NA,
			pure.ss = 0))
	}
	else {
		#
		# calculate means by pooling Replicated obseravations but use the
		# the right weighting. 
		#
		rep.info.aov <- fast.1way(out$rep.info, ynew, out$weights)[
			c("means", "MSE", "SSE")]
		shat.pure.error <- sqrt(rep.info.aov$MSE)
		shat.rep <- shat.pure.error
		return(list(yM = rep.info.aov$means, shat.rep = shat.rep, 
			shat.pure.error = shat.pure.error, pure.ss = 
			rep.info.aov$SSE))
	}
}
"Tps" <-
function (x, Y, m = NULL, p = NULL, decomp = "WBW", scale.type = "range", ...) 
{
    x <- as.matrix(x)
    d <- ncol(x)
    if (is.null(p)) {
        if (is.null(m)) {
            m <- max(c(2, ceiling(d/2 + 0.1)))
        }
        p <- (2 * m - d)
        if (p <= 0) {
            stop(" m is too small  you must have 2*m -d >0")
        }
    }
    if (!is.null(list(...)$knots)) 
        decomp <- "DR"
    Tpscall <- match.call()
    Tpscall$cov.function <- "Thin plate spline radial basis functions (rad.cov) "
    Krig(x, Y, cov.function = rad.cov, m = m, decomp = decomp, 
        scale.type = scale.type, outputcall = Tpscall, p = p, 
        ...)
}
"US" <-
function (xlim = c(-124.7, -67.1), ylim = c(25.2, 49.4), add = FALSE, 
shift=FALSE,    ...) 
{
    if (!exists("US.dat")) 
        data(US.dat)
if( shift){
US.dat$x[ US.dat$x<0] <- US.dat$x[ US.dat$x<0] +360}

    if (!add) {
        plot(US.dat$x, US.dat$y, ylim = ylim, xlim = xlim, xlab = "", 
            ylab = "", type = "n", xaxt = "n", yaxt = "n", ...)
    }
    lines(US.dat$x, US.dat$y, err = -1, ...)
    invisible()
}
"W.image.cov" <-
function (ind1, ind2, Y, cov.obj = NULL, setup = FALSE, m = 64, n = 64, 
    ...) 
{
    if (is.null(cov.obj)) {
        cov.obj <- setup.W.image.cov(m, n, ...)
    }
    if (setup) {
        return(cov.obj)
    }
    cut.min <- cov.obj$cut.min
    if (missing(ind1)) {
        Wtransform.image(cov.obj$D * Wtransform.image(Y, inv = TRUE, 
            transpose = TRUE, cut.min = cut.min), inv = TRUE, cut.min = cut.min)
    }
    else {
        temp <- matrix(0, nrow = cov.obj$m, ncol = cov.obj$n)
        if (missing(ind2)) {
            ind2 <- ind1
        }
        temp[ind2] <- Y
        Wtransform.image(cov.obj$D * Wtransform.image(temp, inv = TRUE, 
            transpose = TRUE, cut.min = cut.min), inv = TRUE, cut.min = cut.min)[ind1]
    }
}
"WD4" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D4 <- c(0.482962913145, 0.836516303738, 0.224143868042, -0.129409522551)
    D4.le <- matrix(c(0.6033325119, -0.7965435169, 0.03751746045, 
        0.01003722456, 0.6908955318, 0.546392714, 0.4573276599, 
        0.1223510431, -0.3983129977, -0.2587922483, 0.8500881025, 
        0.2274281117, 0, 0, 0.223820357, -0.8366029212, 0, 0, 
        -0.1292227434, 0.4830129218), nrow = 4, ncol = 5, byrow = FALSE)
    D4.r <- c(-0.129409522551, -0.224143868042, 0.836516303738, 
        -0.482962913145)
    D4.re <- matrix(c(0.4431490496, 0.231557595, 0, 0, 0.7675566693, 
        0.4010695194, 0, 0, 0.3749553316, -0.7175799994, 0.2303890438, 
        -0.5398225007, 0.1901514184, -0.3639069596, 0.434896998, 
        0.801422962, -0.1942334074, 0.3717189665, 0.8705087534, 
        -0.2575129195), nrow = 4, ncol = 5, byrow = FALSE)
    n <- dim(x)[1]
    m <- dim(x)[2]
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1:4, ] <- D4.le %*% x[1:5, ]
    tmp[(n - 3):n, ] <- D4.re %*% x[(n - 4):n, ]
    stuff <- n - 6
    indx <- seq(4, stuff, 2)
    tmp[indx + 1, ] <- D4[1] * x[indx, ] + D4[2] * x[indx + 1, 
        ] + D4[3] * x[indx + 2, ] + D4[4] * x[indx + 3, ]
    tmp[indx + 2, ] <- D4.r[1] * x[indx, ] + D4.r[2] * x[indx + 
        1, ] + D4.r[3] * x[indx + 2, ] + D4.r[4] * x[indx + 3, 
        ]
    wt <- rbind(tmp[seq(1, n, 2), ], tmp[seq(2, n, 2), ])
    wt
}
"WD42d" <-
function (x) 
{
    t(WD4(t(WD4(x))))
}
"WD42di" <-
function (x) 
{
    WD4i(t(WD4i(t(x))))
}
"WD4i" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    n <- nrow(x)
    m <- ncol(x)
    X <- matrix(0, nrow = n, ncol = m)
    X[seq(1, n, 2), ] <- x[1:(n/2), ]
    X[seq(2, n, 2), ] <- x[(n/2 + 1):n, ]
    x <- X
    D4 <- c(0.482962913145, 0.836516303738, 0.224143868042, -0.129409522551)
    D4.le <- matrix(c(0.6033325119, -0.7965435169, 0.03751746045, 
        0.01003722456, 0.6908955318, 0.546392714, 0.4573276599, 
        0.1223510431, -0.3983129977, -0.2587922483, 0.8500881025, 
        0.2274281117, 0, 0, 0.223820357, -0.8366029212, 0, 0, 
        -0.1292227434, 0.4830129218), nrow = 4, ncol = 5, byrow = FALSE)
    D4.r <- c(-0.129409522551, -0.224143868042, 0.836516303738, 
        -0.482962913145)
    D4.re <- matrix(c(0.4431490496, 0.231557595, 0, 0, 0.7675566693, 
        0.4010695194, 0, 0, 0.3749553316, -0.7175799994, 0.2303890438, 
        -0.5398225007, 0.1901514184, -0.3639069596, 0.434896998, 
        0.801422962, -0.1942334074, 0.3717189665, 0.8705087534, 
        -0.2575129195), nrow = 4, ncol = 5, byrow = FALSE)
    D4tr.L <- matrix(0, nrow = 3, ncol = 4)
    D4tr.L[1, ] <- c(D4.le[1, 1], D4.le[2, 1], D4.le[3, 1], D4.le[4, 
        1])
    D4tr.L[2, ] <- c(D4.le[1, 2], D4.le[2, 2], D4.le[3, 2], D4.le[4, 
        2])
    D4tr.L[3, ] <- c(D4.le[1, 3], D4.le[2, 3], D4.le[3, 3], D4.le[4, 
        3])
    D4tr.R <- matrix(0, nrow = 3, ncol = 4)
    D4tr.R[1, ] <- c(D4.re[1, 3], D4.re[2, 3], D4.re[3, 3], D4.re[4, 
        3])
    D4tr.R[2, ] <- c(D4.re[1, 4], D4.re[2, 4], D4.re[3, 4], D4.re[4, 
        4])
    D4tr.R[3, ] <- c(D4.re[1, 5], D4.re[2, 5], D4.re[3, 5], D4.re[4, 
        5])
    if (n == 8) {
        D4tr.t <- matrix(0, nrow = 2, ncol = 4)
        D4tr.t[1, ] <- c(D4.le[3, 4], D4.le[4, 4], D4.re[1, 1], 
            D4.re[2, 1])
        D4tr.t[2, ] <- c(D4.le[3, 5], D4.le[4, 5], D4.re[1, 2], 
            D4.re[2, 2])
    }
    else {
        D4tr.t <- matrix(0, 4, 4)
        D4tr.t[1, ] <- c(D4.le[3, 4], D4.le[4, 4], D4[1], D4.r[1])
        D4tr.t[2, ] <- c(D4.le[3, 5], D4.le[4, 5], D4[2], D4.r[2])
        D4tr.t[3, ] <- c(D4[3], D4.r[3], D4.re[1, 1], D4.re[2, 
            1])
        D4tr.t[4, ] <- c(D4[4], D4.r[4], D4.re[1, 2], D4.re[2, 
            2])
    }
    iD4 <- c(D4[3], D4.r[3], D4[1], D4.r[1])
    iD4.r <- c(D4[4], D4.r[4], D4[2], D4.r[2])
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1:3, ] <- D4tr.L %*% x[1:4, ]
    tmp[(n - 2):n, ] <- D4tr.R %*% x[(n - 3):n, ]
    if (n == 8) {
        tmp[4:5, ] <- D4tr.t %*% x[3:6, ]
    }
    else {
        tmp[4:5, ] <- D4tr.t[1:2, ] %*% x[3:6, ]
        tmp[(n - 4):(n - 3), ] <- D4tr.t[3:4, ] %*% x[(n - 5):(n - 
            2), ]
        indx <- seq(6, (n - 6), 2)
        tmp[indx, ] <- iD4[1] * x[indx - 1, ] + iD4[2] * x[indx, 
            ] + iD4[3] * x[indx + 1, ] + iD4[4] * x[indx + 2, 
            ]
        tmp[indx + 1, ] <- iD4.r[1] * x[indx - 1, ] + iD4.r[2] * 
            x[indx, ] + iD4.r[3] * x[indx + 1, ] + iD4.r[4] * 
            x[indx + 2, ]
    }
    iwt <- tmp
    iwt
}
"WQS" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <- c(-1, 3, 3, -1)
    D.le <- matrix(c(2, 3, -1, 2, -3, 1), nrow = 2, ncol = 3, 
        byrow = TRUE)
    D.re <- matrix(c(-1, 3, 2, -1, 3, -2), nrow = 2, ncol = 3, 
        byrow = TRUE)
    D.rough <- c(-1, 3, -3, 1)
    n <- dim(x)[1]
    m <- dim(x)[2]
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1:2, ] <- D.le %*% x[1:3, ]
    tmp[(n - 1):n, ] <- D.re %*% x[(n - 2):n, ]
    stuff <- n - 4
    indx <- seq(2, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp[c(seq(1, n, 2), seq(2, n, 2)), ]
}
"WQS.T" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <- c(3, -3, -1, -1)
    D.le <- matrix(c(2, 2), nrow = 1, ncol = 2, byrow = TRUE)
    D.re <- matrix(c(2, -2), nrow = 1, ncol = 2, byrow = TRUE)
    D.rough <- c(-1, 1, 3, 3)
    n <- dim(x)[1]
    m <- dim(x)[2]
    x[c(seq(1, n, 2), seq(2, n, 2)), ] <- x
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1, ] <- D.le %*% x[1:2, ]
    tmp[n, ] <- D.re %*% x[(n - 1):n, ]
    stuff <- n - 3
    indx <- seq(1, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp
}
"WQS.basis" <-
function (N, cut.n = 8) 
{
Wtransform( diag(1,N), inv=TRUE,cut.min=cut.n)
}
"WQS2d" <-
function (x, transpose = FALSE) 
{
    if (!transpose) 
        t(WQS(t(WQS(x))))
    else {
        WQS.T(t(WQS.T(t(x))))
    }
}
"WQS2di" <-
function (x, transpose = FALSE) 
{
    if (!transpose) 
        t(WQSi(t(WQSi(x))))
    else {
        WQSi.T(t(WQSi.T(t(x))))
    }
}
"WQSdi" <-
function (x, transpose = FALSE) 
{
    if (!transpose) 
        t(WQSi(t(WQSi(x))))
    else {
        WQSi.T(t(WQSi.T(t(x))))
    }
}
"WQSi" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <- c(3, -3, 1, 1)/16
    D.le <- matrix(c(4, 4), nrow = 1, ncol = 2, byrow = TRUE)/16
    D.re <- matrix(c(4, -4), nrow = 1, ncol = 2, byrow = TRUE)/16
    D.rough <- c(1, -1, 3, 3)/16
    n <- dim(x)[1]
    m <- dim(x)[2]
    x[c(seq(1, n, 2), seq(2, n, 2)), ] <- x
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1, ] <- D.le %*% x[1:2, ]
    tmp[n, ] <- D.re %*% x[(n - 1):n, ]
    stuff <- n - 3
    indx <- seq(1, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp
}
"WQSi.T" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <- c(1, 3, 3, 1)/16
    D.le <- matrix(c(4, 3, 1, 4, -3, -1), nrow = 2, ncol = 3, 
        byrow = TRUE)/16
    D.re <- matrix(c(1, 3, 4, 1, 3, -4), nrow = 2, ncol = 3, 
        byrow = TRUE)/16
    D.rough <- c(1, 3, -3, -1)/16
    n <- dim(x)[1]
    m <- dim(x)[2]
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1:2, ] <- D.le %*% x[1:3, ]
    tmp[(n - 1):n, ] <- D.re %*% x[(n - 2):n, ]
    stuff <- n - 4
    indx <- seq(2, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp[c(seq(1, n, 2), seq(2, n, 2)), ]
}
"Wtransform.D" <-
function (nx, ny, weights = c(1), cut.min = 8, details = FALSE) 
{
    NN <- ny
    MM <- nx
    while ((NN > cut.min) & (MM > cut.min)) {
        NN <- NN/2
        MM <- MM/2
    }
    temp <- matrix(0, nrow = nx, ncol = ny)
    nn <- NN
    mm <- MM
    temp[1:mm, 1:nn] <- weights[1]
    cat(mm, nn, fill = TRUE)
    jj <- 2
    nn <- nn * 2
    mm <- mm * 2
    while ((nn <= ny) & (mm <= nx) & (jj <= length(weights))) {
        cat(mm, nn, fill = TRUE)
        if (!details) {
            temp[(mm/2 + 1):mm, 1:(nn/2)] <- weights[jj]
            temp[(mm/2 + 1):mm, (nn/2 + 1):nn] <- weights[jj]
            temp[1:(mm/2), (nn/2 + 1):nn] <- weights[jj]
        }
        else {
            temp[(mm/2 + 1):mm, 1:(nn/2)] <- weights[jj]
            jj <- jj + 1
            temp[(mm/2 + 1):mm, (nn/2 + 1):nn] <- weights[jj]
            jj <- jj + 1
            temp[1:(mm/2), (nn/2 + 1):nn] <- weights[jj]
        }
        jj <- jj + 1
        nn <- nn * 2
        mm <- mm * 2
    }
    max.m <- mm/2
    max.n <- nn/2
    return(D = temp, max.n, max.m)
}
"Wtransform" <-
function (x, inv = FALSE, transpose = FALSE, cut.min = 8) 
{
# coerce to one column matrix if x is not already a matrix
if( !is.matrix(x)){ x<- matrix( x, ncol=1)}

# tranpose operation requires similar recursion to the inverse
    if (transpose) 
        inv <- !inv

    nn<-n <- dim(x)[1]
    
#
# check that n is the product of a dyadic and an integer less or equal 
#to than cut.min
#
    if( dyadic.check( n,cut.min)==FALSE) 
{stop("error in column dimension ")}
    if (!inv) {
        while (nn > cut.min) {
            if (!transpose) {
                x[1:nn, ] <- WQS(x[1:nn, ])
            }
            else {
                x[1:nn, ] <- WQSi.T(x[1:nn, ]) 
            }
            nn <- nn/2
        }
    }
    if (inv) {
        NN <- n
        while (NN > cut.min) {
            NN <- NN/2
        }
        nn <- NN * 2

        while (nn <= n) {
            if (!transpose) {
                x[1:nn,] <- WQSi(x[1:nn, ])
            }
            else {
                x[1:nn,] <- WQS.T(x[1:nn, ])
            }
            nn <- nn * 2
        }
    }
return(x)
}
"WQS.periodic" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <- c(-1, 3, 3, -1)
    D.rough <- c(-1, 3, -3, 1)
    D.le <- matrix(c(D.smooth, D.rough), nrow = 2, ncol= 4, 
        byrow = TRUE)
    D.re <- D.le
    n <- dim(x)[1]
    m <- dim(x)[2]
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1:2, ] <- D.le %*% x[c(n, 1:3), ]
    tmp[(n - 1):n, ] <- D.re %*% x[c((n - 2):n,1), ]
    stuff <- n - 4
    indx <- seq(2, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp[c(seq(1, n, 2), seq(2, n, 2)), ]
}
"WQS.periodic.basis" <-
function (N, cut.n = 8) 
{
    x <- diag(1, N)
    nrow <- nrow(x)
    ncol <- ncol(x)
    nn <- nrow
    temp <- x
    nn <- cut.n * 2
    while (nn <= nrow) {
        temp[1:nn, ] <- WQSi.periodic(temp[1:nn, ])
        nn <- nn * 2
    }
    return(temp)
}
"WQS.periodic.T" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <-  c(3, -3, -1, -1)
    D.rough <-  c(-1, 1, 3, 3)
    D.le <- matrix(D.smooth, nrow = 1, ncol = 4, byrow = TRUE)
    D.re <- matrix(D.rough, nrow = 1, ncol = 4, byrow = TRUE)
    n <- dim(x)[1]
    m <- dim(x)[2]
    x[c(seq(1, n, 2), seq(2, n, 2)), ] <- x
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[n, ] <- D.le %*% x[c(n-1,n,1:2), ]
    tmp[1, ] <- D.re %*% x[c((n - 1),n,1,2), ]
    stuff <- n - 3
    indx <- seq(1, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp
}
"WQS2d.cylinder" <-
function (x, transpose = FALSE, byX=T) 
{
if( byX){
    if (!transpose) 
        t(WQS(t(WQS.periodic(x))))
    else {
        WQS.periodic.T(t(WQS.T(t(x))))
    }
}
else{
   if (!transpose)
        t(WQS.periodic(t(WQS(x))))
    else {
        WQS.T(t(WQS.periodic.T(t(x))))
    }
}

}
"WQS2di.cylinder" <-
function (x, transpose = FALSE, byX=T) 
{
   if( byX){
 if (!transpose) 
        t(WQSi(t(WQSi.periodic(x))))
    else {
        WQSi.periodic.T(t(WQSi.T(t(x))))
    }
}
else{
 if (!transpose)
        t(WQSi.periodic(t(WQSi(x))))
    else {
        WQSi.T(t(WQSi.periodic.T(t(x))))
    }
}

}
"WQSi.periodic" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <- c(3, -3, 1, 1)/16
    D.rough <- c(1, -1, 3, 3)/16
    D.le <- matrix(D.smooth, nrow = 1, ncol = 4, byrow = TRUE)
    D.re <- matrix(D.rough, nrow = 1, ncol = 4, byrow = TRUE)
    n <- dim(x)[1]
    m <- dim(x)[2]
    x[c(seq(1, n, 2), seq(2, n, 2)), ] <- x
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[n, ] <- D.le %*% x[c(n-1,n,1:2), ]
    tmp[1, ] <- D.re %*% x[c((n - 1),n,1,2), ]
    stuff <- n - 3
    indx <- seq(1, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp
}
"WQSi.periodic.T" <-
function (x) 
{
    if (!is.matrix(x)) 
        x <- matrix(x, nrow = length(x), ncol = 1)
    D.smooth <-  c(1, 3, 3, 1)/16
    D.rough <-  c(1, 3, -3, -1)/16
    D.le <- matrix(c(D.smooth, D.rough), nrow = 2, ncol= 4, 
        byrow = TRUE)
    D.re <- D.le
    n <- dim(x)[1]
    m <- dim(x)[2]
    tmp <- matrix(NA, nrow = n, ncol = m)
    tmp[1:2, ] <- D.le %*% x[c(n, 1:3), ]
    tmp[(n - 1):n, ] <- D.re %*% x[c((n - 2):n,1), ]
    stuff <- n - 4
    indx <- seq(2, stuff, 2)
    tmp[indx + 1, ] <- D.smooth[1] * x[indx, ] + D.smooth[2] * 
        x[indx + 1, ] + D.smooth[3] * x[indx + 2, ] + D.smooth[4] * 
        x[indx + 3, ]
    tmp[indx + 2, ] <- D.rough[1] * x[indx, ] + D.rough[2] * 
        x[indx + 1, ] + D.rough[3] * x[indx + 2, ] + D.rough[4] * 
        x[indx + 3, ]
    tmp[c(seq(1, n, 2), seq(2, n, 2)), ]
}
"Wtransform.cylinder.image" <-
function (x, inv = FALSE, transpose = FALSE, byX=TRUE, cut.min = 8) 
{
#
    if (transpose){ 
        inv <- !inv}

    n <- dim(x)[1]
    m <- dim(x)[2]
    if (n > m) {
        flip <- TRUE
        temp <- t(x)
        n <- dim(temp)[1]
        m <- dim(temp)[2]
#
# if the calculations are done on the transpose of the image then
# switch the choice of which dimension has the periodic basis
#
        byX <- !byX
    }
    else {
        flip <- FALSE
        temp <- x
    }

    if (n > m) 
        stop(" number of columns of x must >= to number of\nrows")
    nn <- n
    mm <- m
# test for dimensions "close" to dyadic (see help file)

           if( dyadic.2check( mm,nn,cut.min)==FALSE) 
                 {stop("error in length of column or row dimensions")}
    if (!inv) {
        while (nn > cut.min) {
            if (!transpose) {
                temp[1:nn, 1:mm] <- WQS2d.cylinder(temp[1:nn,1:mm], 
byX=byX)
            }
            else {
                temp[1:nn, 1:mm] <- WQS2di.cylinder(temp[1:nn, 1:mm], 
                  transpose = TRUE, byX=byX)
            }
            nn <- nn/2
            mm <- mm/2
        }
    }
    if (inv) {
        NN <- n
        MM <- m
        while (NN > cut.min) {
            NN <- NN/2
            MM <- MM/2
        }
        nn <- NN * 2
        mm <- MM * 2
        while (nn <= n) {
            if (!transpose) {
                temp[1:nn, 1:mm] <- WQS2di.cylinder(temp[1:nn, 1:mm], 
byX=byX)
            }
            else {
                temp[1:nn, 1:mm] <- WQS2d.cylinder(temp[1:nn, 1:mm], 
transpose = TRUE, byX=byX)
            }
            nn <- nn * 2
            mm <- mm * 2
        }
    }
    if (flip) {
        return(t(temp))
    }
    else {
        return(temp)
    }
}
"Wtransform.image" <-
function (x, inv = FALSE, transpose = FALSE, cut.min = 8) 
{
    if (transpose) 
        inv <- !inv
    n <- dim(x)[1]
    m <- dim(x)[2]
    if (n > m) {
        flip <- TRUE
        temp <- t(x)
        n <- dim(temp)[1]
        m <- dim(temp)[2]
    }
    else {
        flip <- FALSE
        temp <- x
    }
    if (n > m) 
        stop(" number of columns of x must >= to number of\nrows")
    nn <- n
    mm <- m
# test 
           if( dyadic.2check( mm,nn,cut.min)==FALSE) 
                 {stop("error in column or row dimensions")}


    if (!inv) {
        while (nn > cut.min) {
            if (!transpose) {
                temp[1:nn, 1:mm] <- WQS2d(temp[1:nn, 1:mm])
            }
            else {
                temp[1:nn, 1:mm] <- WQS2di(temp[1:nn, 1:mm], 
                  transpose = TRUE)
            }
            nn <- nn/2
            mm <- mm/2
        }
    }
    if (inv) {
        NN <- n
        MM <- m
        while (NN > cut.min) {
            NN <- NN/2
            MM <- MM/2
        }
        nn <- NN * 2
        mm <- MM * 2
        while (nn <= n) {
            if (!transpose) {
                temp[1:nn, 1:mm] <- WQS2di(temp[1:nn, 1:mm])
            }
            else {
                temp[1:nn, 1:mm] <- WQS2d(temp[1:nn, 1:mm], transpose = TRUE)
            }
            nn <- nn * 2
            mm <- mm * 2
        }
    }
    if (flip) {
        return(t(temp))
    }
    else {
        return(temp)
    }
}
"Wtransform.sim" <-
function (D, cut.min = 16) 
{
    NN <- dim(D)
    temp <- matrix(rnorm(NN[1] * NN[2]), NN[1], NN[2]) * sqrt(D)
    Wtransform.image(temp, inv = TRUE, cut.min = cut.min)
}
"[.spatial.design" <-
function (x, ...) 
{
    x$design[...]
}
"arrow.plot" <-
function (a1, a2, u = NA, v = NA, arrow.ex = 0.05, 
     xpd = TRUE, true.angle = FALSE, ...) 
{
    if (is.matrix(a1)) {
        x <- a1[, 1]
        y <- a1[, 2]
    }
    else {
        x <- a1
        y <- a2
    }
    if (is.matrix(a2)) {
        u <- a2[, 1]
        v <- a2[, 2]
    }
    ucord <- par()$usr
    arrow.ex <- arrow.ex * min(ucord[2] - ucord[1], ucord[4] - 
        ucord[3])
    if (true.angle) {
        pin <- par()$pin
        r1 <- (ucord[2] - ucord[1])/(pin[1])
        r2 <- (ucord[4] - ucord[3])/(pin[2])
    }
    else {
        r1 <- r2 <- 1
    }
    u <- u * r1
    v <- v * r2
    maxr <- max(sqrt(u^2 + v^2))
    u <- (arrow.ex * u)/maxr
    v <- (arrow.ex * v)/maxr
    invisible()
    old.xpd <- par()$xpd
    par(xpd = xpd)
    arrows(x, y, x + u, y + v, ...)
    par(xpd = old.xpd)
}
"as.image" <-
function (Z, ind = NULL, grid = NULL, x = NULL, nrow = 64, ncol = 64, 
    weights = rep(1, length(Z)), na.rm=TRUE) 
{
    if (!is.null(ind)) 
        x <- ind
    if (is.null(x) & is.null(grid)) {
        grid <- list(x = 1:nrow, y = 1:ncol)
    }

if( na.rm){
ind2<- !is.na( Z)
Z<- Z[ind2] 
x<- x[ind2,]
weights<- weights[ind2]
}
    if (!is.null(x) & is.null(grid)) {
        temp <- Krig.discretize(x, nrow, ncol)
        grid <- temp$grid
        ind <- temp$index
    }
    if (!is.null(x) & !is.null(grid)) {
        temp <- Krig.discretize(x, grid = grid)
        ind <- temp$index
    }
    m <- length(grid$x)
    n <- length(grid$y)
    rep.info <- cat.matrix(ind)
    uniquerows <- !duplicated(rep.info)
    if (sum(uniquerows) < length(Z)) {
        ind <- ind[uniquerows, ]
        temp <- fast.1way(rep.info, Z, w = weights)
        Z <- temp$means
        Ncell <- temp$n
        temp2 <- matrix(0, nrow = m, ncol = n)
        temp2[ind] <- Ncell
        temp3 <- matrix(NA, nrow = m, ncol = n)
        temp3[ind] <- temp$w.means
    }
    else {
        temp2 <- matrix(0, nrow = m, ncol = n)
        temp2[ind] <- 1
        temp3 <- matrix(NA, nrow = m, ncol = n)
        temp3[ind] <- 1
    }
    temp <- matrix(NA, nrow = m, ncol = n)
    temp[ind] <- Z
    call <- match.call()
    list(x = grid$x, y = grid$y, z = temp, call = call, ind = ind, 
        N = temp2, weights = temp3)
}
"as.surface" <-
function (grid.list, z, order.variables = "xy") 
{
    if (is.null(class(grid.list)) | (class(grid.list) != "surface.grid")) {
        hold <- make.surface.grid(grid.list, info.list = TRUE)
        hold2 <- grid.list
    }
    else {
        hold <- attributes(grid.list)$surface.info
        hold2 <- attributes(grid.list)$grid.list
    }
    if (hold$nx * hold$ny != length(z)) 
        stop("Problems\nmatching grid info with your z vector. Check your grid dimensions!")
    if (hold$nvar > 2) {
        main.title <- paste(names(hold$fixed.variables), " = ", 
            unlist(hold$fixed.variables), sep = "")
        main.title <- paste(main.title, collapse = " ")
    }
    else {
        main.title <- NULL
    }
    if (order.variables == "xy") {
        out <- list(x = hold$x, y = hold$y, z = matrix(z, ncol = hold$ny, 
            nrow = hold$nx), xlab = hold$xlab, ylab = hold$ylab, 
            main = main.title, grid.list = hold2)
    }
    else {
        out <- list(x = hold$y, y = hold$x, z = t(matrix(z, ncol = hold$ny, 
            nrow = hold$nx)), xlab = hold$ylab, ylab = hold$xlab, 
            main = main.title)
    }
    out
}
"bisection.search" <-
function (x1, x2, f, tol = 1e-07, niter = 25, f.extra = NA, upcross.level = 0) 
{
    f1 <- f(x1, f.extra) - upcross.level
    f2 <- f(x2, f.extra) - upcross.level
    if (f1 > f2) 
        stop(" f1 must be < f2 ")
    iter <- niter
    for (k in 1:niter) {
        xm <- (x1 + x2)/2
        fm <- f(xm, f.extra) - upcross.level
        if (fm < 0) {
            x1 <- xm
            f1 <- fm
        }
        else {
            x2 <- xm
            f2 <- fm
        }
        if (abs(fm) < tol) {
            iter <- k
            break
        }
    }
    xm <- (x1 + x2)/2
    fm <- f(xm, f.extra) - upcross.level
    list(x = xm, fm = fm, iter = iter)
}
"bplot" <-
function (x, by,style = "tukey", outlier = TRUE, plot = TRUE, ...) 
{
    obj <- stats.bplot(x, style = style, outlier = outlier, by=by)
    if (plot) {
        bplot.obj(obj, ...)
    }
    else {
        return(obj)
    }
    invisible()
}
"bplot.obj" <-
function (data, pos = NA, width = NULL, labels = NULL, srt = NULL, 
    add = FALSE, space = 0.25, sort.names = FALSE, xlab = "", ylab = "", 
    label.cex = 1, xaxt = "n", outlier = TRUE, horizontal = FALSE, ...) 
{
    cols <- length(data)
    range.data <- c(NA, NA)
    if (is.null(labels)) {
        labels <- names(data)
    }
    if (is.na(pos[1])) {
        pos <- 1:cols
        if (sort.names) {
            pos <- order(labels)
        }
    }
    if (is.null(width)) {
        width <- min(diff(sort(pos))) * space
        if (cols == 1) 
            width <- space
    }
    if (length(width) == 1) 
        width <- rep(width, cols)
    if (!add) {
        for (k in 1:cols) {
            range.data <- range(c(range.data, data[[k]]$range), 
                na.rm = TRUE)
        }
        temp1 <- range.data
        temp2 <- range(c(pos - (0.5 * width)/space, pos + (0.5 * 
            width)/space))
        if (horizontal) {
            plot(temp1, temp2, type = "n", yaxt = xaxt, xlab = xlab, 
                ylab = ylab, ...)
        }
        else {
            plot(temp2, temp1, type = "n", xaxt = xaxt, xlab = xlab, 
                ylab = ylab, ...)
        }
    }
    for (i in 1:cols) {
        draw.bplot.obj(data[[i]], width[i], pos[i], outlier = outlier, 
            horizontal = horizontal)
    }
    if (label.cex > 0) {
        if (is.null(srt)) {
            if (length(labels) > 7) {
                srt <- 90
            }
            else {
                srt <- 0
            }
        }
        if (horizontal) {
            axis.loc <- 2
        }
        else {
            axis.loc <- 1
        }
        axis(axis.loc, pos, labels, tick = FALSE, srt = srt, adj = 0.5, 
            cex = label.cex)
    }
    invisible()
}
"bplot.xy" <-
function (x, y, N = 10, breaks = pretty(x, N,eps.correct=1), style = "tukey", 
    outlier = TRUE, plot = TRUE, xaxt = "s", ...) 
{
    out <- list()
    NBIN <- length(breaks) - 1
    centers <- (breaks[1:NBIN] + breaks[2:(NBIN + 1)])/2
    obj <- as.list(1:NBIN)
    names(obj) <- format(1:NBIN)
    for (k in 1:NBIN) {
        obj[[k]] <- describe.bplot(y[x < breaks[k + 1] & x > 
            breaks[k]], style = style, outlier = outlier)
    }
    if (plot) {
        bplot.obj(obj, pos = centers, label.cex = 0, outlier = outlier, 
            , xaxt = xaxt, ...)
    }
    else {
        return(list(centers = centers, breaks = breaks, bplot.obj = obj))
    }
    invisible()
}
"cat.matrix" <-
function (mat, digits = 8) 
{
    nc <- ncol(mat)
    temp <- matrix(match(c(signif(mat, digits)), unique(c(signif(mat, 
        digits)))), ncol = nc)
    temp2 <- format(temp[, 1])
    if (nc > 1) {
        for (k in 2:nc) {
            temp2 <- paste(temp2, temp[, k], sep = "X")
        }
    }
    match(temp2, unique(temp2))
}
"cat.to.list" <-
function (x, a) 
{
    a <- as.character(a)
    label <- unique(a)
    out <- as.list(1:length(label))
    names(out) <- label
    for (k in 1:length(label)) {
        out[[k]] <- x[label[k] == a]
        if (length(out[[k]]) == 0) 
            out[[k]] <- NA
    }
    out
}
"ceiling2" <-
function (m) 
{
    if (m < 1) 
        return(NA)
    M <- 1
    while (M < m) {
        M <- M * 2
    }
    M
}
"conjugate.gradient" <-
function (b, multAx, start = NULL, tol = 1e-05, kmax = 25, verbose = TRUE, 
    ...) 
{
    call <- match.call()
    if (is.null(start)) {
        x <- rep(0, length(y))
        r <- b
    }
    else {
        x <- start
        r <- b - multAx(x, ...)
    }
    p <- r
    rho <- rep(NA, kmax + 1)
    rho[1 + (0)] <- sum(r^2)
    test <- sqrt(sum(b^2)) * tol
    niter <- 1
    k <- 0
    for (k in 1:kmax) {
        niter <- niter + 1
        if (k != 1) {
            beta <- rho[1 + (k - 1)]/rho[1 + (k - 2)]
            p <- r + beta * p
        }
        w <- multAx(p, ...)
        alpha <- rho[1 + (k - 1)]/(sum(p * w))
        x <- x + alpha * p
        r <- r - alpha * w
        rho[1 + k] <- sum(r^2)
        if (verbose) {
            cat("iter", k, " crit : ", signif(sqrt(rho[1 + k]), 
                4), signif(test, 4), fill = TRUE)
        }
        if (sqrt(rho[1 + k]) < test) {
            niter <- k + 1
            break
        }
    }
    list(call = call, x = x, residuals = r, niter, conv = list(rho = rho, 
        test = test, maxiter = kmax, niter = niter))
}
"cover.design" <-
function (R, nd, nruns = 1, nn = TRUE, num.nn = 100, fixed = NULL, 
    scale.type = "unscaled", R.center, R.scale, P = -20, Q = 20, 
    start = NULL, DIST = NULL, return.grid = TRUE, return.transform = TRUE, 
    max.loop = 20, verbose=FALSE) 
{
    if (!is.null(start) && is.matrix(start)) {
        if (any(duplicated.array(start))) 
            stop("Error: start must not have duplicate rows")
        start <- rowmatch(start, R)
        if (any(is.na(start))) 
            stop("Error: Starting design must be a subset of R")
    }
    R.orig <- R
    R <- as.matrix(R)
# some checks on inputs 
    if( nd >= nrow( R)) {
       stop(" number of design points >= the number of candidates")}
    if (any(duplicated.array(R))) 
        stop("Error: R must not have duplicate rows")
    if (num.nn >= (nrow(R)-nd)) {
        nn <- FALSE
        warning(
"Number of nearst neighbors (nn) reduced to the actual number of candidates")
} 
    if (is.null(DIST)) 
        DIST <- function(x, y) {
            rdist(x, y)
        }
    id <- 1:nrow(R)
    if (!is.null(start)) 
        nd <- length(start)
    if (is.null(fixed)) 
        n <- nd
    else {
        n <- nd + length(fixed)
    }
    R <- transformx(R, scale.type, R.center, R.scale)
    transform <- attributes(R)
    saved.crit <- rep(NA, nruns)
    saved.designs <- matrix(NA, nrow = nruns, ncol = n)
    saved.hist <- list(1:nruns)

     if( verbose) { cat( dim(R), fill=TRUE)}
#
# do nruns with initial desing drawn at random
#
# in this code Dset are the indices of the design
# Cset are the complement set of indices indicating the candidate points 
# no used in the design
#
    for (RUNS in 1:nruns) {
        if (is.null(start)) {
            if (!is.null(fixed)) {
                Dset <- sample((1:nrow(R))[-fixed], nd)
                Dset <- c(Dset, fixed)
            }
            else Dset <- sample(1:nrow(R), nd)
        }
        else {
            if (length(start) > nd) 
                stop("Error: the start matrix must have nd rows")
            Dset <- start
            if (!is.null(fixed)) 
                Dset <- c(Dset, fixed)
        }
        design.original <- R.orig[Dset, ]
        Dset.orginal <- Dset
        Cset <- id[-Dset]
        dist.mat <- DIST(R[Cset, ], R[Dset, ])
        rs <- dist.mat^P %*% rep(1, n)
        crit.i <- crit.original <- sum(rs^(Q/P))^(1/Q)
        CRIT <- rep(NA, length(Cset))
        CRIT.temp <- rep(NA, length(Cset))
        hist <- matrix(c(0, 0, crit.i), ncol = 3, nrow = 1)
        loop.counter <- 1
        repeat {
            for (i in 1:nd) {
# loop over current design points looking for a productive swap
                Dset.i <- matrix(R[Dset[i], ], nrow = 1)
if( verbose) { cat( "design point", i, Dset.i,fill=T)}
                partial.newrow <- sum(DIST(Dset.i, R[Dset[-i], 
                  ])^P)
                rs.without.i <- rs - c(DIST(Dset.i, R[-Dset, 
                  ])^P)
                if (nn) 
                  vec <- (1:length(Cset))[order(dist.mat[, i])[1:num.nn]]
                else vec <- 1:length(Cset)
                for (j in vec) {
# loop over possible candidates to swap with design point
                  Cset.j <- matrix(R[Cset[j], ], nrow = 1)
                  newcol <- c(DIST(Cset.j, R[c(-Dset, -Cset[j]), 
                    ])^P)
                  CRIT[j] <- (sum((rs.without.i[-j] + newcol)^(Q/P)) + 
                    (DIST(Cset.j, Dset.i)^P + partial.newrow)^(Q/P))^(1/Q)
if( verbose) { cat( j," ")}
                }
                best <- min(CRIT[!is.na(CRIT)])

                best.spot <- Cset[CRIT == best][!is.na(Cset[CRIT == 
                  best])][1]
if( verbose) { cat( i,"best found ", best," at",  best.spot, fill=T)}
                crit.old <- crit.i
# check if the best swap is really better thatn what you already have. 
                if (best < crit.i) {
if( verbose) { cat( i,"best swapped ",fill=T)}
                  crit.i <- best
                  hist <- rbind(hist, c(Dset[i], best.spot, crit.i))
                  Dset[i] <- best.spot
                  Cset <- id[-Dset]
                  dist.mat <- DIST(R[Cset, ], R[Dset, ])
                  rs <- (dist.mat^P) %*% rep(1, n)
                }
            }
            if ((crit.i == crit.old) | (loop.counter >= max.loop)) 
                break
            loop.counter <- loop.counter + 1
        }
        saved.crit[RUNS] <- crit.i
        saved.designs[RUNS, ] <- Dset
        saved.hist[[RUNS]] <- hist
    }
    ret <- (1:nruns)[saved.crit == min(saved.crit)]
    if (length(ret) > 1) {
        print("Greater than 1 optimal design; keeping first one......")
        ret <- ret[1]
    }
    crit.i <- saved.crit[ret]
    hist <- saved.hist[[ret]]
    nhist <- nrow(hist)
    nloop <- nruns
    hist <- cbind(c(0:(nrow(hist) - 1)), hist)
    dimnames(hist) <- list(NULL, c("step", "swap.out", "swap.in", 
        "new.crit"))
    out.des <- R[saved.designs[ret, ], ]
    out.des <- unscale(out.des, transform$x.center, transform$x.scale)
    out <- list(design = out.des, call = match.call(), best.id = c(saved.designs[ret, 
        ]), fixed = fixed, opt.crit = crit.i, start.design = design.original, 
        start.crit = crit.original, history = hist, other.designs = saved.designs, 
        other.crit = saved.crit, DIST = DIST, nn = nn, num.nn = num.nn, 
        P = P, Q = Q, nhist = nhist - 1, nloop = (nloop - 1)/n)
    if (return.grid) 
        out$grid <- R.orig
    if (return.transform) 
        out$transform <- transform
    class(out) <- "spatial.design"
    out
}
"describe" <-
function (x) 
{
    lab <- c("N", "mean", "Std.Dev.", "min", "Q1", "median", 
        "Q3", "max", "missing values")
    if (missing(x)) {
        return(lab)
    }
    temp <- rep(0, length(lab))
    xt <- x[!is.na(x)]
    ix <- order(xt)
    n <- length(xt)
    if (!is.numeric(xt) || all(is.na(x))) {
        return(c(n, rep(NA, length(lab) - 2), length(x) - length(xt)))
    }
    if (n == 1) {
        return(c(n, xt[1], NA, rep(xt[1], 5), length(x) - length(xt)))
    }
    else {
        return(c(n, mean(xt), sqrt(var(xt)), min(xt), quantile(xt, 
            c(0.25, 0.5, 0.75)), max(xt), length(x) - length(xt)))
    }
}
"describe.bplot" <-
function (temp, style = "tukey", outlier = TRUE) 
{
    obj <- list()
    temp <- temp[!is.na(temp)]
    obj$N <- length(temp)
    obj$out <- numeric(0)
    obj$style <- style
if( obj$N <1) { obj$range<- NA
return( obj)}
    obj$range <- range(temp)
    if (style == "quantile") {
        quant <- c(0.05, 0.25, 0.5, 0.75, 0.95)
        out$bb <- quantile(temp, quant)
        if ((length(temp) > 5) & outlier) {
            obj$out <- temp[(temp < bb[1]) | (temp > bb[5])]
        }
        else obj$out <- temp
    }
    if (style == "tukey") {
        quant <- c(0.05, 0.25, 0.5, 0.75, 0.95)
# old line        bb <- quantile(temp, quant)
        obj$bb <- bb <- quantile(temp, quant)
        iqr <- bb[4] - bb[2]
        bb[1] <- min(temp[temp >= bb[2] - 1.5 * iqr])
        bb[5] <- max(temp[temp <= bb[4] + 1.5 * iqr])
        obj$bb <- bb
        if ((length(temp) > 5) & outlier) {
            obj$out <- temp[(temp < bb[2] - 3 * iqr) | (temp > 
                bb[4] + 3 * iqr)]
        }
        else obj$out <- temp
    }
    obj
}
double.exp<- function(x) {
# double exponential weight function 
       .5* exp(-abs(x))
    }
"draw.bplot" <-
function (temp, width, xpos, outlier = TRUE, style = "tukey") 
{
if( temp$N< 1) return()

    if (style == "quantile") {
        temp <- temp[!is.na(temp)]
        quant <- c(0.05, 0.25, 0.5, 0.75, 0.95)
        bb <- quantile(temp, quant)
        mid <- xpos
        low <- mid - width * 0.5
        high <- mid + width * 0.5
        if (length(temp) > 5) {
            y <- c(bb[1], bb[1], NA, bb[1], bb[2], NA, bb[2], 
                bb[2], bb[4])
            x <- c(high, low, NA, mid, mid, NA, high, low, low)
            y <- c(y, bb[4], bb[2], bb[3], bb[3], NA, bb[4], 
                bb[5], bb[5], bb[5])
            x <- c(x, high, high, high, low, NA, mid, mid, high, 
                low)
            lines(x, y)
        }
        if (length(temp) > 5) {
            outs <- temp[(temp < bb[1]) | (temp > bb[5])]
        }
        else outs <- temp
        olen <- length(outs)
        if ((olen > 0) & outlier) 
            points(rep(mid, olen), outs)
    }
    if (style == "tukey") {
        temp <- temp[!is.na(temp)]
        quant <- c(0.05, 0.25, 0.5, 0.75, 0.95)
        bb <- quantile(temp, quant)
        iqr <- bb[4] - bb[2]
        mid <- xpos
        low <- mid - width * 0.5
        high <- mid + width * 0.5
        bb[1] <- min(temp[temp >= bb[2] - 1.5 * iqr])
        bb[5] <- max(temp[temp <= bb[4] + 1.5 * iqr])
        if (length(temp) > 5) {
            y <- c(bb[1], bb[1], NA, bb[1], bb[2], NA, bb[2], 
                bb[2], bb[4])
            x <- c(high, low, NA, mid, mid, NA, high, low, low)
            y <- c(y, bb[4], bb[2], bb[3], bb[3], NA, bb[4], 
                bb[5], bb[5], bb[5])
            x <- c(x, high, high, high, low, NA, mid, mid, high, 
                low)
            lines(x, y)
        }
        if (length(temp) > 5) {
            outs <- temp[(temp < bb[2] - 3 * iqr) | (temp > bb[4] + 
                3 * iqr)]
        }
        else outs <- temp
        olen <- length(outs)
        if ((olen > 0) & outlier) 
            points(rep(mid, olen), outs)
    }
}
"draw.bplot.obj" <-
function (obj, width, xpos, outlier = TRUE, horizontal=FALSE) 
{
    N <- obj$N
    bb <- obj$bb
    mid <- xpos
    low <- mid - width * 0.5
    high <- mid + width * 0.5
    if (N > 5) {
        y <- c(bb[1], bb[1], NA, bb[1], bb[2], NA, bb[2], bb[2], 
            bb[4])
        x <- c(high, low, NA, mid, mid, NA, high, low, low)
        y <- c(y, bb[4], bb[2], bb[3], bb[3], NA, bb[4], bb[5], 
            bb[5], bb[5])
        x <- c(x, high, high, high, low, NA, mid, mid, high, 
            low)
   if( horizontal) 
    {  lines(y, x)}
    else{      lines(x, y)}
}
#
#
#
    outs <- obj$out
    olen <- length(outs)
    if ((olen > 0) & outlier) 
    {
         if( horizontal){
         points(outs,rep(mid, olen))}
         else{
         points(rep(mid, olen), outs)}
    }
}
dyadic.2check<- function( m,n,cut.p=2){
# checks that n is of the form 
# n=p*2^m where p <= cut.p
m2<- as.integer(m)
n2<- as.integer(n)

while( (n2 > cut.p) &(m2 > cut.p)) {
if((m2%%2!=0)|(n2%%2!=0) ) {
cat(n,"and" , m, 
"must equal p*2^L where p is less than or equal to ", cut.p
, fill=TRUE)
return(FALSE)
}
m2<- m2/2
n2<- n2/2

}
return(TRUE)
}

  
dyadic.check<- function( n,cut.p=2){
# checks that n is of the form 
# n=p*2^m where p <= cut.p
n2<- as.integer(n)
while( n2 > cut.p) {
if(n2%%2!=0 ) {
cat(n, 
"must equal p*2^m where p is less than or equal to ", cut.p
, fill=TRUE)
return(FALSE)
}
n2<- n2/2
}
return(TRUE)
}

  
"exp.cov.F" <-
function (x1, x2, theta = rep(1, ncol(x1)), p = 1, C = NA) 
{
    if (!is.matrix(x1)) 
        x1 <- as.matrix(x1)
    if (missing(x2)) 
        x2 <- x1
    if (!is.matrix(x2)) 
        x2 <- as.matrix(x2)
    if (length(theta) == 1) 
        theta <- rep(theta, ncol(x1))
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    x1 <- t(t(x1)/theta)
    x2 <- t(t(x2)/theta)
    par <- p
    if (is.na(C[1])) {
        exp(-rdist(x1, x2)^p)
    }
    else {
        .Fortran("multeb", nd = as.integer(d), x1 = as.double(x1), 
            n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
            par = as.double(par), c = as.double(C), h = as.double(rep(0, 
                n1)), work = as.double(rep(0, n2)))$h
    }
}
"exp.cov" <-
function (x1, x2, theta = rep(1, ncol(x1)), p = 1, C = NA) 
{
    if (!is.matrix(x1)) 
        x1 <- as.matrix(x1)
    if (missing(x2)) 
        x2 <- x1
    if (!is.matrix(x2)) 
        x2 <- as.matrix(x2)
    if (length(theta) == 1) 
        theta <- rep(theta, ncol(x1))
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    x1 <- t(t(x1)/theta)
    x2 <- t(t(x2)/theta)
    par <- p
    if (is.na(C[1])) {
        exp(-rdist(x1, x2)^p)
    }
    else {
        .Fortran("multeb", nd = as.integer(d), x1 = as.double(x1), 
            n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
            par = as.double(par), c = as.double(C), h = as.double(rep(0, 
                n1)), work = as.double(rep(0, n2)))$h
    }
}
"exp.cov.S" <-
function (x1, x2, theta = 1) 
{
    exp(-rdist(x1, x2)/theta)
}
"exp.earth.cov" <-
function (x1, x2, theta = 1) 
{
    exp(-rdist.earth(x1, x2)/theta)
}
"exp.image.cov" <-
function (ind1, ind2, Y, cov.obj = NULL, setup = FALSE, grid, ...) 
{
    if (is.null(cov.obj)) {
        dx <- grid$x[2] - grid$x[1]
        dy <- grid$y[2] - grid$y[1]
        m <- length(grid$x)
        n <- length(grid$y)
        M <- ceiling2(2 * m)
        N <- ceiling2(2 * n)
        xg <- make.surface.grid(list((1:M) * dx, (1:N) * dy))
        center <- matrix(c((dx * M)/2, (dy * N)/2), nrow = 1, 
            ncol = 2)
        out <- exp.cov(xg, center, ...)
        out <- as.surface(xg, c(out))$z
        temp <- matrix(0, nrow = M, ncol = N)
        temp[M/2, N/2] <- 1
        wght <- fft(out)/(fft(temp) * M * N)
        cov.obj <- list(m = m, n = n, grid = grid, N = N, M = M, 
            wght = wght, call = match.call())
        if (setup) {
            return(cov.obj)
        }
    }
    temp <- matrix(0, nrow = cov.obj$M, ncol = cov.obj$N)
    if (missing(ind1)) {
        temp[1:cov.obj$m, 1:cov.obj$n] <- Y
        Re(fft(fft(temp) * cov.obj$wght, inverse = TRUE)[1:cov.obj$m, 
            1:cov.obj$n])
    }
    else {
        if (missing(ind2)) {
            temp[ind1] <- Y
        }
        else {
            temp[ind2] <- Y
        }
        Re(fft(fft(temp) * cov.obj$wght, inverse = TRUE)[ind1])
    }
}
"fast.1way" <-
function (lev, y, w = rep(1, length(y))) 
{
    N <- length(y)
    tags <- lev[!duplicated(lev)]
    lev <- match(lev, tags)
    id <- order(lev)
    brk <- c(diff(lev[id]) != 0, TRUE)
    w.means <- diff(c(0, cumsum(w[id])[brk]))
    means <- diff(c(0, cumsum(y[id] * w[id])[brk]))/w.means
    n <- diff(c(0, (1:N)[brk]))
    SSE <- sum(w * (y - means[lev])^2)
    MSE <- SSE/(length(y) - length(n))
    names(means) <- tags
    names(w.means) <- tags
    list(means = means, SSE = SSE, w.means = w.means, n = n, 
        MSE = MSE, fitted.values = means[lev], tags = tags)
}
"find.upcross" <-
function (fun, fun.info, upcross.level = 0, guess = 1, tol = 1e-05) 
{
    l1 <- guess
    tr <- 0
    for (k in 1:50) {
        tr <- fun(l1, fun.info) - upcross.level
        if (tr >= 0) 
            break
        else {
            guess <- l1
        }
        l1 <- l1 * 2
    }
    if (tr < 0) {
        warning("Failed to find the upcrossing")
        return(NA)
    }
    tr <- 0
    l2 <- guess
    for (k in 1:50) {
        tr <- fun(l2, fun.info) - upcross.level
        if (tr <= 0) 
            break
        l2 <- l2/2
    }
    if (tr > 0) {
        warning("Failed to find the upcrossing")
        return(NA)
    }
    out <- bisection.search(l2, l1, fun, tol = tol, f.extra = fun.info, 
        upcross.level = upcross.level)$x
    (out)
}
"flame" <-
structure(list(x = structure(c(3, 5, 7, 9, 11, 4, 6, 8, 10, 12, 
4, 6, 8, 10, 12, 14, 5, 7, 9, 11, 13, 15, 5, 7, 9, 11, 13, 15, 
17, 7, 9, 11, 13, 15, 17, 19, 8, 10, 12, 14, 16, 18, 20, 8, 10, 
12, 14, 16, 18, 20, 22, 10, 12, 14, 16, 18, 20, 22, 24, 12, 14, 
16, 18, 20, 24, 12, 14, 16, 18, 20, 22, 24, 26, 12, 14, 16, 18, 
20, 22, 24, 26, 14, 16, 18, 20, 22, 24, 26, 28, 15, 15, 15, 15, 
15, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 21, 21, 21, 21, 
21, 21, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, 25, 25, 25, 25, 
27, 27, 27, 27, 27, 27, 27, 29, 29, 29, 29, 29, 29, 29, 29, 31, 
31, 31, 31, 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, 35, 35, 35, 
35, 35, 35, 35, 35, 37, 37, 37, 37, 37, 37, 37, 37, 39, 39, 39, 
39, 39, 39, 39, 39), .Dim = c(89, 2), .Dimnames = list(NULL, 
    c("Fuel", "O2"))), y = c(0.005, 0.017, 0.031, 0.041, 0.04, 
0.008, 0.021, 0.037, 0.042, 0.039, 0.007, 0.017, 0.032, 0.04, 
0.041, 0.035, 0.008, 0.018, 0.033, 0.041, 0.039, 0.034, 0.009, 
0.018, 0.029, 0.039, 0.041, 0.037, 0.033, 0.012, 0.023, 0.035, 
0.04, 0.04, 0.033, 0.033, 0.015, 0.025, 0.035, 0.041, 0.039, 
0.033, 0.03, 0.015, 0.022, 0.033, 0.039, 0.04, 0.035, 0.03, 0.029, 
0.019, 0.03, 0.037, 0.041, 0.038, 0.034, 0.029, 0.029, 0.027, 
0.034, 0.041, 0.039, 0.028, 0.026, 0.024, 0.032, 0.038, 0.039, 
0.035, 0.031, 0.027, 0.025, 0.023, 0.029, 0.037, 0.039, 0.038, 
0.033, 0.028, 0.024, 0.029, 0.036, 0.038, 0.039, 0.034, 0.029, 
0.025, 0.023)), .Names = c("x", "y"))
"gauss.cov" <-
function( ...){ exp.cov(..., p=2)}
"gcv.Krig" <-
function (out, lambda.grid = NA, cost = 1, nstep.cv = 80, rmse = NA, 
    verbose = FALSE, tol = 1e-05, offset = 0, y = NULL, lambda = NA) 
{
    nt <- out$nt
    np <- out$np
    N <- out$N
    D <- out$matrices$D
    if (is.null(y)) {
#
# use the data from the Krig object. 
        u <- out$matrices$u
        shat.pure.error <- out$shat.pure.error
        pure.ss <- out$pure.ss
    }
    else {
#
#recompute the fit for new y data 
        out2 <- Krig.updateY(out, y)
        u <- out2$u
        shat.pure.error <- out2$shat.pure.error
        pure.ss <- out2$pure.ss
    }
#
# If lambda grid is not specified find a resaonable grid of lambda's for
# the grid search
    if (is.na(lambda.grid[1])) {
        l1 <- Krig.df.to.lambda(nt+.001, D)
        l2 <- Krig.df.to.lambda((np - offset) * 0.95, D)
        lambda.grid <- exp(seq(log(l2), log(l1), , nstep.cv))
    }

    nl <- length(lambda.grid)
    nd <- length(D)
    trA <- MSE <- RSS.model <- rep(NA, nl)
    Dl <- rep(NA, nd)
#
# loop through grid of lambdas and find MSE and traces
    for (k in 1:nl) {
        Dl <- lambda.grid[k] * D
        RSS.model[k] <- sum(((u * Dl)/(1 + Dl))^2)
        trA[k] <- sum(1/(1 + Dl))
    }

#
    RSS <- pure.ss + RSS.model
    MSE <- RSS.model/length(D)
    if((N - length(D)) > 0) {
        MSE <- MSE + pure.ss/(N - length(D))
    }
    MSE.one <- (pure.ss + RSS.model)/N
# denominator for grid of lambda values for the GCV function 
    den <- 1 - (cost * (trA - nt - offset) + nt)/length(D)
    den.one <- 1 - (cost * (trA - nt - offset) + nt)/N
# different versions of GCV function based on how replicate data is 
# handled
    V <- ifelse(den > 0, (MSE)/den^2, NA)
    V.one <- ifelse(den.one > 0, MSE.one/den.one^2, NA)
    V.model <- ifelse(den > 0, ((RSS.model/length(D))/den^2), 
        NA)
# GCV type estimate of sigma
    shat <- sqrt(RSS/(N - trA))
# grid used for subsequent refinements.    
    gcv.grid <- cbind(lambda.grid, trA, V, V.one, V.model, shat)
    gcv.grid <- as.data.frame(gcv.grid)
    names(gcv.grid) <- c("lambda", "trA", "GCV", "GCV.one", "GCV.model", 
        "shat")
#
# list with information to pass to subsequent refinements
#
    info <- list(matrices = list(D = D, u = u), N = N, nt = nt, 
        cost = cost, pure.ss = pure.ss, shat.pure.error = shat.pure.error, 
        offset = offset)
    if (verbose) 
        print(info)
#
# setup output matrix of results 
   lambda.est <- matrix(ncol = 4, nrow = 5, dimnames = list(c("GCV", 
        "GCV.model", "GCV.one", "RMSE", "pure error"), c("lambda", 
        "trA", "GCV", "shat")))
#
# refined estimate for GCV  
   lambda.est[1, 1] <- Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV, 
        Krig.fgcv, tol = tol, verbose = verbose)
#
# If there are replicates find refined estimates for the "model" 
# only  GCV
    if (!is.na(shat.pure.error)) {
        temp <- gcv.grid$GCV.model
        lambda.est[2, 1] <- Krig.find.gcvmin(info, lambda.grid, 
            temp, Krig.fgcv.model, tol = tol, verbose = verbose)
    }
#
# GCV based on really leaving just one observation out this will 
# agree with  lambda.est[1, 1] if there are no replicates
#
    lambda.est[3, 1] <- Krig.find.gcvmin(info, lambda.grid, gcv.grid$GCV.one, 
        Krig.fgcv.one, tol = tol, verbose = verbose)
#
    lambda.rmse <- NA
    lambda.pure.error <- NA
# 
# If  RMSE supplied find lambda to match this  value

   if (!is.na(rmse)) {
        if (all(gcv.grid$shat < rmse) | all(gcv.grid$shat > rmse)) {
            guess <- NA
        }
        else {
            guess <- max(gcv.grid$lambda[gcv.grid$shat < rmse])
        }
        if (verbose) {
            print(rmse)
            print(guess)
        }
        if (!is.na(guess)) {
            lambda.rmse <- find.upcross(Krig.fs2hat, info, upcross.level = rmse^2, 
                guess = guess, tol = tol * rmse^2)
            lambda.est[4, 1] <- lambda.rmse
        }
        else {
            warning("Value of rmse is outside possible range")
        }
    }
# 
# If  replicates find lambda to match this  value
    if (!is.na(shat.pure.error)) {
        if (all(gcv.grid$shat < shat.pure.error) | all(gcv.grid$shat > 
            shat.pure.error)) {
            guess <- NA
        }
        else {
            guess <- max(gcv.grid$lambda[gcv.grid$shat < shat.pure.error])
        }
        if (!is.na(guess) & (guess != -Inf)) {
            lambda.pure.error <- find.upcross(Krig.fs2hat, info, 
                upcross.level = shat.pure.error^2, guess = guess, 
                tol = tol * shat.pure.error^2)
            lambda.est[5, 1] <- lambda.pure.error
        }
        else {
            warning("Value of pure error estimate  is outside possible range")
        }
    }
# 
# fix up output table adding in GCV minimum values
#
    for (k in 1:5) {
        lam <- lambda.est[k, 1]
        if (!is.na(lam)) {
            lambda.est[k, 2] <- Krig.ftrace(lam, D)
            if (k == 1 | k > 3) {
                lambda.est[k, 3] <- Krig.fgcv(lam, info)
            }
            if (k == 2) {
                lambda.est[k, 3] <- Krig.fgcv.model(lam, info)
            }
            if (k == 3) {
                lambda.est[k, 3] <- Krig.fgcv.one(lam, info)
            }
            lambda.est[k, 4] <- sqrt(Krig.fs2hat(lam, info))
        }
    }
    list(gcv.grid = gcv.grid, lambda.est = lambda.est, lambda.best = lambda.est[1, 
        1])
}
"gcv.sreg" <-
function(out, lambda.grid = NA, cost = 1, nstep.cv = 20, rmse = NA, offset = 0,
	trmin = NA, trmax = NA, verbose = TRUE, tol = 1.0000000000000001e-05,
	find.min = TRUE, method = "GCV")
{
	shat.pure.error <- out$shat.pure.error
	pure.ss <- out$pure.ss
	nt <- 2
	np <- out$np
	N <- out$N
	out$cost <- cost
	out$offset <- offset
	if(is.na(trmin))
		trmin <- 2.0499999999999998
	if(is.na(trmax))
		trmax <- out$np * 0.94999999999999996
	#
	# create a reasonable grid for the GCV search if not supplied
	#
	if(is.na(lambda.grid[1])) {
		l2 <- sreg.df.to.lambda(trmax, out$x, out$wt)
		l1 <- sreg.df.to.lambda(trmin, out$x, out$wt)
		lambda.grid <- exp(seq(log(l2), log(l1),  , nstep.cv))
	}
	#
	# done with finding a good default range for lambda
	#
	#
	# begin grid evaluation over lambda
	#
	if(verbose) {
		cat(l1, l2, fill = TRUE)
	}
	nl <- length(lambda.grid)
	V <- V.model <- V.one <- trA <- MSE <- RSS.model <- rep(NA, nl)
	for(k in 1:nl) {
		temp <- sreg.fit(lambda.grid[k], out)
		RSS.model[k] <- temp$rss
		trA[k] <- temp$trace
		V[k] <- temp$gcv
		V.one[k] <- temp$gcv.one
		V.model[k] <- temp$gcv.model
	}
	RSS <- RSS.model + pure.ss
	#
	# The following three versions all agree if the are unique observations
	# and a full spline basis 
	#
	# V.one the real leave-one-out GCV even if there are replicates etc.
	# V.model This is GCV based on collapsing to rep group means 
	#
	shat <- sqrt(RSS/(N - trA))
	#
	#
	gcv.grid <- cbind(lambda.grid, trA, V, V.one, V.model, shat)
	dimnames(gcv.grid) <- list(NULL, c("lambda", "trA", "GCV", "GCV.one",
		"GCV.model", "shat"))
	#	gcv.grid <- as.data.frame(gcv.grid)
	if(verbose) {
		print(gcv.grid)
	}
	if(!find.min) {
		return(list(gcv.grid = gcv.grid))
	}
	lambda.est <- matrix(ncol = 4, nrow = 5, dimnames = list(c("GCV", 
		"GCV.model", "GCV.one", "RMSE", "pure error"), c("lambda",
		"trA", "GCV", "shat")))
	#
	# refine various GCV estimates of lambda
	# Krig version is generic enough where it can be used unmodified.
	lambda.est[1, 1] <- Krig.find.gcvmin(out, lambda.grid, gcv.grid[, "GCV"
		], sreg.fgcv, tol = tol, verbose = verbose)
	if(verbose) {
		cat(lambda.est[1, 1], fill = TRUE)
	}
	if(!is.na(shat.pure.error)) {
		lambda.est[2, 1] <- Krig.find.gcvmin(out, lambda.grid, gcv.grid[
			, "GCV.model"], sreg.fgcv.model, tol = tol, verbose = 
			verbose)
		if(verbose) {
			cat(lambda.est[2, 1], fill = TRUE)
		}
	}
	lambda.est[3, 1] <- Krig.find.gcvmin(out, lambda.grid, gcv.grid[, 
		"GCV.one"], sreg.fgcv.one, tol = tol, verbose = verbose)
	#
	#
	#    Find lambda to match RMSE if required
	#
	lambda.rmse <- NA
	lambda.pure.error <- NA
	if(!is.na(rmse)) {
		guess <- max(gcv.grid[gcv.grid[, "shat"] < rmse, "lambda"])
		if(verbose) {
			print(rmse)
			print(guess)
		}
		if(!is.na(guess)) {
			lambda.rmse <- find.upcross(sreg.fs2hat, out, 
				upcross.level = rmse^2, guess = guess, tol = 
				tol * rmse^2)
			lambda.est[4, 1] <- lambda.rmse
		}
		else {
			warning("Value of rmse is outside possible range")
		}
	}
	if(!is.na(shat.pure.error)) {
		guess <- max(gcv.grid[gcv.grid[, "shat"] < shat.pure.error,
			"lambda"])
		if(!is.na(guess)) {
			lambda.pure.error <- find.upcross(sreg.fs2hat, out,
				upcross.level = shat.pure.error^2, guess = 
				guess, tol = tol * shat.pure.error^2)
			lambda.est[5, 1] <- lambda.pure.error
		}
		else {
			warning("Value of pure error estimate  \nis outside possible range"
				)
		}
	}
	#
	##
	#
	if(verbose) {
		print(lambda.est)
	}
	for(k in 1:5) {
		lam <- lambda.est[k, 1]
		if(!is.na(lam)) {
			temp <- sreg.fit(lam, out)
			lambda.est[k, 2] <- temp$trace
			if((k == 1) | (k > 3)) {
				lambda.est[k, 3] <- temp$gcv
			}
			if(k == 2) {
				lambda.est[k, 3] <- temp$gcv.model
			}
			if(k == 3) {
				lambda.est[k, 3] <- temp$gcv.one
			}
			lambda.est[k, 4] <- temp$shat
		}
	}
	list(gcv.grid = gcv.grid, lambda.est = lambda.est, lambda.best = 
		lambda.est[method, 1])
}
"golden.section.search" <-
function (ax, bx, cx, f, niter = 25, f.extra = NA, tol = 1e-05) 
{
    r <- 0.61803399
    con <- 1 - r
    x0 <- ax
    x3 <- cx
    if (abs(cx - bx) > abs(bx - ax)) {
        x1 <- bx
        x2 <- bx + con * (bx - ax)
    }
    else {
        x2 <- bx
        x1 <- bx - con * (bx - ax)
    }
    f1 <- f(x1, f.extra)

    f2 <- f(x2, f.extra)
    iter <- niter
    for (k in 1:niter) {
#cat( x1,f1, x2,f2, fill=TRUE)
        if (f2 < f1) {
            x0 <- x1
            x1 <- x2
            x2 <- r * x1 + con * x3
            f0 <- f1
            f1 <- f2
            f2 <- f(x2, f.extra)
        }
        else {
            x3 <- x2
            x2 <- x1
            x1 <- r * x2 + con * x0
            f3 <- f2
            f2 <- f1
            f1 <- f(x1, f.extra)
        }
        if (abs(f2 - f1) < tol) {
            iter <- k
            break
        }
    }
    if (f1 < f2) {
        golden <- f1
        xmin <- x1
    }
    else {
        golden <- f2
        xmin <- x2
    }
    list(x = xmin, fmin = golden, iter = iter)
}
"grey.level" <-
function( n) { grey( seq( 0,1,,n))}
"image.count" <-
function (x, grid = NULL, nrow = 64, ncol = 64) 
{
    Z <- rep(1, nrow(x))
    if (is.null(x) & is.null(grid)) {
        grid <- list(x = 1:nrow, y = 1:ncol)
    }
    if (!is.null(x) & is.null(grid)) {
        temp <- Krig.discretize(x, nrow, ncol)
        grid <- temp$grid
        ind <- temp$index
    }
    if (!is.null(x) & !is.null(grid)) {
        temp <- Krig.discretize(x, grid = grid)
        ind <- temp$index
    }
    rep.info <- cat.matrix(ind)
    uniquerows <- !duplicated(rep.info)
    if (sum(uniquerows) < length(Z)) {
        ind <- ind[uniquerows, ]
        Z <- fast.1way(rep.info, Z)$n
    }
    m <- length(grid$x)
    n <- length(grid$y)
    temp <- matrix(NA, nrow = m, ncol = n)
    temp[ind] <- Z
    call <- match.call()
    list(x = grid$x, y = grid$y, z = temp, call = call)
}
"image.plot" <-
function (..., add = FALSE, nlevel = 64, legend.shrink = 0.9, 
    legend.width = 0.05, graphics.reset = FALSE, horizontal = FALSE, 
    offset = 2 * legend.width, bigplot = NULL, smallplot = NULL, 
    legend.only = FALSE, col = topo.colors(nlevel)) 
{
    old.par <- par(no.readonly = TRUE)
    info <- image.plot.info(...)
    if (add) 
        big.plot <- old.par$plt
    if (legend.only) 
        graphics.reset <- TRUE
#
# compute what the layout should be. 
#
    temp <- image.plot.plt(add = add, legend.shrink = legend.shrink, 
        legend.width = legend.width, horizontal = horizontal, 
        offset = offset, bigplot = bigplot, smallplot = smallplot)
    smallplot <- temp$smallplot
    bigplot <- temp$bigplot
    if (!legend.only) {

        if (!add) {
            par(plt = bigplot)
        }
#
# the call to the good 'ole image function
#
        image(..., add = add, col = col)
        big.par <- par(no.readonly = TRUE)
    }
    if ((smallplot[2] < smallplot[1]) | (smallplot[4] < smallplot[3])) {
        par(old.par)
        stop("plot region too small to add legend\n")
    }
#
# having no drawn the image in the right size plotting region 
# switch to what is left over and add the legend
# note the legend strip is actually just another skiiny image plot!
#
    temp <- list(...)
    iy <- seq(info$zlim[1], info$zlim[2], , nlevel)
    iz <- matrix(iy, nrow = 1, ncol = length(iy))
    ix <- 1

    if (!horizontal) {
# this is a vertical legend
        par(new = TRUE, pty = "m", plt = smallplot, err = -1)
        image(ix, iy, iz, xaxt = "n", yaxt = "n", xlab = "", 
            ylab = "", col = col)
        axis(4, mgp = c(3, 0, 0))
    }
    else {
# this is a horizontal legend
        par(new = TRUE, pty = "m", plt = smallplot, err = -1)
        image(iy, ix, t(iz), yaxt = "n", xlab = "", ylab = "", 
            col = col)
    }
#
# reset some of the graphics parameters. 
#
    mfg.save <- par()$mfg
    if (graphics.reset | add) {
        par(old.par)
        par(mfg = mfg.save, new = FALSE)
        invisible()
    }
    else {
# this resets plotting region to the larger image plot
#      I am not sure why the the second line is  needed but this 
#      seems to set the right plotting limits  and make sure clipping 
#      occurs...
        par(big.par)
        par( plt=big.par$plt, xpd=FALSE)
        par(mfg = mfg.save, new = FALSE)
        invisible()
    }
}
"image.plot.info" <-
function(...)
{
	temp <- list(...)
	#
	xlim <- NA
	ylim <- NA
	zlim <- NA
	#
	# go through various cases of what these can be
	#
	if(is.list(temp[[1]])) {
		xlim <- range(temp[[1]]$x, na.rm = TRUE)
		ylim <- range(temp[[1]]$y, na.rm = TRUE)
		zlim <- range(temp[[1]]$z, na.rm = TRUE)
	}
	if(is.matrix(temp[[1]])) {
		xlim <- c(0,1)
		ylim <- c(0,1)
		zlim <- range(temp[[1]], na.rm = TRUE)
	}
   if( length( temp)>=3){
	if(is.matrix(temp[[3]])) {
		xlim <- range(temp[[1]], na.rm = TRUE)
		ylim <- range(temp[[2]], na.rm = TRUE)
		zlim <- range(temp[[3]], na.rm = TRUE)
	}
}
	xthere <- match("x", names(temp))
	ythere <- match("y", names(temp))
	zthere <- match("z", names(temp))
	if(!is.na(zthere))
		zlim <- range(temp$z, na.rm = TRUE)
	if(!is.na(xthere))
		xlim <- range(temp$x, na.rm = TRUE)
	if(!is.na(ythere))
		ylim <- range(temp$y, na.rm = TRUE)
	if(!is.null(temp$zlim))
		zlim <- temp$zlim
	if(!is.null(temp$xlim))
		xlim <- temp$xlim
	if(!is.null(temp$ylim))
		ylim <- temp$ylim
	list(xlim = xlim, ylim = ylim, zlim = zlim)
}
"image.plot.plt" <-
function ( add=FALSE,  legend.shrink = 0.9, legend.width = 
0.04, horizontal = FALSE, offset = 2 * legend.width, 
    bigplot = NULL, smallplot = NULL)
{
    old.par <- par(no.readonly = TRUE)
    if (is.null(smallplot)) 
        stick <- TRUE
    else stick <- FALSE
    if (is.null(smallplot)) {
        smallplot <- old.par$plt
        if (horizontal) {
            smallplot[3] <- offset
            smallplot[4] <- smallplot[3] + legend.width
            pr <- (smallplot[2] - smallplot[1]) * ((1 - legend.shrink)/2)
            smallplot[1] <- smallplot[1] + pr
            smallplot[2] <- smallplot[2] - pr
        }
        else {
            smallplot[2] <- 1 - offset
            smallplot[1] <- smallplot[2] - legend.width
            pr <- (smallplot[4] - smallplot[3]) * ((1 - legend.shrink)/2)
            smallplot[4] <- smallplot[4] - pr
            smallplot[3] <- smallplot[3] + pr
        }
    }
    if (is.null(bigplot)) {
        bigplot <- old.par$plt
        if (!horizontal) {
            bigplot[2] <- min(bigplot[2], smallplot[1] - offset)
        }
        else {
            bottom.lines <- old.par$mar[1]
            if (bottom.lines > 0) {
                off2 <- (3 * bigplot[1])/bottom.lines
            }
            else {
                off2 <- 0
            }
            bigplot[3] <- max(bigplot[3] - off2, smallplot[4] + 
                offset)
        }
    }
    if (stick) {
        if (!horizontal) {
            dp <- smallplot[2] - smallplot[1]
            smallplot[1] <- min(bigplot[2] + offset, smallplot[1])
            smallplot[2] <- smallplot[1] + dp
        }
    }
return( list(smallplot=smallplot, bigplot=bigplot))
}
"image.smooth" <-
function (Y, wght = NULL, dx = 1, dy = 1, Nwidth = nrow(Y), Mwidth = ncol(Y), 
    kernel.function = function(x) {
        exp(-abs(x))
    }, theta = 1, grid = NULL, tol = 1e-08, xwidth = NULL, ywidth = NULL, 
    weights = NULL) 
{
    if (!is.matrix(Y)) {
        stop("Requires a matrix")
    }
    m <- nrow(Y)
    n <- ncol(Y)
    if (!is.null(grid)) {
        dx <- grid$x[2] - grid$x[1]
        dy <- grid$y[2] - grid$y[1]
    }
    if (!is.null(xwidth)) {
        Mwidth <- round(xwidth/dx)
    }
    if (!is.null(ywidth)) {
        Nwidth <- round(ywidth/dy)
    }
    if (is.null(wght)) {
        wght <- image.smooth.setup(nrow = m, ncol = n, Mwidth = Mwidth, 
            Nwidth = Nwidth, dx = dx, dy = dy, kernel.function = kernel.function, 
            theta = theta)
    }
    M <- nrow(wght)
    N <- ncol(wght)
    temp <- matrix(0, nrow = M, ncol = N)
    temp2 <- matrix(0, nrow = M, ncol = N)
    if (!is.null(weights)) {
        temp[1:m, 1:n] <- Y * weights
        temp[is.na(temp)] <- 0
        temp2[1:m, 1:n] <- ifelse(!is.na(Y), weights, 0)
    }
    else {
        temp[1:m, 1:n] <- Y
        temp[is.na(temp)] <- 0
        temp2[1:m, 1:n] <- ifelse(!is.na(Y), 1, 0)
    }
    temp <- Re(fft(fft(temp) * wght, inverse = TRUE))[1:m, 1:n]
    temp2 <- Re(fft(fft(temp2) * wght, inverse = TRUE))[1:m,1:n]
    temp <- ifelse((temp2 > tol), (temp/temp2), NA)
    if (!is.null(grid)) {
        list(x = grid$x, y = grid$y, z = temp)
    }
    else {
        temp
    }
}
"image.smooth.setup" <-
function (nrow = 64, ncol = 64, dx = 1, dy = 1, kernel.function = function(x){ exp(-abs(x))}, 
    theta = 1, Mwidth = nrow, Nwidth = ncol, ...) 
{
    m <- nrow
    n <- ncol
    M2 <- round((m + Mwidth)/2)
    N2 <- round((n + Nwidth)/2)
    M <- 2 * M2
    N <- 2 * N2
    xi <- (1:M2) * dx
    xi <- xi/theta
    yi <- (1:N2) * dy
    yi <- yi/theta
    out <- kernel.function((matrix(xi, M2, N2)^2 + matrix(yi, 
        M2, N2, byrow = TRUE)^2), ...)/theta
    out <- cbind(out, out[, N2:1])
    out <- rbind(out, out[M2:1, ])
    fft(out)/(M * N)
}
"in.poly" <-
function (xd, xp, convex.hull = FALSE, inflation=1e-7) 
{
    if (convex.hull) {
        xp <- xp[chull(xp), ]
    }
    nd <- nrow(xd)
    np <- as.integer(nrow(xp))
#
# inflate convex hull slightly to include any points actually on the hull
#
     if( convex.hull){
         xm<- matrix(c(mean(xp[,1]), mean( xp[,2])), nrow=np, ncol=2,byrow=TRUE)
         xp<- (xp- xm)*( 1+ inflation) + xm
}

    .Fortran("inpoly", nd = as.integer(nd), as.single(xd[, 1]), 
        as.single(xd[, 2]), np = np, as.single(xp[, 1]), as.single(xp[, 
            2]), ind = as.integer(rep(-1, nd)))$ind
}
"interp.surface" <-
function (obj, loc) 
{
    xg <- (obj$x)
    yg <- (obj$y)
    nx <- length(xg)
    ny <- length(yg)
    xa <- min(xg)
    xb <- max(xg)
    xr <- xb - xa
    ya <- min(yg)
    yb <- max(yg)
    yr <- yb - ya
    lx <- ((nx - 1) * (loc[, 1] - xa))/xr + 1
    ly <- ((ny - 1) * (loc[, 2] - ya))/yr + 1
    lx1 <- ifelse(lx == nx, nx - 1, trunc(lx))
    ly1 <- ifelse(ly == ny, ny - 1, trunc(ly))
    lx1 <- ifelse(lx1 < 1 | lx1 > nx, NA, lx1)
    ly1 <- ifelse(ly1 < 1 | ly1 > ny, NA, ly1)
    ex <- lx - lx1
    ey <- ly - ly1
    temp <- (obj$z[cbind(lx1, ly1)] * (1 - ex) * (1 - ey) + obj$z[cbind(lx1 + 
        1, ly1)] * (ex) * (1 - ey) + obj$z[cbind(lx1, ly1 + 1)] * 
        (1 - ex) * (ey) + obj$z[cbind(lx1 + 1, ly1 + 1)] * ex * 
        ey)
    return(temp)
}
"krig.image" <-
function (x, Y, cov.function, m = NULL, n = NULL, lambda = 0, 
    start = NULL, tol = 1e-05, kmax = 25, cov.obj = NULL, grid = NULL, 
    weights = rep(1, length(Y)), verbose = FALSE, conv.verbose = FALSE, 
    expand = 1, ...) 
{
    out <- list()
    out$call <- match.call()
    out$cov.function <- cov.function
    na.ind <- is.na(Y)
    out$na.ind <- na.ind
    out$xraw <- x[!na.ind, ]
    out$y <- Y[!na.ind]
    out$N <- length(out$y)
    out$weights <- weights[!na.ind]
    out$lambda <- lambda
    if (is.null(grid)) {
        if (is.null(cov.obj)) {
            x1r <- range(out$xraw[, 1])
            x2r <- range(out$xraw[, 2])
            if (verbose) {
                print(x1r)
                print(x2r)
            }
            out$grid <- list(x = seq(x1r[1], x1r[2], , m), y = seq(x2r[1], 
                x2r[2], , n))
        }
        else out$grid <- cov.obj$grid
    }
    else out$grid <- grid
    if (verbose) {
        print(out$grid)
    }
    if (is.null(cov.obj)) {
        cov.obj <- cov.function(grid = out$grid, setup = TRUE, ...)
    }
    out$cov.obj <- cov.obj
    out <- c(out, Krig.discretize(out$xraw, grid = out$grid, 
        expand = expand))
    if (verbose) {
        cat("row and columns of grid", fill = TRUE)
        print(c(out$m, out$n))
    }
    out <- c(out, list(x = cbind(out$grid$x[out$index[, 1]], 
        out$grid$y[out$index[, 2]])))
    if (verbose) {
        cat("results of finding indices X,y,weights, indices", 
            fill = TRUE)
        print(cbind(out$x, out$y, out$weights, out$index))
    }
    out <- c(out, Krig.replicates(out, verbose = verbose))
    out$indexM <- out$index[out$uniquerows, ]
    if (verbose) {
        cat("results of collapsing replicates", fill = TRUE)
        print(cbind(out$xM, out$yM, out$weightsM, out$indexM))
    }
    out$qr.T <- qr(cbind(rep(1, nrow(out$indexM)), out$xM))
    if (is.null(start)) {
        start <- rep(0, length(out$yM) - out$qr.T$rank)
    }
    out$multAx <- function(x, loc, cov.function, cov.obj, D, 
        qr.T) {
        temp <- qr.qy(qr.T, c(rep(0, qr.T$rank), x))
        qr.q2ty(qr.T, cov.function(loc, , temp, cov.obj = cov.obj) + 
            D * temp)
    }
    Q2TY <- qr.q2ty(out$qr.T, out$yM)
    cat(" iterative solution of linear system", fill = TRUE)
    out2 <- conjugate.gradient(b = Q2TY, out$multAx, start = start, 
        tol = tol, kmax = kmax, D = out$lambda * out$weightsM, 
        loc = out$indexM, cov.function = out$cov.function, cov.obj = out$cov.obj, 
        qr.T = out$qr.T, verbose = conv.verbose)
    if (verbose) {
        cat("convergence info from conjugate gradient", fill = TRUE)
        print(out2$conv)
    }
    out$omega2 <- out2$x
    out$converge <- out2$conv
    if (out$converge$niter >= kmax) {
        warning("Exceeded max number of\niterations for congate gradient.")
    }
    out <- c(out, krig.image.parameters(out))
    class(out) <- "krig.image"
    if (verbose) {
        cat("estimated parameters delta, then beta", fill = TRUE)
        print(out$delta)
        print(out$beta)
    }
    if (verbose) {
        cat("estimated parameters sigma2 and rho", fill = TRUE)
        print(out$sigma2)
        print(out$rho)
    }
    xg <- make.surface.grid(out$grid)
    ig <- make.surface.grid(list(1:out$m, 1:out$n))
    z1 <- out$cov.function(ig, out$indexM, Y = out$delta, cov.obj = out$cov.obj)
    z2 <- out$beta[1] + xg %*% out$beta[2:3]
    out$surface <- as.surface(xg, z1 + z2)
    if (verbose) {
        print(out$surface$x)
        print(out$surface$y)
    }
    if (verbose) 
        print(out$rep.info)
    out$fitted.values <- predict(out, out$xraw)
    out$residuals <- out$y - out$fitted.values
    out
}
"krig.image.parameters" <-
function (out) 
{
    nt <- out$qr.T$rank
    n <- length(out$yM)
    delta <- qr.qy(out$qr.T, c(rep(0, nt), out$omega2))
    temp <- out$yM - (out$cov.function(out$indexM, , delta, cov.obj = out$cov.obj) + 
        out$lambda * out$weightsM * delta)
    beta <- qr.coef(out$qr.T, temp)
    rhohat <- sum(delta * out$yM)/(n - nt)
    rho <- rhohat
    sigma2 <- rho * out$lambda
    shat.MLE <- sqrt(rhohat * out$lambda)
    return(beta, delta, rhohat, rho, sigma2, shat.MLE)
}
"lonlat2xy" <-
function (lnlt, miles = FALSE) 
{
    n <- nrow(lnlt)
    ctr <- c(mean(lnlt[, 1]), mean(lnlt[, 2]))
    ctx <- cbind(lnlt[, 1], rep(ctr[2], n))
    cty <- cbind(rep(ctr[1], n), lnlt[, 2])
    dstx <- c(rdist.earth(matrix(ctr, 1, 2), ctx, miles = FALSE))
    dsty <- c(rdist.earth(matrix(ctr, 1, 2), cty, miles = FALSE))
    cbind(dstx * (2 * (lnlt[, 1] > ctr[1]) - 1), dsty * (2 * 
        (lnlt[, 2] > ctr[2]) - 1))
}
"make.Amatrix.Krig" <-
function(out, x0 = out$x, lambda)
{
	if(missing(lambda)) {
		lambda <- out$lambda
	}
	xc <- out$transform$x.center
	xs <- out$transform$x.scale
	xM <- scale(out$xM, xc, xs)
	knots <- scale(out$knots, xc, xs)
	x0 <- scale(x0, xc, xs)
		X <- cbind(make.tmatrix(xM, out$m), qr.yq2(out$matrices$qr.T,
			do.call(out$call.name, c(out$args, list(x1 = xM, x2 = 
			knots)))))
	if(out$decomp == "DR") {
		temp <- (out$matrices$G) %*% diag(1/(1 + lambda * out$matrices$
			D))
		temp <- temp %*% t(out$matrices$G) %*% t(X)
		temp <- temp %*% diag(out$weightsM)
		#
		#
		# At this point temp maps YM 
		# to the beta vector of coefficients
		#
			temp <- cbind(make.tmatrix(x0, out$m), matrix(qr.yq2(
				out$matrices$qr.T, do.call(out$call.name, c(
				out$args, list(x1 = x0, x2 = knots)))), nrow = 
				nrow(x0))) %*% temp
	}
	if(out$decomp == "WBW") {
		nt <- out$nt
		np <- out$np
		temp <- matrix(0, out$np, out$np)
		#
		# matrix that gives the u vector
		temp[(nt + 1):np,  ] <- t(out$matrices$V) %*% qr.q2ty(out$
			matrices$qr.T, diag(sqrt(out$weightsM)))
		#
		# matrix that gives the beta vector
		temp <- out$matrices$G %*% diag((1/(1 + lambda * out$matrices$
			D))) %*% temp
		#
		#		matrix that gives the c vector
		tempc <- diag(sqrt(out$weightsM)) %*% qr.qy(out$matrices$qr.T,
			temp)
		#matrix to get the d vector
			tempd <- diag(1, np) - lambda * tempc - do.call(out$
				call.name, c(out$args, list(x1 = knots, x2 = 
				knots))) %*% tempc
		tempd <- diag(sqrt(out$weightsM)) %*% tempd
		tempd <- qr.coef(out$matrices$qr.T, tempd)
		# hat matrix is finding d and c coefficients and 
		# evaluting at basis functions.
			temp <- make.tmatrix(x0, out$m) %*% tempd + do.call(
				out$call.name, c(out$args, list(x1 = x0, x2 = 
				knots))) %*% tempc
	}
	#
	#
	return(temp)
}
"make.Amatrix" <-
function (object, ...) 
UseMethod("make.Amatrix")
"make.surface.grid" <-
function (grid.list, X, nx = 30, ny = 30, info.list = FALSE, FUN = median) 
{
    what <- rep(NA, 2)
    if (!is.list(grid.list)) 
        stop("Must supply a list to describe grid limits")
    if (!missing(X)) {
        if (data.class(X) != "data.frame") {
            if (is.null(dimnames(X))) {
                names.of.X <- paste("X", 1:ncol(X), sep = "")
            }
            else {
                names.of.X <- dimnames(X)[[2]]
            }
        }
        else names.of.X <- names(X)
        m <- length(names.of.X)
        if (is.null(names(grid.list))) {
            if (length(grid.list) < m) 
                stop(" grid.list must be as long as the number of columns of X!")
            names(grid.list) <- paste("X", 1:length(grid.list), 
                sep = "")
        }
        test <- match(names(grid.list), names.of.X)
        if (!(all(!is.na(test)))) {
            print("names in grid.list")
            print(names(grid.list))
            print("names for columns of X matrix")
            print(names.of.X)
            stop(" some of the\ngrid.list names are not found in the names of the X columns")
        }
        temp <- as.list(rep("c", m))
        names(temp) <- names.of.X
        temp[names(grid.list)] <- grid.list
        for (k in 1:length(temp)) {
            test <- temp[[k]]
            if (length(test) == 1) {
                if (test == "c") 
                  temp[[k]] <- FUN(X[, k])
                if (test == "x") {
                  temp[[k]] <- seq(min(X[, k]), max(X[, k]), 
                    , nx)
                  what[1] <- k
                }
                if (test == "y") {
                  temp[[k]] <- seq(min(X[, k]), max(X[, k]), 
                    , ny)
                  what[2] <- k
                }
            }
        }
        grid.list <- temp
    }
    ind <- unlist(lapply(grid.list, length))
    if (sum(ind > 1) > 2) {
        stop("Only two components can have more than one\nvalue in the grid list")
    }
    nl <- length(grid.list)
    if (is.na(what[1])) {
        what <- (1:nl)[ind > 1]
    }
    x1 <- grid.list[[what[1]]]
    x2 <- grid.list[[what[2]]]
    if (length(x1) == 2) {
        x1 <- seq(min(x1), max(x1), , nx)
    }
    if (length(x2) == 2) {
        x2 <- seq(min(x2), max(x2), , ny)
    }
    nx <- length(x1)
    ny <- length(x2)
    nr <- nx * ny
    if (!info.list) {
        xg <- matrix(NA, ncol = nl, nrow = nr)
        dimnames(xg) <- list(NULL, names(grid.list))
        tempa <- attributes(xg)
        tempa$format <- cbind(what, ind[what])
        tempa$surface.info <- list(x = x1, y = x2, nx = nx, ny = ny, 
            xlab = names(grid.list)[what[1]], ylab = names(grid.list)[what[2]], 
            fixed.variables = grid.list[-what], nvar = nl)
        tempa$grid.list <- grid.list
        attributes(xg) <- tempa
        xg[, what] <- cbind(rep(x1, ny), rep(x2, rep(nx, ny)))
        for (k in 1:nl) {
            if (ind[k] == 1) {
                xg[, k] <- rep(grid.list[[k]], nr)
            }
        }
        class(xg) <- "surface.grid"
        return(xg)
    }
    else {
        return(list(x = x1, y = x2, nx = nx, ny = ny, xlab = names(grid.list)[what[1]], 
            ylab = names(grid.list)[what[2]], fixed.variables = grid.list[-what], 
            grid.list = grid.list, nvar = nl))
    }
}
"make.tmatrix.F" <-
function (x, m = 2) 
{
    d <- ncol(x)
    n <- nrow(x)
    nterms <- .Fortran("mkpoly", as.integer(m), as.integer(d), 
        nterms = as.integer(0))$nterms
    temp <- .Fortran("dmaket", m = as.integer(m), n = as.integer(n), 
        dim = as.integer(d), des = as.double(x), lddes = as.integer(n), 
        npoly = as.integer(nterms), tmatrix = as.double(rep(0, 
            n * (nterms))), ldt = as.integer(n), wptr = as.integer(rep(0, 
            d * m)), info = as.integer(0), ptab = as.integer(rep(0, 
            nterms * d)), ldptab = as.integer(nterms))
    temp2 <- matrix(temp$tmatrix, nrow = n)
    attr(temp2, "ptab") <- matrix(temp$ptab, nrow = nterms, ncol = d)
    temp2
}
"make.tmatrix" <-
function (x, m = 2) 
{
    d <- ncol(x)
    n <- nrow(x)
    nterms <- .Fortran("mkpoly", as.integer(m), as.integer(d), 
        nterms = as.integer(0))$nterms
    temp <- .Fortran("dmaket", m = as.integer(m), n = as.integer(n), 
        dim = as.integer(d), des = as.double(x), lddes = as.integer(n), 
        npoly = as.integer(nterms), tmatrix = as.double(rep(0, 
            n * (nterms))), ldt = as.integer(n), wptr = as.integer(rep(0, 
            d * m)), info = as.integer(0), ptab = as.integer(rep(0, 
            nterms * d)), ldptab = as.integer(nterms))
    temp2 <- matrix(temp$tmatrix, nrow = n)
    attr(temp2, "ptab") <- matrix(temp$ptab, nrow = nterms, ncol = d)
    temp2
}
"make.tmatrix.S" <-
function (x, m = 2) 
{
    if (!is.matrix(x)) 
        x <- as.matrix(x)
    p <- m - 1
    d <- ncol(x)
    n <- nrow(x)
    ptab <- NA
    ind <- (1:d) + 1
    end <- ind[d]
    N <- as.integer(prod(((p + 1):(p + d))/(1:d)))
    A <- matrix(NA, ncol = N, nrow = n)
    ptab <- matrix(0, ncol = N, nrow = d)
    unit <- diag(rep(1, d))
    A[, 1] <- rep(1, n)
    if (p == 0) {
        attr(A, "ptab") <- t(ptab)
        return(A)
    }
    A[, ind] <- x
    ptab[, ind] <- unit
    if (p > 1) {
        for (j in 2:p) {
            k1 <- end + 1
            for (i in 1:d) {
                k2 <- end - ind[i] + k1
                A[, k1:k2] <- x[, i] * A[, ind[i]:end]
                ptab[, k1:k2] <- ptab[, ind[i]:end] + unit[, 
                  i]
                ind[i] <- k1
                k1 <- k2 + 1
            }
            end <- k2
        }
    }
    attr(A, "ptab") <- t(ptab)
    A
}
"matern" <-
function (t , scale = 1, range = 1,alpha=1/range, 
    smoothness = 0.5, nu= smoothness, phi=scale) 
{
#
# Matern covariance function transcribed from Stein's book page 31
# nu==smoothness, alpha ==  1/range
# GeoR parameters map to kappa==smoothness and phi == range 
# check for negative distances
if( any( t <0)) stop("distance argument must be nonnegative")

t<- t*alpha
#
# the hairy constant ...
# this is different from Stein to make this a correlation function when 
# scale =1
con<- (2^(nu - 1))*gamma(nu)
con<- 1/con
#
# call to  Bessel function from R base package
#
 phi*ifelse( t>0,
                 con*(t^nu) * besselK(t , nu ), 1)
}
"matern.cov" <-
function (x1, x2, theta = rep(1, ncol(x1)), smoothness = 0.5, scale=1) 
{
    if (!is.matrix(x1)) 
        x1 <- as.matrix(x1)
    if (missing(x2)) 
        x2 <- x1
    if (!is.matrix(x2)) 
        x2 <- as.matrix(x2)
    if (length(theta) == 1) 
        theta <- rep(theta, ncol(x1))
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    x1 <- t(t(x1)/theta)
    x2 <- t(t(x2)/theta)
    matrix(matern(c(rdist(x1, x2)), smoothness = smoothness, scale=scale), 
        nrow = n1, ncol = n2)
}
matern.image.cov<-function(
ind1, ind2, Y, cov.obj = NULL, setup = FALSE, grid,M=NULL,N=NULL,...)
{
    if (is.null(cov.obj)) {
        dx <- grid$x[2] - grid$x[1]
        dy <- grid$y[2] - grid$y[1]
        m <- length(grid$x)
        n <- length(grid$y)
        if(is.null(M))M <- ceiling2(2 * m)
        if(is.null(N))N <- ceiling2(2 * n)
        xg <- make.surface.grid(list((1:M) * dx, (1:N) * dy))
        center <- matrix(c((dx * M)/2, (dy * N)/2), nrow = 1,
            ncol = 2)
        out <- matern.cov(xg, center, ...)
        out <- as.surface(xg, c(out))$z
        temp <- matrix(0, nrow = M, ncol = N)
        temp[M/2, N/2] <- 1
        wght <- fft(out)/(fft(temp) * M * N)
        cov.obj <- list(m = m, n = n, grid = grid, N = N, M = M,
            wght = wght, call = match.call())
        if (setup) {
            return(cov.obj)
        }
    }
    temp <- matrix(0, nrow = cov.obj$M, ncol = cov.obj$N)
    if (missing(ind1)) {
        temp[1:cov.obj$m, 1:cov.obj$n] <- Y
        Re(fft(fft(temp) * cov.obj$wght, inverse = TRUE)[1:cov.obj$m,
            1:cov.obj$n])
    }
    else {
        if (missing(ind2)) {
            temp[ind1] <- Y
        }
        else {
            temp[ind2] <- Y
        }
        Re(fft(fft(temp) * cov.obj$wght, inverse = TRUE)[ind1])
    }
}
"minimax.crit" <-
function (obj, des = TRUE, R) 
{
    R <- as.matrix(R)
    id <- 1:nrow(R)
    if (des) 
        Dset <- attr(obj, "best.id")
    else Dset <- obj
    Cset <- id[-Dset]
    dist.mat <- rdist(R[Cset, ], R[Dset, ])
    mM.crit <- max(apply(dist.mat, 1, min))
    mM.crit
}
"minitri" <-
structure(list(swim = c(13.77, 14.25, 12.4, 13.6, 11.23, 14.6, 
15.63, 13.62, 17.03, 13.1, 16.5, 15.57, 14.28, 16.13, 14.98, 
15.65, 14.55, 13.73, 14.67, 14.63, 12.53, 16.52, 14.45, 17.23, 
15.77, 13.53, 17.38, 16.58, 16.97, 12.9, 15.48, 15.6, 16.43, 
17.37, 15.65, 20.17, 16.57, 15.75, 18.32, 16.15, 18.77, 19.55, 
17.05, 15.75, 17.47, 22.18, 12.78, 19.05, 17, 18.65, 18.38, 18.03, 
18.08, 18.22, 21.3, 17.82, 16, 15.3, 19.8, 16.33, 14.9, 18.08, 
17, 24.77, 17.03, 21.72, 14.77, 17.28, 19.88, 19.75, 18.17, 20.67, 
17.6, 18.07, 20.53, 16.78, 18.42, 21.43, 25.35, 16.37, 18.88, 
20.3, 21.93, 20, 19.42, 16.97, 15.25, 22.52, 16.8, 17.58, 20.45, 
21.78, 17.92, 24.83, 20.38, 20.37, 28.35, 23.95, 25.15, 18.57, 
19.95, 26.22, 22.08, 25.77, 23.7, 26.15, 18.05, 30.7, 29.88, 
30.77), bike = c(39.72, 39, 42.2, 39.95, 41.72, 42.25, 43.77, 
42.17, 40.63, 44.68, 43.63, 42.78, 41.7, 45.57, 42.83, 44.52, 
43.9, 45.73, 43.05, 44.9, 48.07, 44.93, 47.87, 45.55, 46.1, 44.6, 
45.72, 44.73, 46.85, 49.4, 47.43, 44.52, 43.67, 47.7, 48.57, 
45.78, 47.35, 45.63, 46.47, 47.12, 49.62, 48.5, 54.4, 49.4, 48.77, 
46.97, 49.92, 48.98, 50.57, 49.52, 52.58, 47.62, 50.05, 51.75, 
50.68, 52.28, 48.57, 50.38, 46.2, 49.93, 47.7, 52.68, 50.28, 
46.12, 53.17, 51.63, 58.42, 55.3, 50.68, 51.82, 51.93, 48.82, 
51.87, 55.4, 55.17, 53.82, 50.23, 47.92, 50.98, 51.95, 53.47, 
52.5, 53.98, 47.05, 58.92, 52.67, 52.1, 49.72, 61.33, 58.73, 
58, 56.23, 58.95, 55.48, 61.03, 57.37, 54.68, 57.62, 58.52, 56.7, 
63.82, 59.07, 66.03, 60.83, 62.37, 66.87, 75, 65.38, 68.25, 67.35
), run = c(25.02, 25.68, 24.95, 27.65, 29.25, 26.83, 24.8, 28.73, 
29, 28.1, 25.85, 29.4, 31.33, 26.2, 30.45, 29.32, 31.13, 30.48, 
32.32, 30.62, 29.92, 30.12, 29.7, 29.25, 30.28, 34.07, 31.55, 
33.5, 31.03, 32.72, 32.28, 35.1, 35.13, 30.48, 31.5, 30.37, 32.82, 
35.8, 32.82, 34.67, 30.33, 30.95, 27.57, 34.08, 33.13, 30.57, 
37.43, 32.12, 32.93, 32.4, 29.63, 35.08, 32.65, 30.98, 30.22, 
32.12, 38.08, 37.23, 36.95, 36.72, 40.7, 32.87, 36.53, 33.72, 
34.45, 31.47, 31.7, 33.03, 35.68, 34.88, 36.57, 37.27, 37.87, 
34.32, 32.1, 37.33, 39.73, 39.07, 32.12, 40.52, 36.77, 36.57, 
33.55, 42.55, 31.48, 40.8, 43.45, 39.03, 34.12, 37.12, 35.03, 
36.45, 38.48, 36.25, 36.57, 40.9, 37.98, 37.98, 37.45, 45.9, 
44.18, 45.02, 42.37, 45.38, 51.8, 45.88, 48.18, 51.8, 57.23, 
57.35)), .Names = c("swim", "bike", "run"), row.names = c("  1", 
"  2", "  3", "  4", "  5", "  6", "  7", "  8", "  9", " 10", 
" 11", " 12", " 13", " 14", " 15", " 16", " 17", " 18", " 19", 
" 20", " 21", " 22", " 23", " 24", " 25", " 26", " 27", " 28", 
" 29", " 30", " 31", " 32", " 33", " 34", " 35", " 36", " 37", 
" 38", " 39", " 40", " 41", " 42", " 43", " 44", " 45", " 46", 
" 47", " 48", " 49", " 50", " 51", " 52", " 53", " 54", " 55", 
" 56", " 59", " 60", " 61", " 62", " 64", " 65", " 66", " 68", 
" 69", " 70", " 71", " 72", " 73", " 74", " 75", " 76", " 77", 
" 78", " 79", " 80", " 81", " 82", " 83", " 84", " 85", " 86", 
" 87", " 88", " 89", " 90", " 91", " 92", " 93", " 96", " 97", 
" 98", "100", "102", "103", "104", "105", "106", "107", "108", 
"109", "110", "111", "112", "113", "114", "116", "117", "118", 
"119"), class = "data.frame")
"nkden" <-
function(data, bandwidth, n.points, grid)
{
	# who wants to keep typing bandwidth!]
	if(data.class(data) == "data.frame") data <- as.matrix(data)
	h <- bandwidth
	# reformat 1-d vector as column matrix
	if(!is.matrix(data)) m <- 1 else m <- ncol(data)
	if(missing(grid)) {
		if((m == 1))
			if(!missing(n.points))
				grid <- seq(min(data), max(data),  , n.points)
			else grid <- sort(data)
		else {
			grid <- data
		}
	}
	if(data.class(grid) == "data.frame")
		grid <- as.matrix(grid)
	if(m > 1) {
		if(m != ncol(grid))
			stop("dimension of data and grid do not agree")
		p <- nrow(grid)
		n <- nrow(data)
	} else {
		p <- length(grid)
		n <- length(data)
	}
	nh <- length(h)
	f <- matrix(rep(-99, p * nh), ncol = nh)
	out <- list()
	for(k in 1:nh) {
		out <- .Fortran("nkden",
			as.double(h[k]),
			as.integer(n),
			as.integer(m),
			as.double(data),
			as.integer(p),
			as.double(grid),
			as.double(rep(-99, p)))
		f[, k] <- out[[7]]
	}
	if(nh == 1)
		f <- c(f)
	list(x = grid, y = f, h = h)
}
"nkreg" <-
function(data.x, data.y, bandwidth, n.points=50, grid=NULL,
grid.list=NULL)
{
	# who wants to keep typing bandwidth!
	h <- bandwidth
	# reformat 1-d vector as column matrix
	if(data.class(data.x) == "data.frame") data.x <- as.matrix(data.x)
	if(!is.matrix(data.x))
		m <- 1
	else m <- ncol(data.x)
#
# special case for 2-d 
#
if( is.null( grid.list)& is.null( grid) &  (m==2)){
xr<- range( data.x[,1])
yr<- range( data.x[,2])
grid.list<- list( 
seq( xr[1], xr[2],,n.points),
seq( yr[1], yr[2],,n.points))
class( grid.list)<- "grid.list"
}
if( !is.null(grid.list)){
grid<- make.surface.grid( grid.list)
}
# special case for 1-d
	if(is.null(grid)) {
		if((m == 1))
				grid <- seq(min(data.x), max(data.x),  , 
					n.points)
		else grid <- data.x
	}
	if(data.class(grid) == "data.frame")
		grid <- as.matrix(grid)
	if(m > 1) {
		if(m != ncol(grid))
			stop("dimension of data.x and grid do not agree")
		p <- nrow(grid)
		n <- nrow(data.x)
	} else {
		p <- length(grid)
		n <- length(data.y)
	}
	nh <- length(h)
	f <- matrix(rep(-99, p * nh), ncol = nh)
	out <- list()
	for(k in 1:nh) {
		f[,k] <- .Fortran("nkreg",
			as.double(h[k]),
			as.integer(n),
			as.integer(m),
			as.double(data.x),
			as.double(data.y),
			as.integer(p),
			as.double(grid),
			estimate=as.double(rep(-99, p)))$estimate
	}
	if(nh == 1)
		f <- c(f)
return(
	list(x = grid, y = f, h = h, grid.list=grid.list))
}
"ozone" <-
structure(list(x = structure(c(10.2420950223404, 3.80376523711237, 
9.10894898014071, 9.62401536295848, -2.42853799498812, -12.626852374789, 
-0.419779101996896, -7.88824165286121, 3.54623204570348, -16.9019033521803, 
-27.2032310085453, -6.18852258956094, -5.26140310048807, -12.2147992685346, 
-25.5550185835271, -15.6657440334172, 21.109995699806, 12.9204402129956, 
33.8836419936979, 28.1148985061338, -8.81404505952784, 6.475624941694, 
-12.2040623901154, -18.5689928883614, 6.8907291046231, -14.9714234763093, 
-2.03401039835273, 10.6958505981398, 12.287083222701, -4.939739538856, 
11.4568748968428, 20.2432463455088, 35.0486281566463, 28.0610414140067, 
23.2873435403219, -20.2294095400778, -19.6759373228389, -16.9777602637997, 
-17.5312324810386, -18.4998088612067), .Dim = c(20, 2), .Dimnames = list(
    c("170310032", "170310037", "170310050", "170311002", "170311003", 
    "170311601", "170314002", "170314003", "170317002", "170436001", 
    "170890005", "170970001", "170971002", "170973001", "171110001", 
    "171971008", "180891016", "180892008", "181270020", "181270024"
    ), c("East.West", "North.South"))), y = c(36.4902936963152, 
34.6396930821552, 31.6444005657229, 34.4646956838262, 37.7204739668803, 
40.1342965426748, 37.0181086910068, 38.4001686365134, 44.0485589002946, 
38.4870329290307, 42.2402282830657, 40.0049235817847, 42.1090485712195, 
39.6319596353327, 42.8054712629932, 44.1097465187358, 35.1186331327201, 
46.898470931915, 42.9564231070325, 46.6868555984414), lon.lat = structure(c(-87.546, 
-87.671, -87.568, -87.558, -87.792, -87.99, -87.753, -87.898, 
-87.676, -88.073, -88.273, -87.865, -87.847, -87.982, -88.241, 
-88.049, -87.335, -87.494, -87.087, -87.199, 41.757, 41.978, 
41.708, 41.616, 41.984, 41.668, 41.855, 42.039, 42.062, 41.813, 
42.05, 42.177, 42.391, 42.29, 42.221, 41.592, 41.6, 41.639, 41.631, 
41.617), .Dim = c(20, 2), .Dimnames = list(c("170310032", "170310037", 
"170310050", "170311002", "170311003", "170311601", "170314002", 
"170314003", "170317002", "170436001", "170890005", "170970001", 
"170971002", "170973001", "171110001", "171971008", "180891016", 
"180892008", "181270020", "181270024"), c("lat", "lon")))), .Names = c("x", 
"y", "lon.lat"))
"periodic.cov.1d" <-
function (x1, x2, a, b) 
{
    pairdist <- rdist(x1, x2)%%(b - a)/(b - a)
    bernoulli4 <- pairdist^4 - 2 * (pairdist^3) + pairdist^2 - 
        1/30
    cov <- ((-1) * bernoulli4)/(4 * 3 * 2)
    cov <- cov + (max(cov) - min(cov))/4
    cov <- cov/max(abs(cov))
    return(cov)
}
"periodic.cov.cyl" <-
function (x1, x2, a = 0, b = 365, theta = 1) 
{
    cov.per1d <- periodic.cov.1d(x1[, 1], x2[, 1], a, b)
    cov.vert <- exp.cov(x1[, 2], x2[, 2], theta = theta)
    cov <- cov.per1d * cov.vert
    return(cov)
}
"periodic.plane.3d" <-
function (x1, x2, a = 0, b = 365, theta = 1) 
{
    cov.per1d <- periodic.cov.1d(x1[, 1], x2[, 1], a, b)
    cov.vert <- exp.cov(x1[, c(2, 3)], x2[, c(2, 3)], theta = theta)
    cov <- cov.per1d * cov.vert
    return(cov)
}
"plot.Krig" <-
function(out, main = NA, digits = 4, which = c(TRUE, TRUE, TRUE, TRUE), graphics.reset = TRUE, 
	...)
{
	old.par <- par("mfrow", "oma")
	if(graphics.reset) {
		on.exit(par(old.par))
		par(xpd = TRUE)
	}
	set.panel(2, 2, TRUE)
	fitted.values <- predict(out)
	std.residuals <- (out$residuals * sqrt(out$weights))/out$shat.GCV
	if(which[1]) {
		temp <- summary(out)
		plot(fitted.values, out$y, ylab = "Y", xlab = 
			" predicted values", bty = "n", ...)
		abline(0, 1)
		hold <- par("usr")
		text(hold[1], hold[4], paste(" R**2 = ", format(round(100 * 
			temp$covariance, 2)), "%", sep = ""), cex = 0.8, adj = 
			0)
	}
	if(which[2]) {
		plot(fitted.values, std.residuals, ylab = "(STD) residuals", 
			xlab = " predicted values", bty = "n", ...)
		yline(0)
		hold <- par("usr")
		text(hold[1], hold[4], paste(" RMSE =", format(signif(sqrt(sum(
			out$residuals^2)/(temp$num.observation - temp$enp)), 
			digits))), cex = 0.8, adj = 0)
	}
	if(which[3]) {
		if(nrow(out$gcv.grid) > 1) {
# trim off + infinity due to pole in the denominator of GCV function
#with cost
			ind <- out$gcv.grid[, 3] < 1e+019
			out$gcv.grid <- out$gcv.grid[ind,  ]
			yr <- range(unlist(out$gcv.grid[, 3:5]))
			plot(out$gcv.grid[, 2], out$gcv.grid[, 3], xlab = 
				"Eff. number of parameters", ylab = 
				" GCV function", bty = "n", ylim = yr, log = 
				"y", ...)
			lines(out$gcv.grid[, 2], out$gcv.grid[, 4], lty = 2)
			lines(out$gcv.grid[, 2], out$gcv.grid[, 5], lty = 1)
			xline(out$eff.df)	#			hold <- par("usr")
#			text(out$eff.df, hold[4], paste(" Eff. df. =", 
#format(
#				round(out$eff.df, 1)), "\n Res. df. =", 
#format(
#				round(temp$num.observation - temp$enp, 
#1))), 
#				cex = 0.8, adj = 0)
			title("GCV-points , solid- GCV model,\ndashed- GCV one",
				cex = 0.6)
		}
	}
	if(which[4]) {
		hist(std.residuals)
	}
	if(is.na(main))
		mtext(deparse(out$call), cex = 1.3, outer = TRUE, line = -2)
	else mtext(main, cex = 1.3, outer = TRUE, line = -2)
}
"plot.coef" <-
function (x, cut.min = 8, graphics.reset = TRUE, common.range = FALSE) 
{
    old.par <- par()
    par(mar = c(3, 0, 3, 0))
    n <- dim(x)[1]
    m <- dim(x)[2]
    NN <- n
    MM <- m
    level <- 1
    while (min(c(NN, MM)) > cut.min) {
        level <- level + 1
        NN <- NN/2
        MM <- MM/2
    }
    print(level)
    print(MM)
    print(NN)
    n2 <- NN
    m2 <- MM
    n3 <- NN * 2
    m3 <- MM * 2
    n1 <- 1
    m1 <- 1
    zr <- range(x)
    set.panel(level, 3)
    image.plot(x[m1:m2, n1:n2], zlim = zr, xaxt = "n", yaxt = "n", 
        graphics.reset = FALSE)
    mtext(3, line = 1, text = "smooth", cex = 1.1)
    par(mfg = c(2, 1, level, 3))
    level <- 1
    while (n3 <= n & m3 <= m) {
        cat(c(m1, m2, m3), fill = TRUE)
        cat(c(n1, n2, n3), fill = TRUE)
        zr <- range(c(x[m1:m2, (n2 + 1):n3], x[(m2 + 1):m3, n1:n2], 
            x[(m2 + 1):m3, (n2 + 1):n3]))
        image(x[m1:m2, (n2 + 1):n3], zlim = zr, xaxt = "n", yaxt = "n")
        mtext(2, line = 1, text = paste("level", level, "detail"), 
            cex = 1.1)
        if (level == 1) {
            mtext(3, line = 1, text = "Horizontal", cex = 1.1)
        }
        image(x[(m2 + 1):m3, n1:n2], zlim = zr, xaxt = "n", yaxt = "n")
        if (level == 1) {
            mtext(3, line = 1, text = "Vertical", cex = 1.1)
        }
        image.plot(x[(m2 + 1):m3, (n2 + 1):n3], zlim = zr, xaxt = "n", 
            yaxt = "n")
        if (level == 1) {
            mtext(3, line = 1, text = "Diagonal", cex = 1.1)
        }
        level <- level + 1
        n2 <- n3
        n3 <- n2 * 2
        m2 <- m3
        m3 <- m2 * 2
    }
    if (graphics.reset) {
        par(old.par)
    }
    invisible()
}
"plot.krig.image" <-
function (out, main = NA, digits = 4, which = rep(TRUE, 4), graphics.reset = TRUE, 
    ...) 
{
old.par <- par(no.readonly=TRUE)

    if (graphics.reset) {
        on.exit(par(old.par))
        par(xpd = TRUE)
    }
    set.panel(2, 2, TRUE)
    lims <- range(out$fitted.values, out$y)
    if (which[1]) {
        plot(out$fitted.values, out$y, xlim = lims, ylim = lims, 
            ylab = "Observed Values", xlab = "Predicted Values", 
            bty = "n", ...)
        abline(0, 1)
    }
    if (which[2]) {
        image.plot(out$surface, offset = 0.1)
        points(out$x, pch = ".")
    }
    if (which[3]) {
        plot(out$fitted.values, out$residuals, xlim = lims, ylab = "Residuals", 
            xlab = "Predicted\nValues", bty = "n", ...)
        yline(0)
    }
    if (which[4]) {
        look <- list(x = out$grid$x, y = out$grid$y, z = matrix(NA, 
            out$m, out$n))
        look$z[out$indexM] <- out$yM - predict(out, out$xM)
        image.plot(look, xlab = "x", ylab = "y", graphics.reset = FALSE, 
            offset = 0.1)
        contour(out$surface, labex = 0, add = TRUE)
        title("Residuals on surface ", cex = 0.8)
    }
    if (!is.na(main)) 
   mtext(main, cex = 1, outer = TRUE, line = -2)
  #####else      mtext(deparse(out$call), cex = 1, outer = TRUE, line = -2,adj=0)
    invisible()
}
"plot.qsreg" <-
function (out, pch = "*", main = NA) 
{
    old.par <- par("mfrow", "oma")
    on.exit(par(old.par))
    set.panel( 2, 2, relax=TRUE)
    plot(out$x, out$y, xlab = "X", ylab = "y", pch = pch)
    orderx <- order(out$x)
temp<-  out$fitted.values[,c(out$ind.cv, out$ind.cv.ps)]
matlines(out$x[orderx], temp[orderx,], lty = 1,  col = c(1,2))
##
# residual plot
#
matplot(out$x, 
qsreg.psi( out$residuals[,c(out$ind.cv, out$ind.cv.ps)],  out$alpha, out$sc)
, col=c(1,2), pch="o", ylab="Pseudo residuals", xlab="X")

yline(0)
   

    if (nrow(out$cv.grid) > 1) {
        ind <- out$cv.grid[, 3] < 1e+19
        out$cv.grid <- out$cv.grid[ind, ]
        matplot(out$cv.grid[, 2], cbind(out$cv.grid[, 3], 
out$cv.grid[,6]), xlab = "Effective number of parameters", 
            ylab = "Log CV Rho function ", 
            log = "y", type="l", col=c(1,2))
xline( out$cv.grid[out$ind.cv, 2], col=1)
xline( out$cv.grid[out$ind.cv.ps, 2], col=2)

        title(" CV curves", 
            cex = 0.5)
    }

bplot(  
qsreg.psi( out$residuals[,c(out$ind.cv, out$ind.cv.ps)],  out$alpha, out$sc), 
labels=c("CV", "CV pseudo")
)

yline( 0, col=2)

    if (is.na(main)) 
        mtext(deparse(out$call), cex = 1.3, outer = TRUE, line = -2)
    else mtext(main, cex = 1.3, outer = TRUE, line = -2)
}
"plot.sim.krig.image" <-
function (obj) 
{
    par.old <- par(read.only=TRUE)
    on.exit(par(par.old))
    M <- length(obj$out)
    n <- round(sqrt(M))
    m <- round(M/n)
    if (m * n < M) 
        n <- n + 1
    set.panel(m, n, relax = TRUE)
    for (k in 1:M) {
        image.plot(x = obj$grid$x, y = obj$grid$y, z = obj$out[[k]])
    }
}
"plot.spatial.design" <-
function( out){ pairs( out$design)}
"plot.sreg" <-
function(out, main = NA, digits = 4, which = c(TRUE, TRUE, TRUE, TRUE), graphics.reset 
= TRUE,
	...)
{
	old.par <- par("mfrow", "oma")
	if(graphics.reset) {
		on.exit(par(old.par))
		par(xpd = TRUE)
	}
	set.panel(2, 2, TRUE)
	if(which[1]) {
		plot(out$xraw, out$yraw, ylab = "predicted", xlab = " X", bty
			 = "n", ...)
		matlines(out$predicted$x, out$predicted$y, lty = 1)
	}
	if(which[2] & length(out$lambda) == 1) {
		plot(out$fitted.values, out$residuals, ylab = "residuals",
			xlab = " predicted values", bty = "n", ...)
		yline(0)
	}
	if(which[3]) {
		if(nrow(out$gcv.grid) > 1) {
			# trim off + infinity due to pole in the denominator of GCV function
			#with cost
			ind <- out$gcv.grid[, 3] < 1e+19
			out$gcv.grid <- out$gcv.grid[ind,  ]
			yr <- range(unlist(out$gcv.grid[, 3:5]), na.rm=TRUE)
	plot(out$gcv.grid[, 2], out$gcv.grid[, 3], xlab = 
				"Eff. parameters", ylab = " GCV function",
				bty = "n", ylim = yr, log = "y", ...)
			lines(out$gcv.grid[, 2], out$gcv.grid[, 4], lty = 2)
			lines(out$gcv.grid[, 2], out$gcv.grid[, 5], lty = 1)
			xline(out$eff.df)
			title("GCV-points , solid- GCV model,\ndashed- GCV one",
				cex = 0.59999999999999998)
		}
	}
	if(which[4]) {
		if(length(out$lambda) == 1) {
			hist(out$residuals, xlab = "Residuals", main="")
		}
		else {
			bplot(out$residuals, labels=
format(round(out$trace,1)), 
				xlab = "eff df", srt=90)

		title("Residuals")
		}
	}
	if(is.na(main))
		mtext(deparse(out$call), cex = 1.3, outer = TRUE, line = -2)
	else mtext(main, cex = 1.3, outer = TRUE, line = -2)
}
"plot.surface" <-
function (obj, main = NULL, type = "b", zlab = NULL, xlab = NULL, 
    ylab = NULL, levels = NULL, zlim = NULL, graphics.reset = NULL, 
    labcex=.6,...) 
{
    old.par <- par(no.readonly = TRUE)
    if (is.null(graphics.reset) & (type == "b")) {
        graphics.reset <- TRUE
    }
    else {
        graphics.reset <- FALSE
    }
    if (graphics.reset) {
        on.exit(par(old.par))
    }
    if (is.null(xlab)) {
        if (is.null(obj$xlab)) 
            xlab <- "X"
        else xlab <- obj$xlab
    }
    if (is.null(ylab)) {
        if (is.null(obj$ylab)) 
            ylab <- "Y"
        else ylab <- obj$ylab
    }
    if (is.null(zlab)) {
        if (is.null(obj$zlab)) 
            zlab <- "Z"
        else zlab <- obj$zlab
    }
    if (is.null(main)) 
        if (!is.null(obj$main)) 
            main <- obj$main
    if (type == "b") 
        set.panel(2, 1, TRUE)
    if (type == "p" | type == "b") {
        if (is.null(zlim)) 
            persp(obj$x, obj$y, obj$z, xlab = xlab, ylab = ylab, 
                zlab = zlab, theta = 30, phi = 30, expand = 0.5, 
                col = "LightGreen", ...)
        else persp(obj, xlab = xlab, ylab = ylab, zlab = zlab, 
            zlim = zlim, theta = 30, phi = 30, expand = 0.5, 
            col = "LightGreen", ...)
        if (!is.null(main)) 
            title(main)
    }
    if (type == "c" | type == "b") {
        if (is.null(levels)) 
            levels <- pretty(obj$z[!is.na(obj$z)], 5)
        contour(obj$x, obj$y, obj$z, , xlab = xlab, ylab = ylab, 
            levels = levels, labcex=labcex,...)
    }
    if (type == "I") {
        image.plot(obj$x, obj$y, obj$z, xlab = xlab, ylab = ylab)
        if ((!is.null(main)) & type != "b") 
            title(main)
    }
    if (type == "C") {
        image.plot(obj$x, obj$y, obj$z, xlab = xlab, ylab = ylab, 
            graphics.reset = graphics.reset)
        if (is.null(levels)) 
            levels <- pretty(obj$z[!is.na(obj$z)], 5)
        contour(obj$x, obj$y, obj$z, add = TRUE, levels = levels, 
labcex=labcex,
            ...)
        if ((!is.null(main)) & type != "b") 
            title(main)
    }
    invisible()
}
"plot.vgram.matrix" <-
function(obj,...){
# check if just radil distance has been used for vgram
collapse<- is.null( obj$ind)
#
if( !collapse){

nx<- max( obj$ind[,1])
ny<- max(  obj$ind[,2])
temp<-  matrix( NA,nrow=nx+1, ncol=ny+1)
temp[ obj$ind+1] <- obj$vgram
image.plot( 0:nx, 0:ny, temp, xlab="X", ylab="Y",...)
}
else( plot( obj$d, obj$vgram))

}
"poisson.cov" <-
function (x1, x2, eta = 0.2) 
{
    if (missing(x2)) 
        x2 <- x1
#
# dot products of direction cosines  
#
    PP1 <- cbind(cos((x1[, 2] * pi)/180) * cos((x1[, 1] * 
        pi)/180), cos((x1[, 2] * pi)/180) * sin((x1[, 1] * 
        pi)/180), sin((x1[, 2] * pi)/180))
    PP2 <- cbind(cos((x2[, 2] * pi)/180) * cos((x2[, 1] * 
        pi)/180), cos((x2[, 2] * pi)/180) * sin((x2[, 1] * 
        pi)/180), sin((x2[, 2] * pi)/180))
   D  <- (PP1 %*% t(PP2))
con <- (1 - eta^2)^(1.5)
    con/(1 - 2 * eta * D + eta^2)^(1.5)
}
"precip" <-
structure(list(x = structure(c(-110.53, -109.87, -109.53, -109.55, 
-110.97, -109.23, -109.62, -110.62, -109.17, -110.43, -109.05, 
-110.73, -105.85, -105.53, -108.53, -107.88, -105.88, -107.42, 
-103.1, -109.02, -106.83, -104.6, -105.48, -105.52, -106.68, 
-107.9, -102.18, -105.27, -102.45, -103.88, -106.03, -104.33, 
-106.13, -102.27, -104.45, -104.22, -105.27, -105.52, -104.87, 
-107.93, -106.12, -105.28, -104.85, -102.35, -106.2, -106.77, 
-108.73, -104.7, -108.57, -106.97, -104.02, -106.35, -108.07, 
-104.88, -105, -106.05, -103.88, -108.5, -107.88, -102.77, -104.57, 
-104.55, -104.67, -104.55, -104.58, -104.5, -104.57, -104.57, 
-104.62, -107.8, -105.52, -105.32, -102.07, -106, -103.07, -102.83, 
-103.68, -105.08, -108.05, -104.72, -104.7, -104.03, -105.83, 
-108.73, -105.18, -108.93, -103.5, -105.7, -107.32, -106.47, 
-108.53, -108.58, -105.83, -105.85, -105.53, -104.68, -106.33, 
-104.42, -105.38, -106.93, -107.62, -105.8, -103.15, -105.28, 
-107.25, -107.12, -102.12, -102.3, -106.13, -105.52, -102.28, 
-107.63, -102.93, -105.85, -102.25, -103.52, -105.1, -103.9, 
-104.47, -104.52, -102.78, -107.32, -105.48, -104.98, -105.13, 
-102.62, -103.22, -105, -106.3, -103.02, -104.58, -103.73, -103.68, 
-108.88, -108.2, -105.07, -108.28, -107.55, -108.08, -107.9, 
-108.5, -106.15, -107.88, -107.88, -104.92, -109.03, -108.28, 
-103.75, -102.85, -107.68, -107.02, -108.35, -107.18, -107.58, 
-108.95, -104.65, -106.18, -105.07, -106.53, -108.07, -104.5, 
-104.65, -104.35, -107.1, -108.8, -108.03, -107.78, -103.7, -104.08, 
-104.98, -104.93, -106.02, -107.17, -106.43, -102.52, -107.23, 
-107.67, -106.42, -102.6, -102.7, -102.62, -106.83, -103.2, -102.07, 
-102.58, -106.37, -104.12, -106.62, -107.82, -104.5, -104.33, 
-103.2, -106.32, -102.38, -108.73, -107.58, -102.73, -106.83, 
-106.27, -104.8, -105.2, -105.48, -105.08, -104.18, -104.9, -105.77, 
-106.78, -106.87, -102.22, -106.9, -108.73, -102.73, -100.82, 
-99.55, -99.78, -101.05, -99.2, -101.38, -99.63, -99.52, -99.73, 
-100.35, -101.07, -99.33, -100.12, -101.2, -99.73, -99.97, -100.42, 
-100.88, -101.9, -99.57, -100.17, -100.82, -100.82, -101.7, -100.48, 
-99.3, -99.33, -100.62, -99.83, -99.73, -100.45, -101.35, -100.65, 
-100.48, -99.9, -100.08, -99.4, -99.12, -101.27, -99.1, -100, 
-101.37, -101.37, -100.92, -99.57, -99.53, -99.18, -100.2, -99.57, 
-101.38, -100.33, -100.87, -100.02, -99.03, -99.9, -100.18, -99.93, 
-99.88, -99.85, -100.85, -100.52, -99.57, -99.32, -100.58, -99.3, 
-100.23, -99.92, -100.73, -101.77, -101.95, -101.18, -101.8, 
-101.92, -100.08, -100.9, -100.87, -101.75, -99.27, -100.83, 
-101.77, -101.77, -99.07, -101.35, -100.17, -99.88, -99.83, -99.42, 
-101.25, -103.78, -99.87, -102.87, -99.37, -99.87, -99.13, -100.18, 
-101.68, -99.47, -99.83, -101.53, -99.63, -102.08, -102.95, -99.87, 
-103.1, -99.63, -99.15, -100.17, -99.7, -103.08, -99.25, -102.43, 
-100.83, -100.5, -102.97, -100.02, -102.28, -102.15, -102.2, 
-99.92, -101.52, -100.08, -103.47, -100.17, -101.93, -100.32, 
-99.22, -103.88, -103.88, -100.97, -102.68, -102.7, -101, -99.38, 
-99.38, -101.8, -101.63, -101.62, -99.08, -103.67, -101.67, -101.98, 
-99.77, -102.63, -104.03, -101.55, -99.32, -100.62, -100.22, 
-101.68, -103.68, -100.4, -101.05, -101.33, -99.13, -101.17, 
-99.33, -100.7, -100.75, -99.83, -101.72, -99.5, -102.43, -101.12, 
-101.35, -103.32, -99.3, -99.47, -102.47, -100.73, -103.6, -102.98, 
-103.03, -99.73, -100.52, -100.38, -101.23, -99.38, -101.02, 
-100.97, -100.68, -100.55, -101.17, -101.38, -100.73, -101.47, 
-101.43, -100.12, -104.33, -106.43, -106.62, -106.07, -103.17, 
-108, -106.27, -106.32, -104.1, -106.57, -105.25, -107.97, -103.68, 
-106.45, -104, -105.6, -107.97, -105.38, -106.58, -104.92, -103.15, 
-105.67, -104.18, -108.15, -104.17, -103.83, -107, -105.27, -108.35, 
-106.18, -106.73, -106.08, -108.23, -108.2, -107.67, -108.53, 
-108.4, -108.75, -105.43, -106.97, -106.38, -105.77, -106.22, 
-107.9, -103.62, -103.22, -106.53, -106.68, -107.08, -107.4, 
-104.37, -105.22, -105.15, -107.57, -107.3, -104.58, -108.45, 
-108.83, -105.98, -103.12, -107.62, -108.7, -104.27, -103.2, 
-105.05, -106.03, -107.87, -103.73, -105.68, -106.33, -105.68, 
-108.02, -106.67, -103.28, -104.43, -104.5, -105.4, -106.95, 
-105.47, -104.2, -107.62, -103.35, -106.45, -106.37, -106.38, 
-105.95, -108.57, -108.73, -106.03, -104.6, -105.97, -107.47, 
-105.57, -106.58, -108.77, -107.18, -105.97, -103.6, -103.68, 
-106.07, -104.93, -106.77, -108.78, -99.77, -100.52, -102.5, 
-99.63, -99.28, -99.67, -99.38, -99.87, -99.62, -99.58, -99.12, 
-99.77, -100.05, -101.62, -101.48, -99.38, -99.08, -101.22, -102.97, 
-99.35, -99.5, -99.17, -102.73, -99.92, -99.63, -99.55, -99.28, 
-99.38, -99.4, -99.08, -103.43, -103.65, -103.82, -99.98, -103.32, 
-103.82, -101.02, -103.77, -99.33, -103.6, -103.72, -103.9, -103.8, 
-101.52, -102.53, -102.9, -103.47, -100.45, -99.43, -99.43, -101.27, 
-100.93, -101.12, -102.9, -103.18, -99.47, -99.45, -101.87, -103.58, 
-100.87, -103.47, -101.95, -101.52, -102.17, -103.77, -101.5, 
-102.47, -102.33, -101.73, -101.15, -101.65, -100.6, -103.48, 
-103.45, -100.42, -103.23, -100.07, -103.65, -103.5, -101.6, 
-100.28, -102.55, -99.18, -103.1, -103.2, -102.55, -102.55, -104.02, 
-103.78, -99.45, -102.67, -103.4, -102.43, -100.67, -99.78, -99.87, 
-100.48, -101.7, -100.5, -101.45, -103, -100.82, -102.9, -100.37, 
-101.37, -102.52, -102.55, -100.32, -101.97, -100.13, -101.4, 
-102.4, -100.02, -101.32, -100.28, -100.6, -100.63, -100.43, 
-101.47, -100.6, -100.95, -101.38, -100.8, -100.97, -101.2, -102.07, 
-101.82, -102.3, -102.43, -109.07, -110.27, -109.47, -109.55, 
-109.12, -109.08, -109.32, -109.3, -110.42, -109.42, -109.87, 
-110.85, -110.15, -110.7, -110.8, -109.07, -109.37, -109.73, 
-109.87, -109.55, -109.33, -110.2, -110.5, -110.07, -110.8, -110.05, 
-109.68, -110.8, -109.98, -109.72, -109.52, -110.92, -106.98, 
-104.33, -108.83, -104.65, -107.25, -106.1, -108.77, -106.32, 
-110.93, -110.12, -105.27, -108.52, -110.43, -108.2, -106.8, 
-106.68, -106.92, -109.18, -107.53, -104.32, -106.3, -106.33, 
-106.13, -104.82, -104.82, -109.08, -106.38, -109.07, -104.17, 
-109.67, -105.92, -108.6, -105.12, -107.53, -105.4, -105.42, 
-109.62, -104.98, -106.42, -108.37, -106.62, -110.95, -109.42, 
-110.07, -110.42, -104.57, -108.87, -107.48, -105.47, -105.72, 
-105.88, -105.82, -108.63, -109.47, -108.05, -104.77, -104.37, 
-108.95, -105.18, -105.23, -104.6, -110.77, -104.37, -106.63, 
-106.77, -110.53, -110.02, -104.12, -110.2, -104.17, -110.23, 
-104.7, -104.67, -108.73, -105.58, -105.68, -105.37, -106.83, 
-106.02, -104.35, -107.62, -108.38, -104.43, -106.2, -106.28, 
-104.93, -110.72, -110.58, -104.33, -108.8, -107.47, -104.2, 
-107.43, -106.83, -108.68, -104.48, -104.07, -109.85, -108.77, 
-107.92, -107.2, -105.68, -104.28, -105.52, -108.38, -104.93, 
-109.22, -109.07, -110.97, -108.18, -106.8, -107.8, -106.97, 
-106.87, -108.12, -108.8, -104.17, -105.08, -104.35, -108.98, 
-104.38, -107.42, -107.32, -108.2, -108.67, -104.22, -110.42, 
-104.62, -104.77, -107.98, -105.33, -104.63, -104.92, -107.97, 
-107.97, -110.7, -104.3, 36.68, 36.13, 36.15, 35.72, 35.28, 36.42, 
36.35, 35.87, 35.17, 35.5, 35.68, 35.02, 37.43, 40.2, 39.58, 
37.87, 39, 37.02, 38.98, 40.25, 39.18, 39.02, 39.4, 37.43, 39.88, 
39.1, 39.62, 40.02, 38.45, 37.02, 39.48, 40.65, 38.83, 39.3, 
38.03, 39.7, 38.43, 40, 39.37, 38.9, 37.75, 39.22, 39.65, 38.82, 
39.38, 38.43, 39.1, 38.82, 37.35, 38.87, 37.63, 37.67, 38.75, 
39.77, 39.75, 39.6, 37.38, 37.47, 37.28, 38.48, 39.08, 39.08, 
39.03, 39.22, 39.23, 39.2, 39.17, 39.13, 39.13, 37.55, 40.38, 
39.63, 37.03, 39.23, 39.28, 40.67, 38.55, 40.58, 37.23, 40.08, 
38.68, 38.13, 39.95, 39.15, 37.77, 38.7, 39.28, 39.7, 39.52, 
40.15, 39.12, 39.07, 40.27, 40.25, 37.72, 40.42, 39.88, 40.87, 
38.68, 38.53, 40.37, 39.03, 38.45, 39.93, 40.48, 37.75, 38.05, 
40.58, 40.05, 39.75, 39.7, 37.13, 38.07, 39.77, 41, 38.8, 39.5, 
40.85, 39.28, 39.3, 38.77, 38.05, 38.92, 38.82, 39.75, 38.07, 
38.08, 37.5, 39.25, 40.48, 38.12, 39.2, 39.27, 38.98, 40, 40.17, 
37.35, 40.02, 40.52, 40.03, 37.2, 37.57, 38.48, 38.48, 39.08, 
37.82, 38.13, 38.22, 40.27, 38.02, 37.27, 39.1, 37.45, 38.87, 
38.37, 39.52, 39.92, 38.45, 38.6, 38.03, 38.28, 38.28, 38.3, 
40.23, 40.08, 37.68, 39.52, 38.03, 38.87, 38.85, 37.92, 38.53, 
38.47, 38.4, 40.85, 39.57, 37.8, 40.48, 37.4, 37.38, 37.28, 40.5, 
40.62, 37.3, 39.3, 39.25, 38.42, 38.82, 37.95, 37.17, 37.25, 
37.08, 39.08, 37.55, 38.37, 37.37, 39.3, 37.8, 40.73, 37.62, 
40.42, 38.13, 38.17, 40.15, 40.48, 39.9, 37.48, 37.48, 40.07, 
40.15, 37.55, 40.12, 39.72, 38.47, 37.2, 39.8, 38.52, 39.35, 
37.55, 38.12, 38.8, 37.8, 39.38, 37.27, 38.9, 38.12, 39.63, 37.77, 
39.62, 38.78, 37, 38.93, 37.45, 37.97, 37.98, 39.37, 38.97, 37.6, 
38.87, 38.6, 39.38, 39.5, 39.35, 37.18, 38.28, 38.72, 38.08, 
38.23, 37.93, 39.67, 37.9, 38.18, 39.62, 38.48, 38.67, 37.03, 
39.67, 39.95, 38.67, 39.5, 38.58, 39.78, 37.28, 39.27, 37.45, 
39.18, 38.45, 39.83, 39.82, 39.83, 39.68, 39.13, 39.82, 39.23, 
39.75, 37.27, 39.23, 39.07, 38.63, 39.47, 37.33, 37.23, 38.9, 
39.77, 39.85, 39.18, 38.48, 38.67, 38.9, 39.43, 37.48, 37.98, 
38.47, 37.82, 37.58, 38.65, 39.02, 39.17, 39.42, 39.07, 42.42, 
42.55, 42.1, 40.1, 41.62, 41.42, 41.42, 41.57, 40.37, 40.13, 
40.05, 40.52, 41.07, 42.13, 41.95, 41.67, 41.4, 41.78, 40.27, 
40.7, 42.83, 41.55, 41.75, 40.22, 40.63, 41.42, 42.17, 42.05, 
42.38, 42.27, 40.48, 40.42, 40.68, 42.65, 40.93, 40.02, 41.9, 
40.08, 41.65, 42.68, 40.52, 42.68, 42.5, 41.15, 40.43, 40.43, 
41.98, 40.52, 40.52, 40.7, 41.23, 41.22, 40.57, 40.8, 41.15, 
41.92, 40.85, 41.23, 40.2, 40.38, 42.92, 41.95, 40.68, 42.05, 
42.27, 40.07, 42.72, 42.6, 41.13, 41.07, 41.08, 41.13, 40.13, 
41.3, 40.35, 41.13, 41.22, 40.32, 42.15, 42.72, 40.43, 41.87, 
41.13, 41.13, 42.82, 41.48, 40.53, 40.13, 41.77, 40.18, 41.55, 
42.58, 42.88, 40.83, 40.42, 40.75, 42.07, 42.4, 40.12, 36.18, 
36.23, 35.05, 36.1, 35.9, 36.83, 35.78, 36.52, 35.53, 35.28, 
36.3, 36.67, 35.98, 36.48, 36.73, 36.73, 36.07, 36.17, 36.9, 
36.52, 36.45, 35.02, 35.4, 35.68, 36.68, 36.77, 36.93, 36.57, 
35.05, 36.33, 36.6, 35.98, 36.75, 36.72, 35.35, 35.47, 36.73, 
35.52, 35.9, 36.43, 36.33, 35.58, 35.27, 35.17, 36.6, 36.05, 
35.38, 35.78, 35.95, 35.03, 36.98, 35.6, 35.65, 36.23, 35.3, 
36.55, 35.33, 35.8, 35.9, 35.65, 36.82, 36.28, 35.07, 35.55, 
36.18, 36.3, 36.32, 36.3, 35.58, 35.58, 36.17, 35.8, 35.65, 35.22, 
36.92, 36.75, 36.7, 36.18, 35.37, 35.95, 35.08, 35.08, 35.22, 
35.17, 35.07, 35.68, 35.45, 36.77, 36.82, 36.38, 35.17, 35.93, 
36.42, 36.72, 35.85, 35.8, 36.65, 35.18, 35.2, 35.5, 35.82, 35.97, 
35.1, 36.13, 36.82, 36.73, 36.83, 36.02, 35.62, 35.42, 35.22, 
36.38, 36.55, 36.77, 36.3, 36.85, 36.6, 36.68, 35.63, 35.02, 
36.87, 36.92, 35.87, 35.13, 36.23, 36.93, 35.65, 35.27, 36.58, 
36.17, 36.45, 36.42, 43.45, 43.37, 43.07, 44.7, 44.52, 43.48, 
44.22, 43.58, 44.95, 43.82, 43.77, 44.38, 44.07, 44.25, 44.83, 
44.3, 43.98, 44.4, 44.63, 44.08, 43.23, 43.17, 44.35, 44.53, 
44.38, 43.83, 44.52, 44.87, 44.33, 43.93, 44.5, 43.43, 43.75, 
43.83, 43.43, 44.35, 43.47, 43.23, 44.77, 43.17, 44.07, 44.45, 
43.12, 43.75, 44.73, 44.43, 43.18, 44.7, 44.73, 44.07, 44.05, 
44.38, 43.03, 43.78, 44.15, 44.07, 44.7, 43.78, 44.55, 44.48, 
44.25, 44.57, 44.62, 44.07, 44.25, 43.02, 43.38, 43.5, 35.23, 
36.47, 35.65, 35.65, 36.18, 36.12, 35.92, 35.12, 36.4, 36.02, 
36.43, 35.85, 36.43, 36.25, 35.88, 36.12, 36.5, 36.23, 35.23, 
35.7, 35.52, 36.05, 36.1, 35.53, 35.33, 36.4, 36.45, 36.2, 36.33, 
36.02, 35.55, 35.25, 40.85, 40.32, 37.62, 37.28, 40.03, 37.72, 
38.97, 40.43, 40.17, 40.93, 40.28, 40.22, 39, 38.42, 40.43, 37.38, 
40.37, 40.98, 37.15, 38.58, 37.87, 37.02, 40.57, 40.2, 37.02, 
40.42, 40.08, 39.6, 40.3, 38.97, 40.45, 42.75, 42.73, 44.65, 
43.67, 41.15, 43.18, 44.7, 42.53, 42.55, 42.9, 42.53, 43.25, 
41.58, 43.23, 43.42, 44.37, 44.35, 44.22, 44.5, 44.77, 41.05, 
42.87, 42.92, 41.3, 41.15, 41.75, 44.98, 44.62, 44.53, 44.9, 
44.9, 44.18, 44.88, 44.12, 41.03, 42.18, 42.75, 43.55, 43.42, 
41.7, 44.52, 41.18, 41.27, 42.12, 41.98, 41.4, 42.33, 43.02, 
42.83, 44.28, 44.08, 42.87, 42.67, 43.93, 41.53, 44.5, 42.3, 
42.93, 44.7, 41.15, 41.45, 44.68, 43.47, 42.47, 43.73, 43.35, 
41.8, 43.17, 42.83, 42.27, 41.63, 44.9, 43.05, 43.3, 42.82, 41.32, 
41.32, 43.8, 42.18, 43.57, 42.1, 43.3, 44.85, 42.77, 41.9, 43.42, 
44.27, 43.67, 43.87, 43.52, 43.22, 42.35, 43.85, 44.98, 42.47, 
43.25, 41.63, 41.18, 42.87, 44.75, 44.2, 41.8, 44.78, 43.25, 
43.68, 43.02, 43.6, 41.58, 41.6, 41.82, 42.77, 41.45, 44.55, 
44.77, 44.85, 43.23, 42.47, 43.43, 44.78, 44.4, 44.05, 41.35, 
44.03, 43.77, 43.65, 43.72, 42.08, 44.92, 44.1, 43.93, 41.68, 
44.63, 42.23, 42.08, 44.02, 43.97, 44.97, 41.93), .Dim = c(800, 
2), .Dimnames = list(c("stn.020750", "stn.020800", "stn.021634", 
"stn.023303", "stn.024872", "stn.025129", "stn.025204", "stn.026124", 
"stn.027496", "stn.027671", "stn.029410", "stn.029439", "stn.050130", 
"stn.050183", "stn.050214", "stn.050228", "stn.050263", "stn.050307", 
"stn.050343", "stn.050354", "stn.050370", "stn.050437", "stn.050454", 
"stn.050776", "stn.050810", "stn.050825", "stn.050834", "stn.050848", 
"stn.050895", "stn.050898", "stn.050909", "stn.050945", "stn.051071", 
"stn.051121", "stn.051157", "stn.051179", "stn.051294", "stn.051342", 
"stn.051401", "stn.051440", "stn.051458", "stn.051528", "stn.051547", 
"stn.051564", "stn.051660", "stn.051713", "stn.051772", "stn.051778", 
"stn.051886", "stn.051959", "stn.052178", "stn.052184", "stn.052192", 
"stn.052220", "stn.052225", "stn.052281", "stn.052312", "stn.052326", 
"stn.052432", "stn.052446", "stn.052494", "stn.052496", "stn.052501", 
"stn.052593", "stn.052595", "stn.052597", "stn.052598", "stn.052601", 
"stn.052603", "stn.052624", "stn.052759", "stn.052790", "stn.052803", 
"stn.052814", "stn.052932", "stn.052944", "stn.052997", "stn.053005", 
"stn.053016", "stn.053027", "stn.053063", "stn.053079", "stn.053113", 
"stn.053146", "stn.053222", "stn.053246", "stn.053258", "stn.053261", 
"stn.053359", "stn.053423", "stn.053488", "stn.053489", "stn.053496", 
"stn.053500", "stn.053541", "stn.053546", "stn.053592", "stn.053643", 
"stn.053656", "stn.053662", "stn.053738", "stn.053811", "stn.053828", 
"stn.053850", "stn.053867", "stn.053951", "stn.054076", "stn.054082", 
"stn.054129", "stn.054234", "stn.054242", "stn.054250", "stn.054388", 
"stn.054397", "stn.054413", "stn.054444", "stn.054452", "stn.054460", 
"stn.054584", "stn.054585", "stn.054603", "stn.054734", "stn.054742", 
"stn.054750", "stn.054762", "stn.054770", "stn.054834", "stn.054865", 
"stn.054884", "stn.054945", "stn.055001", "stn.055015", "stn.055017", 
"stn.055041", "stn.055048", "stn.055116", "stn.055327", "stn.055408", 
"stn.055446", "stn.055484", "stn.055531", "stn.055706", "stn.055717", 
"stn.055722", "stn.055730", "stn.055970", "stn.056012", "stn.056131", 
"stn.056192", "stn.056203", "stn.056258", "stn.056266", "stn.056271", 
"stn.056306", "stn.056315", "stn.056326", "stn.056342", "stn.056410", 
"stn.056513", "stn.056524", "stn.056740", "stn.056743", "stn.056763", 
"stn.056797", "stn.056832", "stn.057017", "stn.057031", "stn.057167", 
"stn.057287", "stn.057309", "stn.057315", "stn.057370", "stn.057455", 
"stn.057460", "stn.057515", "stn.057618", "stn.057656", "stn.057848", 
"stn.057862", "stn.057866", "stn.057867", "stn.057936", "stn.057950", 
"stn.057992", "stn.058008", "stn.058064", "stn.058157", "stn.058184", 
"stn.058204", "stn.058429", "stn.058434", "stn.058468", "stn.058501", 
"stn.058510", "stn.058560", "stn.058582", "stn.058722", "stn.058742", 
"stn.058756", "stn.058781", "stn.058839", "stn.058931", "stn.058986", 
"stn.059025", "stn.059147", "stn.059175", "stn.059181", "stn.059183", 
"stn.059243", "stn.059265", "stn.059275", "stn.059295", "stn.140020", 
"stn.140135", "stn.140365", "stn.140439", "stn.140865", "stn.141029", 
"stn.141104", "stn.141141", "stn.141383", "stn.141522", "stn.141699", 
"stn.141704", "stn.141730", "stn.142040", "stn.142086", "stn.142164", 
"stn.142213", "stn.142421", "stn.142432", "stn.142452", "stn.142855", 
"stn.142975", "stn.142980", "stn.143153", "stn.143175", "stn.143239", 
"stn.143527", "stn.143554", "stn.143660", "stn.143663", "stn.143837", 
"stn.143855", "stn.143946", "stn.144073", "stn.144081", "stn.144085", 
"stn.144333", "stn.144357", "stn.144464", "stn.144530", "stn.144642", 
"stn.144665", "stn.144667", "stn.144695", "stn.144775", "stn.144807", 
"stn.144821", "stn.144877", "stn.145115", "stn.145127", "stn.145171", 
"stn.145355", "stn.145371", "stn.145628", "stn.145692", "stn.145787", 
"stn.145852", "stn.145854", "stn.145856", "stn.145888", "stn.145906", 
"stn.146192", "stn.146374", "stn.146427", "stn.146435", "stn.146637", 
"stn.146685", "stn.146787", "stn.146808", "stn.146813", "stn.147049", 
"stn.147093", "stn.147095", "stn.147140", "stn.147271", "stn.147273", 
"stn.147397", "stn.147832", "stn.147922", "stn.148038", "stn.148235", 
"stn.148245", "stn.148287", "stn.148323", "stn.148495", "stn.148498", 
"stn.148648", "stn.148988", "stn.250030", "stn.250050", "stn.250130", 
"stn.250145", "stn.250245", "stn.250320", "stn.250355", "stn.250365", 
"stn.250427", "stn.250640", "stn.250760", "stn.250810", "stn.250865", 
"stn.251045", "stn.251130", "stn.251145", "stn.251200", "stn.251345", 
"stn.251415", "stn.251450", "stn.251575", "stn.251835", "stn.252000", 
"stn.252065", "stn.252100", "stn.252145", "stn.252629", "stn.252645", 
"stn.252646", "stn.252647", "stn.252690", "stn.252741", "stn.252790", 
"stn.253015", "stn.253365", "stn.253515", "stn.253540", "stn.253595", 
"stn.253605", "stn.253615", "stn.253690", "stn.253710", "stn.253715", 
"stn.253810", "stn.253910", "stn.253911", "stn.254100", "stn.254110", 
"stn.254111", "stn.254335", "stn.254440", "stn.254455", "stn.254604", 
"stn.254778", "stn.254900", "stn.255020", "stn.255090", "stn.255250", 
"stn.255310", "stn.255388", "stn.255470", "stn.255590", "stn.255655", 
"stn.255700", "stn.255702", "stn.255780", "stn.255860", "stn.255925", 
"stn.256065", "stn.256075", "stn.256167", "stn.256200", "stn.256365", 
"stn.256390", "stn.256480", "stn.256585", "stn.256880", "stn.257002", 
"stn.257318", "stn.257415", "stn.257450", "stn.257665", "stn.257830", 
"stn.257835", "stn.258090", "stn.258130", "stn.258215", "stn.258255", 
"stn.258455", "stn.258628", "stn.258650", "stn.258755", "stn.258760", 
"stn.258920", "stn.259020", "stn.259115", "stn.259262", "stn.259266", 
"stn.259325", "stn.290022", "stn.290041", "stn.290234", "stn.290245", 
"stn.290377", "stn.290692", "stn.290743", "stn.290795", "stn.290858", 
"stn.290903", "stn.291000", "stn.291063", "stn.291269", "stn.291389", 
"stn.291452", "stn.291630", "stn.291647", "stn.291653", "stn.291664", 
"stn.291813", "stn.291887", "stn.291913", "stn.292030", "stn.292219", 
"stn.292321", "stn.292453", "stn.292608", "stn.292700", "stn.292785", 
"stn.292820", "stn.292837", "stn.293031", "stn.293128", "stn.293134", 
"stn.293234", "stn.293305", "stn.293340", "stn.293420", "stn.293488", 
"stn.293505", "stn.293511", "stn.293586", "stn.293592", "stn.293682", 
"stn.293706", "stn.293878", "stn.294366", "stn.294369", "stn.294398", 
"stn.294719", "stn.294742", "stn.294850", "stn.294856", "stn.295290", 
"stn.295467", "stn.295490", "stn.295560", "stn.295685", "stn.296028", 
"stn.296040", "stn.296061", "stn.296098", "stn.296115", "stn.296258", 
"stn.296275", "stn.296321", "stn.296465", "stn.296619", "stn.296676", 
"stn.296693", "stn.296705", "stn.296900", "stn.296991", "stn.297026", 
"stn.297279", "stn.297283", "stn.297323", "stn.297346", "stn.297403", 
"stn.297638", "stn.297827", "stn.297867", "stn.298011", "stn.298015", 
"stn.298018", "stn.298072", "stn.298261", "stn.298284", "stn.298352", 
"stn.298501", "stn.298518", "stn.298524", "stn.298668", "stn.298845", 
"stn.298919", "stn.299031", "stn.299085", "stn.299153", "stn.299156", 
"stn.299193", "stn.299330", "stn.299820", "stn.299897", "stn.340332", 
"stn.340593", "stn.340908", "stn.341243", "stn.341396", "stn.341738", 
"stn.342849", "stn.342944", "stn.343070", "stn.343304", "stn.343358", 
"stn.343407", "stn.343489", "stn.343628", "stn.343835", "stn.343871", 
"stn.344204", "stn.344298", "stn.344766", "stn.345090", "stn.346035", 
"stn.346139", "stn.347534", "stn.347579", "stn.347952", "stn.348627", 
"stn.349172", "stn.349760", "stn.349762", "stn.390043", "stn.390217", 
"stn.390236", "stn.390559", "stn.390760", "stn.391124", "stn.391246", 
"stn.391539", "stn.391560", "stn.391609", "stn.392087", "stn.392207", 
"stn.392228", "stn.392409", "stn.392446", "stn.392647", "stn.392888", 
"stn.393069", "stn.393082", "stn.393089", "stn.393452", "stn.393574", 
"stn.393672", "stn.393677", "stn.393760", "stn.393775", "stn.393832", 
"stn.393838", "stn.393857", "stn.393868", "stn.393987", "stn.394007", 
"stn.394184", "stn.394413", "stn.394630", "stn.394834", "stn.394983", 
"stn.395154", "stn.395184", "stn.395281", "stn.395506", "stn.395544", 
"stn.395638", "stn.395854", "stn.396054", "stn.396170", "stn.396212", 
"stn.396292", "stn.396357", "stn.396427", "stn.396552", "stn.396597", 
"stn.396612", "stn.396832", "stn.396937", "stn.396947", "stn.397073", 
"stn.397512", "stn.397877", "stn.397882", "stn.397992", "stn.398494", 
"stn.398552", "stn.398911", "stn.399032", "stn.399187", "stn.399367", 
"stn.399442", "stn.410211", "stn.410944", "stn.410958", "stn.411033", 
"stn.411203", "stn.411224", "stn.411412", "stn.411778", "stn.411874", 
"stn.412240", "stn.412282", "stn.412617", "stn.413225", "stn.413787", 
"stn.413981", "stn.414140", "stn.414196", "stn.415247", "stn.415770", 
"stn.415875", "stn.415987", "stn.416070", "stn.416477", "stn.416775", 
"stn.416785", "stn.416950", "stn.416953", "stn.418523", "stn.418692", 
"stn.418761", "stn.418852", "stn.419330", "stn.420050", "stn.420074", 
"stn.420738", "stn.420788", "stn.420810", "stn.421308", "stn.421440", 
"stn.422173", "stn.422253", "stn.422864", "stn.422996", "stn.423056", 
"stn.423418", "stn.423611", "stn.423624", "stn.424100", "stn.424342", 
"stn.425377", "stn.425582", "stn.425733", "stn.425805", "stn.425812", 
"stn.425815", "stn.425969", "stn.426076", "stn.426123", "stn.426568", 
"stn.427015", "stn.427395", "stn.428705", "stn.429111", "stn.480027", 
"stn.480091", "stn.480200", "stn.480228", "stn.480270", "stn.480324", 
"stn.480380", "stn.480443", "stn.480550", "stn.480605", "stn.480695", 
"stn.480725", "stn.480761", "stn.480865", "stn.481000", "stn.481160", 
"stn.481165", "stn.481171", "stn.481175", "stn.481220", "stn.481547", 
"stn.481565", "stn.481570", "stn.481610", "stn.481675", "stn.481730", 
"stn.481775", "stn.481816", "stn.481840", "stn.481905", "stn.482135", 
"stn.482410", "stn.482415", "stn.482580", "stn.482610", "stn.482680", 
"stn.482693", "stn.482715", "stn.482725", "stn.482995", "stn.483031", 
"stn.483045", "stn.483100", "stn.483170", "stn.483396", "stn.483430", 
"stn.483490", "stn.483570", "stn.483801", "stn.483855", "stn.483865", 
"stn.483950", "stn.483960", "stn.484036", "stn.484065", "stn.484080", 
"stn.484126", "stn.484300", "stn.484411", "stn.484440", "stn.484700", 
"stn.484760", "stn.484910", "stn.484920", "stn.485055", "stn.485065", 
"stn.485105", "stn.485115", "stn.485170", "stn.485252", "stn.485260", 
"stn.485355", "stn.485372", "stn.485377", "stn.485390", "stn.485411", 
"stn.485415", "stn.485467", "stn.485525", "stn.485581", "stn.485612", 
"stn.485734", "stn.485770", "stn.485830", "stn.486120", "stn.486195", 
"stn.486395", "stn.486428", "stn.486440", "stn.486450", "stn.486470", 
"stn.486595", "stn.486660", "stn.487079", "stn.487105", "stn.487115", 
"stn.487200", "stn.487235", "stn.487260", "stn.487380", "stn.487473", 
"stn.487533", "stn.487540", "stn.487555", "stn.487683", "stn.487760", 
"stn.487810", "stn.487840", "stn.487845", "stn.487955", "stn.487980", 
"stn.487990", "stn.488124", "stn.488155", "stn.488160", "stn.488209", 
"stn.488385", "stn.488475", "stn.488647", "stn.488705", "stn.488758", 
"stn.488845", "stn.488855", "stn.488858", "stn.488875", "stn.488888", 
"stn.488995", "stn.489025", "stn.489205", "stn.489207", "stn.489459", 
"stn.489580", "stn.489604", "stn.489615", "stn.489770", "stn.489785", 
"stn.489905", "stn.489925"), NULL)), y = c(6.88142498079943, 
12.828531171141, 10.7530043989199, 6.46638533451725, 4.52475461613729, 
12.0468687017768, 2.60530934079909, 14.1490098297579, 2.42996832338299, 
3.88051976261965, 10.9853050651015, 10.6496941049767, 3.27202807877898, 
17.7191885264312, 6.20322992308589, 6.46124505488185, 5.33373484055523, 
2.46142223527092, 1.7989531501194, 6.2769260040748, 5.40179734115642, 
7.23528144507745, 8.33199354174285, 1.48414747331847, 8.00437421479023, 
6.04928919186746, 2.99079160616292, 3.96770455024423, -4.56138740229513, 
3.45818118828458, 11.6440344300905, 9.22362744347031, 13.8972291756791, 
-4.49694671607203, 2.19108990175519, 5.88532222118481, 0.791262565878725, 
9.09857652929047, 8.53649729345583, 0.600188775764073, 3.4880726743749, 
10.5553776965111, 13.9354503405732, -2.83082398542841, 12.2663419499165, 
5.49992186369958, 7.06619501910783, 6.74150994455085, 7.58410338767101, 
4.23081340391712, 1.23483082456426, 1.372537514615, 0.658209102315789, 
4.82923411185458, 7.63957802513116, 8.15130678413008, 4.03934788818608, 
9.077409718782, 8.16900060402525, 3.11595301090272, 6.14593078144328, 
7.83565482352796, 9.63374908524208, 6.10108376138803, 8.67635135223816, 
5.28650253808807, 1.38227352569537, 7.64994269030643, 5.24930198486004, 
5.59653288596268, 10.6537182053863, 5.87724398520484, -7.22435185602756, 
10.9966096918055, -1.04533440886287, 8.01784156687069, 3.70505482670694, 
2.21053581914945, 4.52523909819852, 5.77450119963429, -1.63406019295519, 
2.28090199949502, 11.3201199591692, 8.21465905571478, 5.6183802120345, 
1.07380400289211, 5.6168331381189, 7.07189498915915, 4.43954822104766, 
2.63310410691303, 3.87799823127848, 9.84409317892044, 8.16732507769414, 
5.02431208238613, 1.50326177934655, 10.2251211538348, 11.3236469976216, 
7.82753618787505, 9.48256592350911, 5.60848606533356, 3.81716375943401, 
6.89199441580678, 5.69744417500699, 7.46744242530189, 6.06678356814029, 
2.01495076479037, -3.06186128578667, 0.933649743580615, 6.51547144006716, 
6.3305929152502, 2.97236751969259, 5.14841002661832, 3.16537051137812, 
7.36882678975297, -4.54462950246917, 10.4656354644844, 3.63754444813553, 
12.3461141244247, 8.63899704398461, 8.75288013475009, 1.14098425387566, 
5.01899296975139, 2.83122169385834, 8.51293141619892, 3.70844299508764, 
0.992549935653404, 2.96727547416952, -1.23998824630664, 6.14049678920779, 
5.51949131304245, 0.594365742479221, 6.00303899991172, 12.5971689473851, 
4.13520999104341, 5.04061224176932, 5.1712659803941, 11.117545558557, 
5.08311028482723, 7.20504465187382, 6.06336420797263, 7.25082263286279, 
0.488097753906917, 3.27657053977779, 2.75632129083148, 6.73688375642847, 
3.50859261826851, 6.69978411410341, 6.18524752702408, 7.7222541650239, 
1.87169213443672, 5.24493181787282, 6.12493291867679, 4.67385432101198, 
5.28080820346447, 5.10315732652324, 9.8884574817775, 6.89187230836976, 
13.0237711503241, 7.30603040187604, 0.216320144288302, 1.25335709466665, 
7.88434623385701, 2.73052415871206, 5.93257574199592, 4.41758797146902, 
5.72100953241195, 2.59115891680016, 2.43351245114317, 10.0943819509222, 
9.59380177102573, 4.80230428898142, 3.50325195676361, 1.43595610253121, 
5.95395963158008, 2.77497589085238, 1.10169193186752, 3.75299685557109, 
6.88344002082397, 2.88676265006591, 1.7500596776391, -4.89720818890108, 
2.98315309365962, 7.88479639429431, -5.30509227472425, -3.91240044521227, 
8.48776843980857, 3.43114449815441, 8.18951891312486, 9.7913141767396, 
0.971505076105112, 4.46818250800935, 1.63706966777223, 2.80002023497231, 
-3.50642551542844, 4.07064669738313, 5.58904235042169, 6.23901041762403, 
0.225678740647895, 7.08764227491558, 4.71580977429811, 2.60111345903903, 
0.279942538123565, 5.2755647494522, 11.1406671425235, 7.0957483645109, 
8.19984726365449, -1.05406113494436, -1.05205288272427, 5.08038057549067, 
3.19628697357859, 14.5714755396512, 3.36786667758298, -3.50239965227946, 
-3.06142886445204, -5.31094913187982, 4.2204855229427, -4.89417296086503, 
3.5468851770626, -2.15439929039492, -1.88563367206054, -5.12610390856207, 
-3.35116179908758, 1.85145489977747, -3.87556176247544, -7.64141378014975, 
-0.597165128296375, 5.36531156339878, -4.26978015996924, 1.1722009200324, 
-0.132967477322135, -6.39592445591848, -6.52867737709349, -6.17681521859221, 
-1.1442018536608, -7.10534871125206, -0.677379023802576, -6.6438852557042, 
-4.61063556865283, -6.86437983874367, -6.27273919947943, 7.6379780744824, 
8.01257579787613, 2.54615006772856, 6.50810309648259, -4.99441392702869, 
-2.87090049290732, -4.67891393795727, -5.91840787349095, -1.00906355271158, 
7.08160840450753, -3.54480792959808, -4.24955831880181, 2.50343222448609, 
-2.51002306583951, -3.27843283346433, -3.86021388382504, 5.40909754014155, 
8.92009338363007, -5.04861276163526, 0.478080629403348, -4.68342765156835, 
1.30176315932823, -0.369891520147929, -0.711292038707143, -5.66570391172509, 
-7.08490684857577, -7.22619158356916, -1.92921102933899, 2.82337998038793, 
5.9956649786976, 5.95983334279494, -1.32462827488236, -3.80968369295944, 
-6.71966450193766, 8.5065403451312, -1.21727175381135, -4.86677067338648, 
-5.47044252587439, -4.73926084369637, 2.73914073855306, -6.38500086249138, 
-11.0256218355231, -3.41411183794911, 5.87554592633123, 6.70637043403606, 
-3.50437197887061, -0.755079192151388, -2.62437921930412, -5.20774392165142, 
-0.626782214978501, -9.7205539113605, -0.371436600480202, -5.2851061455248, 
-2.71133470993733, -10.6793061235498, -3.43539254300143, -6.29161710136201, 
-5.87339669265581, -0.74828289927817, -3.4245578990865, 0.558742706576824, 
4.19801212928496, 12.1422652061075, 6.01957360207233, 8.18638518380911, 
-3.758152738064, 6.06715164943026, 6.56397903152785, 1.12413408515939, 
10.96059523149, 6.21214901097478, 5.96002375934116, 1.91812678627663, 
7.56502803271737, 10.5683308315036, -2.66640757744266, 5.67565584713739, 
9.4127422597324, 5.95108514729998, 3.65527968448133, -5.5792369400459, 
6.16516935659138, 9.30980525717216, 1.30690711847586, -0.399812891974596, 
-0.892345903525028, 4.02960463749328, 7.50381865930482, 5.4266223849021, 
7.21758993876121, 0.903125511632826, 2.96847003374728, 4.58743706085851, 
-4.59300314955636, 2.30453954890358, 10.2152813880607, 10.6086667524369, 
2.78556060050753, -2.08840089200808, -2.08098822995868, 5.5113028402953, 
0.862305682713497, 10.6075196110325, 5.0774032383536, -2.82197762391528, 
-2.66539735489365, 5.99444786581604, 7.54498736214354, 8.88504369834015, 
-1.45982729299385, -1.30341221886362, 2.47058285120493, 0.980750949637107, 
1.50756209227447, 2.90301300514632, 2.77131493705002, -0.845545240368418, 
2.10291447020002, -0.698784006335648, 5.26504179038019, -0.931162438919484, 
-1.37897962295178, 1.29455859591019, 4.95614889501385, 5.73919318207045, 
2.75146276035872, 0.459881853081965, -3.42193951258924, 1.24043692554183, 
2.22287448232838, 0.767064305662672, -1.97539026833273, 5.77333706151819, 
-3.85846467250722, 2.48625005096162, 4.61562792374292, 5.96794164976865, 
-2.82667633617739, 5.53720145762695, -0.202175408247641, -0.0982614543198945, 
0.445753155384878, 0.505920411213978, 2.0706419381397, -2.07793493324744, 
4.76398949521831, -2.11473558578736, 7.13866501904121, 11.0514128720807, 
0.724436351639966, 5.99476359635788, 5.65582873232862, 0.281756876867671, 
2.25582280074819, 3.72084690647898, 1.97290236737209, 1.83260233707633, 
-0.0183546494828519, 6.6754422460809, 13.9496570918815, -2.53551198522493, 
5.63501144077408, 3.17432538611967, 5.23335467804732, 1.53663382277822, 
1.35743753389543, 6.4286986161803, 3.92933028039574, 7.3546545409585, 
5.07124007497086, 5.49914479296853, 2.20939347376288, 2.74703213527528, 
4.15787604059715, 1.55718548828197, 3.72568238636757, 3.8547114903037, 
5.9485766742869, -0.11448645065358, 8.26753675000823, -0.144415745399485, 
7.04039872448342, 0.0203559245225335, 2.14026736201013, 3.20323380218742, 
6.12885054821902, 4.47788132729932, 3.42998831239599, -1.75055891395279, 
1.42841245610483, 5.40039860183942, 0.678105865673876, 1.15804617618559, 
2.5402118993696, 5.8664554769583, 0.357064803364539, 6.22117503007502, 
1.41895914846522, 5.44934121482544, -3.36465503817408, 3.69759320683115, 
4.14842340521744, 4.29683728466685, -0.0142689057728553, 10.7714678021672, 
5.29100242014644, 8.33327070002987, -2.00733051609671, 2.19132559702557, 
2.03241114235098, 4.47816464539299, 2.26114196742469, 4.58155451948071, 
3.32486530429696, 4.71004200552435, 5.85243088865097, 3.24063478279171, 
1.19411876458556, 7.16112943961405, 2.37698055011643, 8.66520522528096, 
5.59939662403622, 3.9475350525022, 1.83657214070587, -1.66057844713633, 
5.39509202168925, 1.72149318954911, -1.53156342657936, 4.08451407744349, 
2.04695936120957, 0.657902654411943, 2.68597413308682, 3.30947036004765, 
-0.144507797405367, 0.193892985842076, 2.57659600351439, 1.61495851913537, 
6.33551582920666, 3.79810592315696, 1.44468553998021, 5.24461039067825, 
9.70387115925262, 5.50860453560789, 6.30878038674368, 1.63132820493929, 
3.53028701280087, 7.42902647386599, 0.880618947722159, 4.45678394407635, 
4.76353787552563, 1.15617906208024, 0.406967475140016, 5.13002643916729, 
6.5275471218308, 0.166684977219637, -0.968948874871353, 6.65507453210326, 
6.87811613904209, -4.3277262219, 1.53950131972748, 2.18561343767715, 
9.53007465629767, -2.42159262248225, 0.566602527819786, 2.80891635225115, 
-6.3092899067809, -6.78609624676481, -2.09308205809517, -1.23968096870643, 
3.05180267924151, -12.742006993222, -6.66357209692785, -8.72381650557972, 
-9.6888092067419, 0.627151804451167, -3.32084464627856, -3.69024268850103, 
-6.41265377977619, -3.83900570545051, -1.49428797584041, 3.45685308674576, 
-10.2657044364416, -1.40262475195014, -7.64910441770838, 0.637561287524393, 
-9.06988653043754, -1.12547388163815, -10.4536144207749, -9.27006324264995, 
-7.67000820706206, -8.99731280854149, -7.06277109559403, 2.05654690336754, 
-3.35964511610519, -0.673611774036821, -6.21345234980909, -1.64135614826816, 
-9.00822609687815, -0.0127947289518531, -2.15022694659134, -4.91228778057024, 
2.42002207912395, -5.06102738270521, -6.28815075068243, -8.86255946686469, 
-1.42999503444549, -4.52391211510076, -1.73952210565962, -5.27990157977616, 
-0.211377205410685, -8.11407699247906, -6.71221554318004, -0.281498654131008, 
-1.73358802513136, -0.92669528712921, -6.9109199964874, -3.93083848220266, 
0.550078876836569, -1.76328440301376, -7.75642855349238, -2.23468447514509, 
4.29713208022645, -1.81532181375115, -3.52252570024667, 0.701580200378025, 
-8.48806025147854, -6.80735114440852, 0.737485269587481, 0.106992283482825, 
-3.15000690991055, 0.1505411375176, -2.31889859863865, -6.52813075630262, 
-5.6935516729877, -1.20306312733801, 0.62560853859604, 0.378602618890273, 
3.0613624453214, -6.86392351697168, -1.559822343998, -4.88982986186357, 
-4.18355324585954, -4.75736311479034, 0.777269549013306, -4.64653066163345, 
-0.37496622161556, 1.25259498279897, -2.64323473595975, -2.49426552097388, 
-0.199093910821308, -1.9471068867793, 0.320242865521958, 0.389168497833905, 
-3.46154088943385, -2.91466692060616, 7.59732991207595, -4.87299608141383, 
-0.225809194913607, -4.52082437565216, 3.33018773137481, -4.09761486810366, 
-3.23559266480079, 2.19578978818748, -5.99409381655979, 12.7472359653807, 
2.72619745919263, 12.0931207808235, 9.21425215370296, 4.12318644512729, 
2.09012370284311, 1.00161446339277, -0.79044788556851, -3.94439450935425, 
3.29679033107054, -9.35798499453041, -3.3429444106259, -3.72101763009588, 
3.62499070447879, -1.59329897689235, 8.48198065949599, -7.43127269076367, 
8.43789866846234, -2.13658296250768, 8.78140379670032, -3.03659657911824, 
-3.12145127698955, -7.71176308921536, -2.86424914115803, -3.10572850554936, 
1.96432480407694, 9.37213583549593, 2.82027623449946, 6.09385224806251, 
4.30179226684009, 11.5910326207858, 0.79055570941563, 7.85726565753904, 
3.69533218618495, 5.20109854493935, 2.40674749891411, 2.08234477735975, 
2.68089447211381, 8.81343266397121, 3.76744609317492, 7.9114333134897, 
3.66836519356216, 6.11296050811926, 6.03226381659234, 5.29534318352102, 
5.82697308262524, 3.89387639509839, 3.66112605132538, 4.47572870010085, 
2.83172082303814, 4.12838181621064, 11.2608453312603, 2.01802266581477, 
5.50253644620459, 8.05545485044785, 1.73831601872035, 2.99168411772868, 
-1.08086826053656, -2.01789559292703, 6.59602637244265, -4.2459445814907, 
0.846220268934589, 2.74607125923511, 8.47545379422728, -1.409063029044, 
3.6445606801559, 5.25498022899201, 4.53277910938141, 6.16865665014466, 
4.20532043151952, 5.42520682429703, 5.49901231252149, 6.53778248514856, 
-3.27791671356469, 3.4392685961768, 1.66383319052195, -0.526122899929251, 
-2.47412633787046, 7.36655142350771, -1.13849187857002, -1.04115226780326, 
5.90001310457822, 2.78865806587881, 12.0894254955545, -1.2703758077136, 
-2.98190601142535, -3.36024089372473, -0.878173730548934, -7.69312441184899, 
-1.03069776765151, -0.668268699542597, -4.41702786019804, 4.79920204605538, 
4.18138967146423, -1.2830296944372, -1.22863951762585, -0.320049451629998, 
0.249072033290563, -3.8712112700892, 7.74352979562849, 2.98429528422603, 
4.88606837836374, 2.81169325426156, 2.29415801330643, 1.07494231831596, 
0.463077626227652, 5.38182429047289, -3.74012694585191, -0.998860776458686, 
1.58957976671032, 2.01218935803168, -8.10450643055461, 0.227719378526595, 
-3.45778763522768, 7.77321332115345, -1.22692568324727, -2.81503228209248, 
3.7550439557294, 3.12027573394795, -6.66185615540257, 0.172538907717328, 
0.70359288708053, -1.64287500779244, 3.78893317213589, 4.90676710717379, 
4.39358684392208, -1.77624306077677, 7.66171864415573, 0.0799496328281517, 
-4.0328298148077, -3.70139169845278, -1.51033267270054, 1.23963118443851, 
4.77548907658545, 4.50278002035721, 4.42199626275189, 1.65495216968733, 
-0.142802719096994, 3.46421498594045, 7.68444499101652, -4.90579854029983, 
1.81071510669145, 1.90510433801862, -2.67359279592277, -4.19269740589897, 
-1.29220092876483, -1.1033915800278, -0.519405125004134, -0.716824900949265, 
4.5376631099266, -1.17851756710382, -2.90530859644005, 3.60776525169821, 
0.958644937482624, 3.4667701445165, 5.09651659215058, 3.32590959863263, 
-5.27684563540567, -2.28705792914176, 6.17923501010413, -9.0843493666233, 
-0.74699168497734, 2.96138062593981, -0.794913066981685, 1.07828247853671, 
6.13764584774752, 10.6860506967357, 1.77353902936098, 0.534990833698004, 
5.20219124108299, -6.84237208533316, -2.05716646295884, -2.64680609425409, 
5.96627850420099, 4.38651213642859, 6.7719277779864, -9.87748694446024, 
-2.29047101413988, 0.0356606615304873, 1.59171263117965, -0.899260736463432, 
-2.10752311739232, 1.96132383669769, 3.57424086453478, 0.389629389522408, 
-4.93505471228659, -5.24222790605081, -3.88245628214625, 4.43095778709973, 
-6.51027674143434, 2.994276785485, -3.59375421110519, -4.02981546349756, 
1.39157212080282, 0.80215640024392, 2.17432438691191), x.cv = structure(c(-103.92, 
-106.3, -101.88, -108.93, -99.4, -102.17, -106.15, -103.45, -99.97, 
-106.97, -104.7, -106.73, -104.97, -106.92, -109.1, -109.7, -100.25, 
-101.53, -105.05, -110.03, -108.05, -110.25, -108.13, -104.1, 
-110.37, -102.25, -105.6, -109.75, -103.17, -100.65, -102.33, 
-110.2, -99.85, -100.25, -99.58, -108.93, -107.97, -103.52, -108.92, 
-101.75, -104.77, -110.4, -99.9, -106.83, -107.78, 35.82, 35.88, 
43.97, 43.23, 40.93, 42.8, 38.08, 43.88, 38.25, 36.02, 44.58, 
44.13, 39.38, 42.15, 36.9, 35.55, 42.07, 39.62, 37.22, 41.43, 
44.38, 39.8, 35.43, 41.42, 42.95, 36.23, 40.8, 38.15, 40.12, 
40.35, 41.4, 35.82, 43.9, 35.22, 39.32, 44.38, 39.23, 38.05, 
40.8, 37.57, 42.73, 44.57, 36.72, 39.67, 37.52), .Dim = c(45, 
2), .Dimnames = list(c("stn.295937", "stn.295084", "stn.391972", 
"stn.482595", "stn.255525", "stn.253355", "stn.057337", "stn.395870", 
"stn.144087", "stn.292241", "stn.482466", "stn.480740", "stn.057510", 
"stn.488070", "stn.028468", "stn.024686", "stn.256970", "stn.140836", 
"stn.055990", "stn.481736", "stn.480540", "stn.426340", "stn.298830", 
"stn.480080", "stn.486165", "stn.411946", "stn.056925", "stn.421168", 
"stn.050114", "stn.257110", "stn.256385", "stn.024586", "stn.394516", 
"stn.418235", "stn.141999", "stn.481850", "stn.051741", "stn.054720", 
"stn.051017", "stn.144109", "stn.485085", "stn.485345", "stn.345045", 
"stn.052454", "stn.058154"), NULL)), y.cv = c(NaN, 3.08941691786747, 
-6.22564846610962, 0.610159651970397, 1.55997393048907, 1.90804006857442, 
-1.34281459255921, -1.77021983263728, NA, -1.42146651189901, 
-6.99450951760856, -1.88126313238559, 6.77497326287319, 2.85566346224049, 
5.43109158998858, 10.5347048428363, 9.65426624740292, -1.72516056292771, 
4.92637271729807, 2.72959059512882, -2.99691020583396, 4.15170130541077, 
6.12862988738077, 0.725095799232932, NaN, -0.128297579024157, 
7.03971961679263, NA, 6.53784383427134, -0.801931720547964, 1.49245507604057, 
10.1891485802735, -3.75994915912794, 3.69136133878114, 0.273393949073888, 
-5.93202101761384, 4.94689621771246, 6.09264337750619, NA, -6.90090975554429, 
0.188523541592783, -0.970065154218581, -6.13434548412124, 6.25480938364838, 
6.97518741465347)), .Names = c("x", "y", "x.cv", "y.cv"))
"predict.Krig" <-
function(out, x = NULL, lambda = NA, df = NA, model = NA, 
	eval.correlation.model = TRUE, y = NULL, verbose = FALSE, gcv = FALSE)
{
	#
	# the key to computing the estimate are the coeffients c and d
	# or if these need to be recomputed, the vector u
	# for new data, u needs to be found 
	#
	if(is.null(y)) {
		temp.u <- out$matrices$u
		temp.yM <- out$yM
		temp.c <- out$c
		temp.d <- out$d
	}
	else {
		out2 <- Krig.updateY(out, y, verbose = verbose)
		temp.u <- out2$u
		temp.yM <- out2$yM
		if(verbose) {
			cat("u's")
			print(temp.u)
		}
	}
	#
	# temp.c and temp.d will be calculated below from the new stuff in out2
	#
	#
	# use data x matrix for prediction if it has been omitted. 
	#
	if(is.null(x)) {
		x <- out$x
	}
	x <- as.matrix(x)
	if(verbose)
		print(x)
	#
	# 
	# sometimes one wants to over ride evaluating as a correlation model
	# check for this flag
	#
	correlation.model <- (out$correlation.model & eval.correlation.model)
	# correlation.model is False unless mean.obj and sd.obj 
	# are specified in the call to Krig
	if(correlation.model) {
		#
		# find mean and sd if this is a correlation model 
		# the final predictions will then be transformed by these quantities
		#
		temp.mean <- predict(out$mean.obj, x)
		temp.sd <- predict(out$sd.obj, x)
	}
	#
	# scale the x values 
	# using information from the output object
	# scaling is (0,1) by default
	#
	if(is.null(out$transform)) {
		xc <- rep(0, ncol(x))
		xs <- rep(1, ncol(x))
	}
	else {
		xc <- out$transform$x.center
		xs <- out$transform$x.scale
	}
	x <- scale(x, xc, xs)
	knots <- scale(out$knots, xc, xs)
	#
	if(verbose) {
		print(x)
	}
	#
	#
	# figure out if coefficients  c and d need to be recomputed
	#	
	find.coef <- (!is.null(y) | !is.na(lambda) | !is.na(df))
	#
	# Now we make various choices for filling in lambda
	#
	# if  degrees of freedom is passed then convert to a lmbda and use
	#this.
	if(!is.na(df)) {
		lambda <- Krig.df.to.lambda(df, out$matrices$D)
	}
	#   Fill in from model component
	if(!is.na(model)) {
		lambda <- model[1]
	}
	#
	# if lambda is actually passed and no GCV then use this value for lambda
	#
	if(is.na(lambda) & !gcv) lambda <- out$lambda
	#
	# if GCV then do it and find lambda
	# here we are assuming that new data is supplied.  
	#
	if(gcv) {
		lambda <- gcv.Krig(out, cost = out$cost, offset = out$offset,
			y = y)$lambda.best
	}
	if(find.coef) {
		out3 <- Krig.coef(out, u = temp.u, lambda = lambda, yM = 
			temp.yM)
		temp.d <- out3$d
		temp.c <- out3$c
		if(verbose) {
			cat(" d coefs")
			print(temp.d)
			cat("c coefs")
			print(temp.c)
		}
	}
	#
	# At this point we have  the right coefficients (temp.d and temp.c)
	# to compute the spline.  
	#
	#
	# decide whether to use the fast multiplication routines for the
	#covariance function
	#
	#
	#
	# check whether the covarinace function has the argument C in its call.
	# If so take advantage of it. 
	#
	C.arg.missing <- is.null(formals(get(out$call.name))$C)
	if(C.arg.missing) {
			temp <- c(out$make.tmatrix(x, out$m) %*% temp.d + 
				do.call(out$call.name, c(out$args, list(x1 = x,
				x2 = knots))) %*% temp.c)
	}
	else {
			temp <- c(out$make.tmatrix(x, out$m) %*% temp.d + 
				do.call(out$call.name, c(out$args, list(x1 = x,
				x2 = knots, C = temp.c))))
	}
	#
	# if correlation model do the transformation
	#
	if(correlation.model) temp <- (temp * temp.sd + temp.mean)
	#
	# return lambda also if GCV was done
	#
	if(!gcv) {
		return(temp)
	}
	if(gcv) {
		return(list(predicted = temp, lambda = lambda))
	}
}
"predict.interp.surface" <-
function (obj, loc) 
{
    xg <- (obj$x)
    yg <- (obj$y)
    nx <- length(xg)
    ny <- length(yg)
    xa <- min(xg)
    xb <- max(xg)
    xr <- xb - xa
    ya <- min(yg)
    yb <- max(yg)
    yr <- yb - ya
    lx <- ((nx - 1) * (loc[, 1] - xa))/xr + 1
    ly <- ((ny - 1) * (loc[, 2] - ya))/yr + 1
    lx1 <- ifelse(lx == nx, nx - 1, trunc(lx))
    ly1 <- ifelse(ly == ny, ny - 1, trunc(ly))
    lx1 <- ifelse(lx1 < 1 | lx1 > nx, NA, lx1)
    ly1 <- ifelse(ly1 < 1 | ly1 > ny, NA, ly1)
    ex <- lx - lx1
    ey <- ly - ly1
    temp <- (obj$z[cbind(lx1, ly1)] * (1 - ex) * (1 - ey) + obj$z[cbind(lx1 + 
        1, ly1)] * (ex) * (1 - ey) + obj$z[cbind(lx1, ly1 + 1)] * 
        (1 - ex) * (ey) + obj$z[cbind(lx1 + 1, ly1 + 1)] * ex * 
        ey)
    return(temp)
}
"predict.krig.image" <-
function (obj, x, ...) 
{
    if (missing(x)) {
        temp1 <- c(obj$cov.function(obj$indexM, obj$indexM, Y = obj$delta, 
            cov.obj = obj$cov.obj))
        temp1 <- temp1[obj$rep.info]
        temp2 <- obj$beta[1] + obj$x %*% obj$beta[2:3]
        return(c(temp1 + temp2))
    }
    else {
        predict.interp.surface(obj$surface, x)
    }
}
"predict.qsreg" <-
function (out, x, derivative = 0, model = out$ind.cv.ps) 
{
    if (missing(x)) 
        x <- out$x
    c(splint(out$predicted$x, out$predicted$y[, model], x, derivative = derivative))
}
"predict.se.Krig" <-
function(out, x, cov.function=NULL, rho, sigma2, weights = NULL, cov = FALSE, stationary
	 = TRUE, fixed.mean = TRUE, ...)
{
	# NOTE: to follow along 
	# if lambda is an estimate of the random field at a point
	# and lambda_hat is an estimate based on linear combination of the data
	#
	# MSE( lambda - lambda_hat) = VAR( lambda) - 2* COV( lambda, lambda_hat)
	#      + VAR( lambda_hat)
	#
	# Perhaps the most confusing aspect of this code is that the MSE
	# are found simultanouesly for all the points in x.
	# This is to avoid an explicit for loop 
	#
	#
	if(missing(x)) x <- out$x
	x <- as.matrix(x)
	xraw <- x
	#### transform x to the scale used to fit model
	if(is.null(out$transform)) {
		xc <- rep(0, ncol(x))
		xs <- rep(1, ncol(x))
	}
	else {
		xc <- out$transform$x.center
		xs <- out$transform$x.scale
	}
	x <- scale(x, xc, xs)
	xM <- scale(out$xM, xc, xs)
	##
	########## if covariance function and parameters are missing
	########## extract them from the Krig object
	##
	## figure out what covariance function to use. 

        if(!is.null(cov.function)) {
                if(is.function(cov.function))
                        cov.function <- as.character(substitute(cov.function))
        }
        else{ cov.function<- out$call.name}

        if(missing(sigma2)) {
		sigma2 <- out$sigma2
	}
	#
	# OK now fix the right value for sigma
	#
	if(missing(rho)) {
		rho <- out$rho
	}
	#
	# set switch if the covariance is stationary
		if(!is.null(formals(get(out$call.name))$marginal)) {
			stationary <- FALSE
		}
	#
	lambda <- sigma2/rho
	if(lambda != 0) {
		if((lambda - out$lambda)/lambda > 1e-08) {
			warning("lambda value used is different from the one in the Krig object"
				)
			cat(lambda, out$lambda, fill = TRUE)
		}
	}
	nx <- nrow(xM)
	#
	#       figure out if this is a correlation model and make adustments
	#
	temp.sd <- 1
	var.mean <- 0
	if(out$correlation.model) {
		# predict standard deviations at xraw values
		temp.sd <- c(predict(out$sd.obj, xraw))
		if(!fixed.mean) {
			# for the very end ... the variance in estimating the mean function. 
			var.mean <- predict.se(out$mean.obj, xraw)^2
		}
	}
	#
	# here is where the real fun begins
	#
	# wght.vec are the linear combinations of the data ( yM the averages
	# if there are replicates) that give the 
	# correpsonding estimates of the function at the points x
	wght.vec <- t(make.Amatrix(out, xraw, lambda))
	#
	# modify weight.vec to give the weighted estimated 
	#	
	# Cy is the observed covariance matrix of the data vector
	# xM should be in transformed scale and are the unique x values from
	# the collapsed data means
	# 
		Cy <- rho * do.call(out$call.name, c(out$args, list(x1 = xM,
			x2 = xM))) + sigma2 * diag(1/out$weightsM)
	#
	# see if the C argument is given, if so utilize it.
	C.arg.missing <- is.null(formals(get(out$call.name))$C)
	if(cov) {
		# this block find the whole covariance matrix 
			if(C.arg.missing) {
				temp <- rho * do.call(out$call.name, c(out$
					args, list(x1 = x, x2 = xM))) %*% 
				wght.vec
			}
			else {
				temp <- rho * do.call(out$call.name, c(out$
					args, list(x1 = x, x2 = xM, C = 
					wght.vec)))
			}
			# end of if else C.arg.missing stmt
			temp <- rho * do.call(out$call.name, c(out$args, list(
				x1 = x, x2 = x))) - temp - t(temp)

		temp <- temp + t(wght.vec) %*% Cy %*% wght.vec
		return(temp.sd * t(t(temp * temp.sd)))
	}
	#
	# this is the second term in the MSE
		temp1 <- rho * c(t(wght.vec * do.call(out$call.name, c(out$
			args, list(x1 = xM, x2 = x)))) %*% rep(1, nx))
	#
	# this is the third term in the MSE 
	temp2 <- c(t(wght.vec * (Cy %*% wght.vec)) %*% rep(1, nx))
	#
	# VAR of the first term is handled differently depending on 
	# if this is the MSE at a point or a weighted combination
	#
	if(stationary) {
		x0 <- matrix(0, ncol = ncol(x), nrow = 1)
			temp <- rho * do.call(out$call.name, c(out$args, list(
				x1 = x0, x2 = x0))) - 2 * temp1 + temp2
		return(sqrt(temp * temp.sd^2 + var.mean))
	}
	#
	#
	# if covariance is not stationary then loop through each point to get
	# the variance of field at that point. 
	#
	#
		if(is.null(formals(get(out$call.name))$marginal)) {
			temp <- rep(0, nrow(x))
			for(k in 1:nrow(x)) {
				x0 <- matrix(x[k,  ], nrow = 1)
				temp[k] <- rho * do.call(out$call.name, c(
					out$args, list(x1 = x0, x2 = x0))) -
					2 * temp1[k] + temp2[k]
			}
		}
		else {
			#
			## marginal variances available by single call
			#
			temp <- rho * do.call(out$call.name, c(out$args, list(
				x, marginal = TRUE))) - 2 * temp1 + temp2
		}
	return(sqrt((temp.sd^2) * temp + var.mean))
}
"predict.se" <-
function (object, ...) 
UseMethod("predict.se")
"predict.sreg" <-
function(out, x, derivative = 0, model = 1)
{
	if(missing(x))
		x <- out$xraw
	c(splint(out$predicted$x, out$predicted$y[, model], x, derivative = 
		derivative))
}
"predict.surface" <-
function (out, grid.list = NA, extrap = FALSE, chull.mask, model = NA, 
    nx = 30, ny = 30, ...) 
{
    if ((length(grid.list) == 1) | (is.na(grid.list)[1])) {
        if (is.null(out$x)) 
            stop("Need a an X matrix in the\noutput object")
        grid.list <- as.list(rep("c", ncol(out$x)))
        grid.list[[1]] <- "x"
        grid.list[[2]] <- "y"
        if (is.null(dimnames(out$x))) {
            temp <- paste("X", 1:ncol(out$x), sep = "")
        }
        else {
            temp <- dimnames(out$x)[[2]]
        }
        names(grid.list) <- temp
    }

    if (is.null(out$x)) 
        xg <- make.surface.grid(grid.list, nx = nx, ny = ny)
    else xg <- make.surface.grid(grid.list, X = out$x, nx = nx, 
        ny = ny)

# at this point xg is the grid for evaluation

    out2 <- as.surface(xg, predict(out, xg, model = model, ...))

    if (!extrap) {
# columns of variables that are the grid
            ind <- c(attr(xg, "format")[, 1])
        if (missing(chull.mask)) {
            chull.mask <- unique.matrix(out$x[, ind])
        }
# set to NA any point in 2d grid that is outside convex hull        
        out2$z[
        in.poly(xg[,ind], xp = chull.mask,convex.hull=TRUE) == 0
               ] <- NA
    }
    out2
}
"predict.surface.se" <-
function(out, grid.list = NA, extrap = FALSE, chull.mask, ...)
{
	if((length(grid.list) == 1) | (is.na(grid.list)[1])) {
		grid.list <- as.list(rep("c", ncol(out$x)))
		grid.list[[1]] <- "x"
		grid.list[[2]] <- "y"
		temp <- dimnames(out$x)[[2]]
		if(!(temp[1] == ""))
			names(grid.list) <- temp
	}
	if(is.null(out$x))
		xg <- make.surface.grid(grid.list)
	else xg <- make.surface.grid(grid.list, X = out$x)
	out2 <- as.surface(xg, predict.se(out, xg, ...))
	if(!extrap) {
		if(missing(chull.mask)) {
			ind <- c(attr(xg, "format")[, 1])
			chull.mask <- out$x[, ind]
		}
		#
		# find grid points that are outside convex hull
		# of 2-d projection of the observations
		# or the set of points passed in the call 
		# set these grid points to NA in the matrix of predictions
		#
		chull.mask <- chull.mask[chull(chull.mask),  ]
		out2$z[in.poly(xg, xp = chull.mask) == 0] <- NA
	}
	out2
}
"print.Krig" <-
function(x, digits=4)
{
	c1 <- "Number of Observations:"
	c2 <- length(x$residuals)
	c1 <- c(c1, "Degree of polynomial null space ( base model):")
	c2 <- c(c2, x$m - 1)
	c1 <- c(c1, "Number of parameters in the null space")
	c2 <- c(c2, x$nt)
	c1 <- c(c1, "Model degrees of freedom:")
	c2 <- c(c2, format(round(x$eff.df, 1)))
	c1 <- c(c1, "Residual degrees of freedom:")
	c2 <- c(c2, format(round(length(x$residuals) - x$eff.df, 1)))
	c1 <- c(c1, "GCV estimate for sigma:")
	c2 <- c(c2, format(signif(x$shat.GCV, digits)))
	c1 <- c(c1, "MLE for sigma:")
	c2 <- c(c2, format(signif(x$shat.MLE, digits)))
	c1 <- c(c1, "lambda")
	c2 <- c(c2, format(signif(x$lambda, 2)))
	c1 <- c(c1, "rho")
	c2 <- c(c2, format(signif(x$rho, digits)))
	c1 <- c(c1, "sigma^2")
	c2 <- c(c2, format(signif(x$sigma2, digits)))
	sum <- cbind(c1, c2)
	dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
	cat("Call:\n")
	dput(x$call)
	print(sum, quote = FALSE)
	invisible(x)
}
"print.krig.image" <-
function (obj) 
{
    print(obj$call)
    invisible()
}
"print.qsreg" <-
function (x, ...) 
{
    digits <- 4
    c1 <- "Number of Observations:"
    c2 <- (x$N)
    c1 <- c(c1, "Effective degrees of freedom:")
    c2 <- c(c2, format(round(x$trace[x$ind.cv.ps], 1)))
    c1 <- c(c1, "Residual degrees of freedom:")
    c2 <- c(c2, format(round(x$N - x$trace[x$ind.cv.ps], 1)))
    c1 <- c(c1, "Log10(lambda) ")
lambda<- x$cv.grid[,1]
    c2 <- c(c2, format(round(log10(lambda[x$ind.cv.ps]), 2)))
    sum <- cbind(c1, c2)
    dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
    cat("Call:\n")
    dput(x$call)
    print(sum, quote = FALSE)
    invisible(x)
}
"print.spatial.design" <-
function (x) 
{
    print(x$design)
}
"print.sreg" <-
function(x, ...)
{
	if(length(x$lambda) > 1) {
		c1 <- "Number of Observations:"
		c2 <- (x$N)
		c1 <- c(c1, "Number of values of lambda in grid:")
		c2 <- c(c2, length(x$lambda))
		sum <- cbind(c1, c2)
	}
	else {
		digits <- 4
		N <- x$N
		c1 <- "Number of Observations:"
		c2 <- (x$N)
		c1 <- c(c1, "Effective degrees of freedom:")
		c2 <- c(c2, format(round(x$trace, 1)))
		c1 <- c(c1, "Residual degrees of freedom:")
		c2 <- c(c2, format(round(x$N - x$trace, 1)))
		c1 <- c(c1, "Residual root mean square:")
		c2 <- c(c2, format(signif(sqrt(sum(x$residuals^2)/N), 4)))
		c1 <- c(c1, "Lambda ( smoothing parameter)")
		c2 <- c(c2, format(signif((x$lambda), 4)))
		sum <- cbind(c1, c2)
	}
	dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
	cat("Call:\n")
	dput(x$call)
	print(sum, quote = FALSE)
	invisible(x)
}
"print.summary.Krig" <-
function(x, ...)
{
	digits <- x$digits
	c1 <- "Number of Observations:"
	c2 <- x$num.observation
	c1 <- c(c1, "Number of unique points:")
	c2 <- c(c2, x$num.uniq)
	c1 <- c(c1, "Degree of polynomial null space ( base model):")
	c2 <- c(c2, x$m - 1)
	c1 <- c(c1, "Number of parameters in the null space")
	c2 <- c(c2, x$nt)
	c1 <- c(c1, "Effective degrees of freedom:")
	c2 <- c(c2, format(round(x$enp, 1)))
	c1 <- c(c1, "Residual degrees of freedom:")
	c2 <- c(c2, format(round(x$num.observation - x$enp, 1)))
	c1 <- c(c1, "MLE sigma ")
	c2 <- c(c2, format(signif(x$shat.MLE, digits)))
	c1 <- c(c1, "GCV est. sigma ")
	c2 <- c(c2, format(signif(x$shat.GCV, digits)))
	if(!is.na(x$shat.pure.error)) {
		c1 <- c(c1, "Pure error sigma")
		c2 <- c(c2, format(signif(x$shat.pure.error, digits)))
	}
	c1 <- c(c1, "MLE rho ")
	c2 <- c(c2, format(signif(x$rhohat, digits)))
	c1 <- c(c1, "Scale used for covariance (rho)")
	c2 <- c(c2, signif(x$rho, digits))
	c1 <- c(c1, "Scale used for nugget (sigma^2)")
	c2 <- c(c2, signif(x$sigma2, digits))
	c1 <- c(c1, "lambda (sigma2/rho)")
	c2 <- c(c2, signif(x$lambda, digits))
	#	c1 <- c(c1, "Cost in GCV")
	#	c2 <- c(c2, format(round(x$cost, 2)))
	#	c1 <- c(c1, "GCV Minimum")
	#	c2 <- c(c2, format(signif(x$gcvmin, digits)))
	sum <- cbind(c1, c2)
	dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
	res.quantile <- x$res.quantile
	names(res.quantile) <- c("min", "1st Q", "median", "3rd Q", "max")
	###
	###
	###
	cat("CALL:\n")
	dput(x$call)
	print(sum, quote = FALSE)
	cat("\n")
	cat("RESIDUAL SUMMARY:", fill = TRUE)
	print(signif(res.quantile, digits))
	cat("\n")
	cat("COVARIANCE MODEL:", x$cov.function, fill = TRUE)
	if((x$correlation.model)) {
		cat(" A correlation model was fit: Y is standardized\nbefore\nspatial estimate is found",
			fill = TRUE)
	}
	if(x$knot.model) {
		cat(" Knot model: ", x$np, 
			" knots supplied to define basis functions", fill = TRUE)
	}
	cat("\n")
	cat("DETAILS ON SMOOTHING PARAMETER:", fill = TRUE)
	cat(" Method used:  ", x$method, "   Cost: ", x$cost, fill = TRUE)
	#	cat(" Stats on this choice of lambda", fill = TRUE)
	print(x$sum.gcv.lambda, digits = digits)
	cat("\n")
	cat(" Summary of estimates for lambda", fill = TRUE)
	print(x$lambda.est, digits = x$digits)
	invisible(x)
}
"print.summary.krig.image" <-
function (x, ...) 
{
    digits <- x$digits
    c1 <- "Number of Observations:"
    c2 <- x$num.observation
    c1 <- c(c1, "Degree of polynomial null space ( base model):")
    c2 <- c(c2, x$m - 1)
    c1 <- c(c1, "MLE sigma ")
    c2 <- c(c2, format(signif(x$shat.MLE, digits)))
    c1 <- c(c1, "MLE rho ")
    c2 <- c(c2, format(signif(x$rhohat, digits)))
    c1 <- c(c1, "Scale used for covariance (rho)")
    c2 <- c(c2, signif(x$rho, digits))
    c1 <- c(c1, "Scale used for nugget (sigma^2)")
    c2 <- c(c2, signif(x$sigma2, digits))
    c1 <- c(c1, "lambda (sigma2/rho)")
    c2 <- c(c2, signif(x$lambda, digits))
    sum <- cbind(c1, c2)
    dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
    res.quantile <- x$res.quantile
    names(res.quantile) <- c("min", "1st Q", "median", "3rd Q", 
        "max")
    cat("Call:\n")
    dput(x$call)
    print(sum, quote = FALSE)
    if ((x$correlation.model)) {
        cat("Y is standardized before spatial estimate is found", 
            fill = TRUE)
    }
    cat(" Residuals:", "\n")
    print(signif(res.quantile, digits))
    cat("Covariance function name:", x$cov.function, fill = TRUE)
    invisible(x)
}
"print.summary.spatial.design" <-
function (x, digits = 4) 
{
    cat("Call:\n")
    dput(x$call)
    c1 <- "Number of design points:"
    c2 <- length(x$best.id)
    c1 <- c(c1, "Number of fixed points:")
    if (is.null(x$fixed)) 
        c2 <- c(c2, 0)
    else c2 <- c(c2, length(x$fixed))
    c1 <- c(c1, "Optimality Criterion:")
    c2 <- c(c2, round(x$opt.crit, digits))
    sum <- cbind(c1, c2)
    dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
    print(sum, quote = FALSE, digits = digits)
    other.crit <- x$other.crit
    if (length(other.crit) > 1) {
        cat("\nOptimality criteria for other designs:\n\t")
        cat(round(other.crit, digits), "\n")
    }
    cat("\nHistory:\n")
    dimnames(x$history)[[1]] <- rep("", nrow(x$history))
    print(round(x$history, digits), quote = FALSE)
    invisible(x)
}
"print.summary.sreg" <-
function(x, ...)
{
	digits <- x$digits
	c1 <- "Number of Observations:"
	c2 <- x$num.observation
	c1 <- c(c1, "Number of unique points:")
	c2 <- c(c2, x$num.uniq)
	c1 <- c(c1, "Eff. degrees of freedom for spline:")
	c2 <- c(c2, format(round(x$enp, 1)))
	c1 <- c(c1, "Residual degrees of freedom:")
	c2 <- c(c2, format(round(x$num.observation - x$enp, 1)))
	c1 <- c(c1, "GCV est. sigma ")
	c2 <- c(c2, format(signif(x$shat.GCV, digits)))
	if(!is.na(x$shat.pure.error)) {
		c1 <- c(c1, "Pure error sigma")
		c2 <- c(c2, format(signif(x$shat.pure.error, digits)))
	}
	c1 <- c(c1, "lambda ")
	c2 <- c(c2, signif(x$lambda, digits))
	#	c1 <- c(c1, "Cost in GCV")
	#	c2 <- c(c2, format(round(x$cost, 2)))
	#	c1 <- c(c1, "GCV Minimum")
	#	c2 <- c(c2, format(signif(x$gcvmin, digits)))
	sum <- cbind(c1, c2)
	dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
	res.quantile <- x$res.quantile
	names(res.quantile) <- c("min", "1st Q", "median", "3rd Q", "max")
	###
	###
	###
	cat("CALL:\n")
	dput(x$call)
	print(sum, quote = FALSE)
	cat("\n")
	cat("RESIDUAL SUMMARY:", fill = TRUE)
	print(signif(res.quantile, digits))
	cat("\n")
	cat("DETAILS ON SMOOTHING PARAMETER:", fill = TRUE)
	cat(" Method used:  ", x$method, "   Cost: ", x$cost, fill = TRUE)
	#	cat(" Stats on this choice of lambda", fill = TRUE)
	print(x$sum.gcv.lambda, digits = digits)
	cat("\n")
	cat(" Summary of estimates for lambda", fill = TRUE)
	print(x$lambda.est, digits = x$digits)
	invisible(x)
}
"qr.q2ty" <-
function (qr, y) 
{
    if (!is.matrix(y)) {
        y <- as.matrix(y)
    }
    dy <- dim(y)
    dq <- dim(qr$qr)
    rank <- qr$rank
    if (dy[1] != dq[1]) 
        stop("y and qr$qr should have same number of rows")
    qr.qty(qr, y)[(rank + 1):dy[1], ]
}
"qr.yq2" <-
function (qr, y) 
{
    t(qr.q2ty(qr, t(y)))
}
"plot.qsreg" <-
function (out, pch = "*", main = NA) 
{
    old.par <- par("mfrow", "oma")
    on.exit(par(old.par))
    set.panel( 2, 2, relax=TRUE)
    plot(out$x, out$y, xlab = "X", ylab = "y", pch = pch)
    orderx <- order(out$x)
temp<-  out$fitted.values[,c(out$ind.cv, out$ind.cv.ps)]
matlines(out$x[orderx], temp[orderx,], lty = 1,  col = c(1,2))
##
# residual plot
#
matplot(out$x, 
qsreg.psi( out$residuals[,c(out$ind.cv, out$ind.cv.ps)],  out$alpha, out$sc)
, col=c(1,2), pch="o", ylab="Pseudo residuals", xlab="X")

yline(0)
   

    if (nrow(out$cv.grid) > 1) {
        ind <- out$cv.grid[, 3] < 1e+19
        out$cv.grid <- out$cv.grid[ind, ]
        matplot(out$cv.grid[, 2], cbind(out$cv.grid[, 3], 
out$cv.grid[,6]), xlab = "Effective number of parameters", 
            ylab = "Log CV Rho function ", 
            log = "y", type="l", col=c(1,2))
xline( out$cv.grid[out$ind.cv, 2], col=1)
xline( out$cv.grid[out$ind.cv.ps, 2], col=2)

        title(" CV curves", 
            cex = 0.5)
    }

bplot(  
qsreg.psi( out$residuals[,c(out$ind.cv, out$ind.cv.ps)],  out$alpha, out$sc), 
labels=c("CV", "CV pseudo")
)

yline( 0, col=2)

    if (is.na(main)) 
        mtext(deparse(out$call), cex = 1.3, outer = TRUE, line = -2)
    else mtext(main, cex = 1.3, outer = TRUE, line = -2)
}
"predict.qsreg" <-
function (out, x, derivative = 0, model = out$ind.cv.ps) 
{
    if (missing(x)) 
        x <- out$x
    c(splint(out$predicted$x, out$predicted$y[, model], x, derivative = derivative))
}
"qsreg" <-
function (x, y, lam = NA, maxit = 50, maxit.cv = 10, tol = 1e-07,
    offset = 0, sc = sqrt(var(y)) * 1e-05, alpha = 0.5, wt = rep(1, 
        length(x)), cost = 1, nstep.cv = 80, hmin = NA, hmax = NA, 
    trmin = 2 * 1.05, trmax = 0.95 * length(unique(x))) 
{
    out <- list()
    class(out) <- c("qsreg")
    N <- length(y)
    out$N <- N
    xgrid <- sort(unique(x))
    if (length(x) != length(y)) 
        stop(" X and Y do not match")
    if (!is.na(lam[1])) 
hgrid<- log( lam)
# find lambda grid
else
 {
        if (is.na(hmin)) {
            hmin <- 0
            for (k in 1:25) {
                b <- qsreg.trace(lam = as.double(exp(hmin)), 
                  x = x, y = y, wt = wt, cost = cost, maxit = maxit, 
                  tol = tol, sc = sc, alpha = alpha)
                if (b > trmax) {
                  break
                }
                hmin <- hmin - 1
            }
        }
        if (is.na(hmax)) {
            hmax <- 0
            for (k in 1:25) {
                b <- qsreg.trace(lam = as.double(exp(hmax)), 
                  x = x, y = y, wt = wt, cost = cost, maxit = maxit, 
                  tol = tol, sc = sc, alpha = alpha)
                if (b < trmin) {
                  break
                }
                hmax <- hmax + 1
            }
        }
    
h<- seq( hmin,hmax,,nstep.cv)
lam<- exp( h)
}

# now loop through values for lam ( really log lam)
    b <- list()
    NL <- length(lam)
    NG <- length(xgrid)
     h <- log(lam)
    residuals <- matrix(NA, ncol = NL, nrow = N)
    diagA <- residuals
    cv.ps <- rep(0, NL)
    trace.ps <- rep(0, NL)
    cv <- rep(0, NL)
    predicted <- matrix(NA, ncol = NL, nrow = NG)
    trace <- rep(0, NL)
    converge <- rep(0, NL)
wt.old<- wt
    for (k in 1:NL) {

        b <- .Fortran("rcss", h = as.double(h[k]), npoint = as.integer(N), 
            x = as.double(x), y = as.double(y), wt = as.double(wt.old), 
            sy = as.double(rep(0, N)), trace = as.double(0), 
            diag = as.double(rep(0, N)), cv = as.double(0), ngrid = as.integer(NG), 
            xg = as.double(xgrid), yg = as.double(rep(0, NG)), 
            job = as.integer(c(3, 3, 0)), ideriv = as.integer(0), 
            din = as.double(c(cost, offset, maxit, tol, sc, alpha)), 
            dout = as.double(rep(0, 4)), ierr = as.integer(0))
        residuals[, k] <- y - b$sy
        diagA[, k] <- b$diag
        cv[k] <- b$dout[4]
        trace[k] <- b$trace
        predicted[, k] <- b$yg
        converge[k] <- b$dout[1]
wt.old<- b$wt
    }
# second loop to find approx CV residuals based on pseudo values

y.pseudo<- rep(NA, N)
residuals.cv<- matrix( NA, ncol=NL, nrow= length( x))
for (k in 1:NL) {


y.pseudo<-  (sc)*qsreg.psi(residuals[, k], alpha=alpha, C=sc) + y-residuals[,k]
#
# call the robust spline but set the cutoff for the huber weight so big
# it is essentially a LS spline this helps to match the lambda for robust spline
# with a LS one. 
#
b <- .Fortran("rcss", h = as.double(h[k]), npoint = as.integer(N),
            x = as.double(x), y = as.double(y.pseudo), wt = as.double(wt),
            sy = as.double(rep(0, N)), trace = as.double(0),
diag = as.double(rep(0, N)), cv = as.double(0), ngrid = as.integer(NG), 
            xg = as.double(xgrid), yg = as.double(rep(0, NG)),
            job = as.integer(c(3, 3, 0)), ideriv = as.integer(0),
            din = as.double(c(cost, offset, maxit, tol, sqrt( var( y))*10, alpha)),
            dout = as.double(rep(0, 4)), ierr = as.integer(0))
#
# CV residuals based on pseudo-data)
# Use the linear approximation  Y_k - f.cv_k = (Y_k- f_k)/( 1- A_kk)
#  f.cv_k = f_k/( 1- A_kk) - ( A_kk)Y_k/( 1- A_kk)
#
# Note: we find f.cv based on pseudo data but then consider its deviation 
# from the actual data
#

f.cv<- (b$sy/(1-b$diag)) -   b$diag*y.pseudo/(1-b$diag)
trace.ps[k]<- b$trace
residuals.cv[,k]<- (y-f.cv)
cv.ps[k]<- mean( qsreg.rho( y- f.cv, alpha=alpha, C=sc)) 

}
#
#
#
cv.grid <- cbind(lam, trace, cv, converge, trace.ps, cv.ps)
dimnames(cv.grid) <- list(NULL, c("lambda", "trace", "CV", 
      "iterations", "trace.PS", "CV.PS"))
#
  ind.cv<- ( 1: NL) [ cv==min(cv)]
  ind.cv.ps<- ( 1: NL) [ cv.ps==min(cv.ps)]
   
   out$call <- match.call()
    out$x <- x
    out$y <- y
    out$predicted<- list( x= xgrid, y= predicted)
    out$trace<- trace
    out$residuals.cv<-  residuals.cv
    out$residuals <- residuals
    out$fitted.values<- y - residuals
    out$cv.grid <- cv.grid
    out$diagA <- diagA
    out$sc <- sc
    out$alpha <- alpha
    out$ind.cv<- ind.cv
    out$ind.cv.ps<- ind.cv.ps
    out
}
"qsreg.fit" <-
function (x, y, lam, maxit = 50, maxit.cv = 10, tol = 1e-04, 
    offset = 0, sc = sqrt(var(y)) * 1e-07, alpha = 0.5, wt = rep(1, 
        length(x)), cost = 1) 
{
    N <- length(y)
    if (length(x) != length(y)) 
        stop(" X and Y do not match")
    h <- log(lam)
    temp <- (.Fortran("rcss", h = as.double(log(lam)), npoint = as.integer(N), 
        x = as.double(x), y = as.double(y), wt = as.double(wt), 
        sy = as.double(rep(0, N)), trace = as.double(0), diag = as.double(rep(0, 
            N)), cv = as.double(0), ngrid = as.integer(0), xg = as.double(0), 
        yg = as.double(0), job = as.integer(c(3, 0, 0)), ideriv = as.integer(0), 
        din = as.double(c(cost, offset, maxit, tol, sc, alpha)), 
        dout = as.double(rep(0, 4)), ierr = as.integer(0))$dout)
    return(temp)
}

"qsreg.psi" <-
function( r,alpha=.5,C=1){
temp<- rep( NA, length( r))

r<- r/C

temp<- r
ind<-  r>1
temp[ ind] <-   2*alpha
ind<-  r<1& r>0
temp[ ind] <-   (2*alpha*r[ind])
ind<-  r< -1
temp[ ind] <-   -2*(1-alpha)
ind<-  r>-1& r<0
temp[ ind] <-   2*(1-alpha)*r[ind]
temp
}
"qsreg.rho" <-
function( r,alpha=.5,C=1){
temp<- rep( NA, length( r))

ind<-  r>C
temp[ ind] <-   2*alpha*r[ind] - alpha*C
ind<-  r<C& r>0
temp[ ind] <-   (alpha*r[ind]**2)/C

ind<-  r< -C
temp[ ind] <-   -2*(1-alpha)*r[ind] - (1-alpha)*C
ind<-  r>-C& r<0
temp[ ind] <-   ((1-alpha)*r[ind]**2)/C

temp}
"qsreg.trace" <-
function(x, y, lam, maxit = 50, maxit.cv = 10, tol = 0.0001, offset = 0, sc = 
	sqrt(var(y)) * 9.9999999999999995e-08, alpha = 0.5, wt = rep(1, length(
	x)), cost = 1)
{
	N <- length(y)
	if(length(x) != length(y))
		stop(" X and Y do not match")
	h <- log(lam)
	temp <- (.Fortran("rcss",
		h = as.double(log(lam)),
		npoint = as.integer(N),
		x = as.double(x),
		y = as.double(y),
		wt = as.double(wt),
		sy = as.double(rep(0, N)),
		trace = as.double(0),
		diag = as.double(rep(0, N)),
		cv = as.double(0),
		ngrid = as.integer(0),
		xg = as.double(0),
		yg = as.double(0),
		job = as.integer(c(3, 0, 0)),
		ideriv = as.integer(0),
		din = as.double(c(cost, offset, maxit, tol, sc, alpha)),
		dout = as.double(rep(0, 4)),
		ierr = as.integer(0))$dout)
	return(temp[3])
}
"rad.cov.F" <-
function (x1, x2, p = 1, with.log = TRUE, with.constant = TRUE, C = NULL) 
{
    if (is.null(C)) {
        if (!is.matrix(x1)) 
            x1 <- as.matrix(x1)
        if (!is.matrix(x2)) 
            x2 <- as.matrix(x2)
        d <- ncol(x1)
        n1 <- nrow(x1)
        n2 <- nrow(x2)
        m <- (d + p)/2
        par <- c(p/2, ifelse((d%%2 == 0) & (with.log), 1, 0))
        temp <- .Fortran("radbas", nd = as.integer(d), x1 = as.double(x1), 
            n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
            par = as.double(par), k = as.double(rep(0, n1 * n2)))
        if (with.constant) {
            Amd <- radbas.constant(m, d)
        }
        else {
            Amd <- 1
        }
        Amd * matrix(temp$k, ncol = n2, nrow = n1)
    }
    else {
        rad.covC(x1, x2, p = p, with.log = with.log, with.constant = with.constant, 
            C = C)
    }
}
"rad.cov" <-
function (x1, x2, p = 1, with.log = TRUE, with.constant = TRUE, C = NULL) 
{
    if (is.null(C)) {
        if (!is.matrix(x1)) 
            x1 <- as.matrix(x1)
        if (!is.matrix(x2)) 
            x2 <- as.matrix(x2)
        d <- ncol(x1)
        n1 <- nrow(x1)
        n2 <- nrow(x2)
        m <- (d + p)/2
        par <- c(p/2, ifelse((d%%2 == 0) & (with.log), 1, 0))
        temp <- .Fortran("radbas", nd = as.integer(d), x1 = as.double(x1), 
            n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
            par = as.double(par), k = as.double(rep(0, n1 * n2)))
        if (with.constant) {
            Amd <- radbas.constant(m, d)
        }
        else {
            Amd <- 1
        }
        Amd * matrix(temp$k, ncol = n2, nrow = n1)
    }
    else {
        rad.covC(x1, x2, p = p, with.log = with.log, with.constant = with.constant, 
            C = C)
    }
}
"rad.cov.S" <-
function (x1, x2, p = 1, with.log = TRUE, with.constant = TRUE) 
{
    if (!is.matrix(x1)) 
        x1 <- as.matrix(x1)
    if (!is.matrix(x2)) 
        x2 <- as.matrix(x2)
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    m <- (d + p)/2
    temp <- (outer(x1[, 1], x2[, 1], "-"))^2
    if (ncol(x1) > 1) {
        for (k in 2:ncol(x1)) {
            temp <- temp + (outer(x1[, k], x2[, k], "-"))^2
        }
    }
    if ((d%%2 == 0) & (with.log)) 
        temp <- ifelse(temp < 1e-10, 0, temp^(p/2) * log(temp))
    else temp <- temp^(p/2)
    if (with.constant) {
        Amd <- radbas.constant(m, d)
    }
    else {
        Amd <- 1
    }
    Amd * matrix(temp, ncol = n2, nrow = n1)
}
"rad.covC" <-
function (x1, x2, C, p = 1, with.log = TRUE, with.constant = TRUE) 
{
    if (!is.matrix(x1)) {
        x1 <- as.matrix(x1)
    }
    if (!is.matrix(x2)) {
        x2 <- as.matrix(x2)
    }
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    par <- c(p/2, ifelse(d%%2 == 0, 1, 0))
    if (!with.log) 
        par[2] <- 0
    temp <- .Fortran("multrb", nd = as.integer(d), x1 = as.double(x1), 
        n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
        par = as.double(par), c = as.double(C), h = as.double(rep(0, 
            n1)), work = as.double(rep(0, n2)))
    if (with.constant) {
        m <- (d + p)/2
        Amd <- radbas.constant(m, d)
    }
    else {
        Amd <- 1
    }
    Amd * temp$h
}
"rad.image.cov" <-
function (ind1, ind2, Y, cov.obj = NULL, setup = FALSE, grid, ...) 
{
    if (is.null(cov.obj)) {
        dx <- grid$x[2] - grid$x[1]
        dy <- grid$y[2] - grid$y[1]
        m <- length(grid$x)
        n <- length(grid$y)
        M <- ceiling2(2 * m)
        N <- ceiling2(2 * n)
        xg <- make.surface.grid(list((1:M) * dx, (1:N) * dy))
        center <- matrix(c((dx * M)/2, (dy * N)/2), nrow = 1, 
            ncol = 2)
        out <- rad.cov(xg, center, ...)
        out <- as.surface(xg, c(out))$z
        temp <- matrix(0, nrow = M, ncol = N)
        temp[M/2, N/2] <- 1
        wght <- fft(out)/(fft(temp) * M * N)
        cov.obj <- list(m = m, n = n, grid = grid, N = N, M = M, 
            wght = wght, call = match.call())
        if (setup) {
            return(cov.obj)
        }
    }
    temp <- matrix(0, nrow = cov.obj$M, ncol = cov.obj$N)
    if (missing(ind1)) {
        temp[1:cov.obj$m, 1:cov.obj$n] <- Y
        Re(fft(fft(temp) * cov.obj$wght, inverse = TRUE)[1:cov.obj$m, 
            1:cov.obj$n])
    }
    else {
        if (missing(ind2)) {
            temp[ind1] <- Y
        }
        else {
            temp[ind2] <- Y
        }
        Re(fft(fft(temp) * cov.obj$wght, inverse = TRUE)[ind1])
    }
}
"radbas.constant" <-
function (m, d) 
{
    if (d%%2 == 0) {
        Amd <- (((-1)^(1 + m + d/2)) * (2^(1 - 2 * m)) * (pi^(-d/2)))/(gamma(m) * 
            gamma(m - d/2 + 1))
    }
    else {
        Amd <- (gamma(d/2 - m) * (2^(-2 * m)) * (pi^(-d/2)))/gamma(m)
    }
    Amd
}
"rat.diet" <-
structure(list(t = c(0, 1, 3, 7, 8, 10, 14, 15, 17, 21, 22, 24, 
28, 29, 31, 35, 36, 38, 42, 43, 45, 49, 50, 52, 56, 57, 59, 63, 
64, 70, 73, 77, 80, 84, 87, 91, 94, 98, 105), con = c(20.5, 19.399, 
22.25, 17.949, 19.899, 21.449, 16.899, 21.5, 22.8, 24.699, 26.2, 
28.5, 24.35, 24.399, 26.6, 26.2, 26.649, 29.25, 27.55, 29.6, 
24.899, 27.6, 28.1, 27.85, 26.899, 27.8, 30.25, 27.6, 27.449, 
27.199, 27.8, 28.199, 28, 27.3, 27.899, 28.699, 27.6, 28.6, 27.5
), trt = c(21.3, 16.35, 19.25, 16.6, 14.75, 18.149, 14.649, 16.7, 
15.05, 15.5, 13.949, 16.949, 15.6, 14.699, 14.15, 14.899, 12.449, 
14.85, 16.75, 14.3, 16, 16.85, 15.65, 17.149, 18.05, 15.699, 
18.25, 18.149, 16.149, 16.899, 18.95, 22, 23.6, 23.75, 27.149, 
28.449, 25.85, 29.7, 29.449)), .Names = c("t", "con", "trt"), class = "data.frame", row.names = c("1", 
"2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", 
"14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", 
"25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", 
"36", "37", "38", "39"))
"rdist.F" <-
function (x1, x2) 
{
    if (!is.matrix(x1)) 
        x1 <- as.matrix(x1)
    if (!is.matrix(x2)) 
        x2 <- as.matrix(x2)
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    par <- c(1/2, 0)
    matrix((.Fortran("radbas", nd = as.integer(d), x1 = as.double(x1), 
        n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
        par = as.double(par), k = as.double(rep(0, n1 * n2)))$k), 
        ncol = n2, nrow = n1)
}
"rdist" <-
function (x1, x2) 
{
    if (!is.matrix(x1)) 
        x1 <- as.matrix(x1)
    if( missing( x2)) x2<- x1
    if (!is.matrix(x2)) 
        x2 <- as.matrix(x2)
    d <- ncol(x1)
    n1 <- nrow(x1)
    n2 <- nrow(x2)
    par <- c(1/2, 0)
    matrix((.Fortran("radbas", nd = as.integer(d), x1 = as.double(x1), 
        n1 = as.integer(n1), x2 = as.double(x2), n2 = as.integer(n2), 
        par = as.double(par), k = as.double(rep(0, n1 * n2)))$k), 
        ncol = n2, nrow = n1)
}
"rdist.S" <-
function (x1, x2, lon.lat = FALSE) 
{
    if (!is.matrix(x1)) {
        x1 <- as.matrix(x1)
    }
    if (!is.matrix(x2)) {
        x2 <- as.matrix(x2)
    }
    if (lon.lat) {
        rdist.earth(x1, x2)
    }
    else {
        temp <- (outer(x1[, 1], x2[, 1], "-"))^2
        if (ncol(x1) > 1) {
            for (k in 2:ncol(x1)) {
                temp <- temp + (outer(x1[, k], x2[, k], "-"))^2
            }
        }
        sqrt(temp)
    }
}
"rdist.earth" <-
function (loc1, loc2, miles = TRUE, R = NULL) 
{
    if (is.null(R)) {
        if (miles) 
            R <- 3963.34
        else R <- 6378.388
    }
    if (missing(loc2)) 
        loc2 <- loc1
    coslat1 <- cos((loc1[, 2] * pi)/180)
    sinlat1 <- sin((loc1[, 2] * pi)/180)
    coslon1 <- cos((loc1[, 1] * pi)/180)
    sinlon1 <- sin((loc1[, 1] * pi)/180)
    coslat2 <- cos((loc2[, 2] * pi)/180)
    sinlat2 <- sin((loc2[, 2] * pi)/180)
    coslon2 <- cos((loc2[, 1] * pi)/180)
    sinlon2 <- sin((loc2[, 1] * pi)/180)
    pp <- cbind(coslat1 * coslon1, coslat1 * sinlon1, sinlat1) %*% 
        t(cbind(coslat2 * coslon2, coslat2 * sinlon2, sinlat2))
    R * acos(ifelse(pp > 1, 1, pp))
}
"replace.args.function" <-
function (fun, ...) 
{
    temp <- list(...)
    ntemp <- names(temp)
    fnames <- names(fun)
    if (length(temp) > 0) {
        for (k in 1:length(ntemp)) {
            if (!is.na(match(ntemp[k], fnames))) {
                fun[ntemp[k]] <- temp[ntemp[k]]
            }
        }
    }
    as.function(fun)
}
"set.panel" <-
function (m = 1, n = 1, relax = FALSE) 
{
    temp <- par()
    single.plot <- (temp$mfg[3] == 1 & temp$mfg[4] == 1)
    if (!relax | single.plot | ((m == 1) & (n == 1))) {
        par(mfrow = c(m, n))
        cat("plot window will lay out plots in a", m, "by", n, 
            "matrix ", fill = TRUE)
    }
    invisible()
}
"setup.W.image.cov" <-
function (m, n, weights = 1, D = NULL, cut.min = 8, max.m = m, 
    max.n = n, x = NULL, grid = NULL, normalize = TRUE, ...) 
{
    call <- match.call()
    if (!is.null(x)) {
        grid <- list(x = 1:m, y = 1:n)
    }
    if (!is.null(grid)) {
        m <- length(grid$x)
        n <- length(grid$y)
    }
    if (is.null(D)) {
        junk <- Wtransform.D(m, n, weights = weights, cut.min = cut.min)
    }
    else {
        junk <- list(D = D, max.m = max.m, max.n = max.n)
    }
    e <- matrix(0, m, n)
    x1 <- m/2
    x2 <- n/2
    if (normalize) {
        e[x1, x2] <- 1
        temp.max <- max(Wtransform.image(junk$D * Wtransform.image(e, 
            inv = TRUE, transpose = TRUE, cut.min = cut.min), inv = TRUE, 
            cut.min = cut.min, ))
    }
    else {
        temp.max <- 1
    }
    return(list(m = m, n = n, D = junk$D/temp.max, grid = grid, 
        cut.min = cut.min, max.n = junk$max.n, max.m = junk$max.m, 
        weights = weights, call = call))
}
"setup.Wtransform.cov" <-
function (m, n, weights = 1, cut.min = 8, max.m = m, max.n = n, 
    x = NULL, grid = NULL, normalize = TRUE, ...) 
{
    call <- match.call()
    if (!is.null(x)) {
        grid <- krig.discretize(x, m, n, ...)$grid
    }
    if (!is.null(grid)) {
        m <- length(grid$x)
        n <- length(grid$y)
    }
    junk <- Wtransform.D(m, n, weights = weights, cut.min = cut.min)
    e <- matrix(0, m, n)
    x1 <- m/2
    x2 <- n/2
    if (normalize) {
        e[x1, x2] <- 1
        temp.max <- max(Wtransform.image(junk$D * Wtransform.image(e, 
            inv = TRUE, transpose = TRUE, cut.min = cut.min), inv = TRUE, 
            cut.min = cut.min, ))
    }
    else {
        temp.max <- 1
    }
    return(list(m = m, n = n, D = junk$D/temp.max, grid = grid, 
        cut.min = cut.min, max.n = junk$max.n, max.m = junk$max.m, 
        weights = weights, call = call))
}
"sim.krig.image" <-
function (out, nreps = 10) 
{
    temp1 <- list()
    temp2 <- as.list(1:nreps)
    class(temp1) <- "sim.krig.image"
    temp1$call <- out$call
    temp1$grid <- out$grid
    hold2 <- look <- out$surface$z
    temp <- krig.image.parameters(out)
    rho <- temp$rho
    shat.MLE <- temp$shat.MLE
    for (k in 1:nreps) {
        look <- sqrt(rho) * sim.rf(out$cov.obj)
        Y <- c(look[out$index]) + rnorm(out$N) * shat.MLE
        hold2 <- krig.image(out$x, Y, lambda = out$lambda, cov.function = out$cov.function, 
            cov.obj = out$cov.obj, kmax = 100, start = NULL)$surface$z
        temp2[[k]] <- look - hold2 + out$surface$z
        NULL
    }
    temp1$out <- temp2
    return(temp1)
}
"sim.rf" <-
function (obj, ...) 
UseMethod("sim.rf")
"sim.rf.W" <-
function (cov.obj) 
{
    N <- cov.obj$n
    M <- cov.obj$m
    z <- sqrt(cov.obj$D) * matrix(rnorm(N * M), ncol = N, nrow = M)
    Wtransform.image(z, inv = TRUE, cut.min = cov.obj$cut.min)
}
"sim.rf.default" <-
function (obj) 
{
    n <- obj$n
    m <- obj$m
    M <- obj$M
    N <- obj$N
    if (any(Re(obj$wght) < 0)) {
        stop("FFT of covariance has negative\nvalues")
    }
    z <- fft(matrix(rnorm(N * M), ncol = N, nrow = M))
    Re(fft(sqrt(obj$wght) * z, inverse = TRUE))[1:m, 1:n]/sqrt(M * 
        N)
}
 "smooth.2d" <-
function (Y, ind = NULL, weight.obj = NULL, setup = FALSE, grid = NULL, 
    x = NULL, nrow = 64, ncol = 64, surface = TRUE, cov.function = 
gauss.cov, 
    Mwidth = NULL, Nwidth = NULL, ...) 
{
    temp <- as.image(Y, ind, grid = grid, nrow = nrow, ncol = ncol, 
        x = x)
    Y <- temp$z
    NN <- temp$N
    grid <- list(x = temp$x, y = temp$y)
    if (is.null(weight.obj)) {
        dx <- grid$x[2] - grid$x[1]
        dy <- grid$y[2] - grid$y[1]
        m <- length(grid$x)
        n <- length(grid$y)
        if (is.null(Mwidth)) 
            M <- 2 * m
        else {
            M <- m + Mwidth
        }
        if (is.null(Nwidth)) 
            N <- 2 * n
        else {
            N <- n + Nwidth
        }
        xg <- make.surface.grid(list((1:M) * dx, (1:N) * dy))
        center <- matrix(c((dx * M)/2, (dy * N)/2), nrow = 1, 
            ncol = 2)
        out <- cov.function(xg, center, ...)
        out <- as.surface(xg, c(out))$z
        temp <- matrix(0, nrow = M, ncol = N)
        temp[M/2, N/2] <- 1
        wght <- fft(out)/(fft(temp) * M * N)
        weight.obj <- list(m = m, n = n, grid = grid, N = N, 
            M = M, wght = wght, call = match.call())
        if (setup) {
            return(weight.obj)
        }
    }
    temp <- matrix(0, nrow = weight.obj$M, ncol = weight.obj$N)
    temp[1:m, 1:n] <- Y
    temp[is.na(temp)] <- 0
    temp2 <- Re(fft(fft(temp) * weight.obj$wght, inverse = TRUE))[1:weight.obj$m, 
        1:weight.obj$n]
    temp <- matrix(0, nrow = weight.obj$M, ncol = weight.obj$N)
    temp[1:m, 1:n] <- NN
    temp[is.na(temp)] <- 0
    temp3 <- Re(fft(fft(temp) * weight.obj$wght, inverse = TRUE))[1:weight.obj$m, 
        1:weight.obj$n]
    if (!surface) 
        (temp2/temp3)
    else {
        list(x = weight.obj$grid$x, y = weight.obj$grid$y, z = temp2/temp3, 
            index = ind)
    }
}
"splint" <-
function (x, y, xgrid, derivative = 0) 
{
    if (is.matrix(x)) {
        xgrid <- y
        y <- x[, 2]
        x <- x[, 1]
    }
    if (is.list(x)) {
        xgrid <- y
        y <- x$y
        x <- x$x
    }
    ind <- !duplicated(x)
    x <- x[ind]
    y <- y[ind]
    if ((derivative > 2) | (derivative < 0)) 
        stop("derivative must be 0,1,2")
    if (length(x) != length(y)) 
        stop("Lengths of x and y must match")
    n <- length(x)
    .Fortran("css", as.double(0), as.integer(n), as.double(x), 
        as.double(y), as.double(rep(0, n)), as.double(rep(1, 
            n)), as.double(1), as.double(1), as.double(1), as.integer(length(xgrid)), 
        as.double(xgrid), ygrid = as.double(rep(0, length(xgrid))), 
        as.integer(c(2, 3, 0)), as.integer(derivative), as.integer(0))$ygrid
}
"sreg" <-
function(x, y, lam = NA, df = NA, offset = 0, wt = rep(1, length(x)), cost = 1,
	nstep.cv = 80, find.diagA = TRUE, trmin = 2.0099999999999998, trmax = 
	length(unique(x)) * 0.94999999999999996, lammin = NA, lammax = NA,
	verbose = FALSE, do.cv = TRUE, method = "GCV", rmse = NA, lambda = NA)
{
	call <- match.call()
	out <- list()
	out$call <- match.call()
	class(out) <- c("sreg")
	out$xraw <- x
	out$yraw <- y
	out$wt.raw <- wt
	out$cost <- cost
	out$offset <- offset
	out$method <- method
	if(length(x) != length(y))
		stop(" X and Y do not match")
	N <- length(y)
	out$N <- N
	out$nt <- 2
	#
	# figure out if the GCV function should be minimized
	# and that value of lambda used for the estimate
	#
	if(!is.na(lambda[1])) {
		lam <- lambda
	}
	#
	#
	if(is.na(lam[1]) & is.na(df[1])) {
		eval.cv <- TRUE
		find.min <- TRUE
	}
	else {
		find.min <- FALSE
		eval.cv <- FALSE
	}
	#
	## find duplicate rows of the x vector 
	## first find integer tags to indicate replications
	rep.info <- cat.matrix(matrix(x, ncol = 1))
	out$rep.info <- rep.info
	if(verbose) {
		cat("rep.info", fill = TRUE)
		print(rep.info)
	}
	if(max(rep.info) == N) {
		shat.rep <- NA
		shat.pure.error <- NA
		out$pure.ss <- 0
		YM <- y
		weightsM <- wt
		xM <- x[!duplicated(rep.info)]
	}
	else {
		##
		## do a simple 1-way ANOVA to get the replication error
		##
		rep.info.aov <- fast.1way(rep.info, y, wt)
		shat.pure.error <- sqrt(rep.info.aov$MSE)
		shat.rep <- shat.pure.error
		YM <- rep.info.aov$means
		weightsM <- rep.info.aov$w.means
		xM <- as.matrix(x[!duplicated(rep.info)])
		out$pure.ss <- rep.info.aov$SSE
		if(verbose) {
			cat(" rep info", fill = TRUE)
			print(rep.info.aov)
		}
	}
	#
	# over write the real x's and y's with the collapsed group means. 
	# these orignal values are called xraw yraw. 
	#
	out$np <- length(xM)
	out$y <- c(YM)
	out$x <- c(xM)
	out$wt <- weightsM
	out$shat.rep <- shat.rep
	out$shat.pure.error <- shat.pure.error
	xgrid <- sort(xM)
	out$trace <- NA
	#
	# find lambda's if df's are given
	#
	if(!is.na(df[1])) {
		lam <- rep(0, length(df))
		for(k in 1:length(df)) {
			lam[k] <- sreg.df.to.lambda(df[k], xM, weightsM)
		}
	}
	if(do.cv) {
		a <- gcv.sreg(out, lambda = lam, cost = cost, offset = offset,
			nstep.cv = nstep.cv, verbose = verbose, trmin = trmin,
			trmax = trmax, find.min = find.min, method = method,
			rmse = rmse)
		# if the spline should be evaluated at the GCV solutionwipe out lam grid
		# and just use GCV lambda.
		out$gcv.grid <- a$gcv.grid
		out$lambda.est <- a$lambda.est
		# 
		# save  GCV estimate is that is what is needed
		if(eval.cv) {
			lam <- a$lambda.est[method, "lambda"]
			out$trace <- a$lambda.est[method, "trA"]
			out$shat.GCV <- a$lambda.est[method, "shat"]
		}
		#
		# save trace and estimate of sigma an the traces
		if(!find.min) {
			out$trace <- c(a$gcv.grid[, "trA"])
			out$shat.GCV <- c(a$gcv.grid[1, "shat"])
		}
	}
	b <- list()
	# lam can either be  a grid or just the GCV value 
	NL <- length(lam)
	NG <- length(xgrid)
	h <- log(lam)
	residuals <- matrix(NA, ncol = NL, nrow = length(out$yraw))
	job <- as.integer(c(0, 3, 0))
	predicted <- matrix(NA, ncol = NL, nrow = NG)
	if(find.diagA) {
		diagA <- matrix(NA, ncol = NL, nrow = out$np)
		# add switch to find diag of A. 
		job <- as.integer(c(3, 3, 0))
	}
	for(k in 1:NL) {
		#
		# call cubic spline, note lambda is passed in log scale. 
		# spline solution evaluated at xgrid
		# 
		b <- .Fortran("css",
			h = as.double(h[k]),
			npoint = as.integer(out$np),
			x = as.double(out$x),
			y = as.double(out$y),
			wt = as.double(1/sqrt(out$wt)),
			sy = as.double(rep(0, out$np)),
			trace = as.double(0),
			diag = as.double(c(cost, offset, rep(0, (out$np - 2)))),

				cv = as.double(0),
			ngrid = as.integer(NG),
			xg = as.double(xgrid),
			yg = as.double(rep(0, NG)),
			job = as.integer(job),
			ideriv = as.integer(0),
			ierr = as.integer(0))
		#
		if(verbose) {
			print(c(b$lambda, b$trace))
		}
		if(find.diagA) {
			diagA[, k] <- b$diag
		}
		residuals[, k] <- out$yraw - splint(out$x, b$sy, out$xraw)
		predicted[, k] <- b$yg
	}
	out$call <- call
	out$lambda <- lam
	out$do.cv <- do.cv
	out$residuals <- residuals
	out$fitted.values <- out$yraw - residuals
	out$predicted <- list(x = xgrid, y = predicted)
	if(length(lambda[1]) == 1) {
		out$eff.df <- out$trace[1]
	}
	if(find.diagA) {
		out$diagA <- diagA
	}
	out
}
"sreg.df.to.lambda" <-
function(df, x, wt, guess = 1, tol = 1.0000000000000001e-05)
{
	if(is.na(df))
		return(NA)
	n <- length(unique(x))
	info <- list(x = x, wt = wt, df = df)
	if(df > n) {
		warning(" df too large to match a lambda value")
		return(NA)
	}
	h1 <- log(guess)
	########## find upper lambda
	for(k in 1:25) {
		tr <- sreg.trace(h1, info)
		if(tr <= df)
			break
		h1 <- h1 + 1.5
	}
	########## find lower lambda
	##########
	h2 <- log(guess)
	for(k in 1:25) {
		tr <- sreg.trace(h2, info)
		if(tr >= df)
			break
		h2 <- h2 - 1.5
	}
	out <- bisection.search(h1, h2, sreg.fdf, tol = tol, f.extra = info)$
		x
	exp(out)
}
"sreg.fdf" <-
function(h, info)
{
	sreg.trace(h, info) - info$df
}
"sreg.fgcv" <-
function(lam, obj)
{
	sreg.fit(lam, obj)$gcv
}
"sreg.fgcv.model" <-
function(lam, obj)
{
	sreg.fit(lam, obj)$gcv.model
}
"sreg.fgcv.one" <-
function(lam, obj)
{
	sreg.fit(lam, obj)$gcv.one
}
"sreg.fit" <-
function(lam, info)
{
	np <- info$np
	N <- info$N
	nt <- 2
	if(is.null(info$cost)) {
		cost <- 1
	}
	else {
		cost <- info$cost
	}
	if(is.null(info$offset)) {
		offset <- 0
	}
	else {
		offset <- info$offset
	}
	if(is.null(info$shat.pure.error)) {
		shat.pure.error <- 0
	}
	else {
		shat.pure.error <- info$shat.pure.error
	}
	if(is.null(info$pure.ss)) {
		pure.ss <- 0
	}
	else {
		pure.ss <- info$pure.ss
	}
	#print(np)
	#	NOTE h <- log(lam)
	temp <- (.Fortran("css",
		h = as.double(log(lam)),
		npoint = as.integer(np),
		x = as.double(info$x),
		y = as.double(info$y),
		wt = as.double(sqrt(1/info$wt)),
		sy = as.double(rep(0, np)),
		trace = as.double(0),
		diag = as.double(rep(0, np)),
		cv = as.double(0),
		ngrid = as.integer(0),
		xg = as.double(0),
		yg = as.double(0),
		job = as.integer(c(3, 0, 0)),
		ideriv = as.integer(0),
		ierr = as.integer(0)))
	rss <- sum((temp$sy - info$y)^2 * info$wt)
	MSE <- rss/np
	if((N - np) > 0) {
		MSE <- MSE + pure.ss/(N - np)
	}
	trA <- temp$trace
	den <- (1 - (cost * (trA - nt - offset) + nt)/np)
	den1 <- (1 - (cost * (trA - nt - offset) + nt)/N)
	# If the denominator is negative then flag this as a bogus case
	# by making the GCV function "infinity"
	#
	shat <- sqrt((rss + pure.ss)/(N - trA))
	GCV <- ifelse(den > 0, MSE/den^2, NA)
	gcv.model <- ifelse(
(den > 0)&( (N-np)>0), pure.ss/(N - np) + (rss/np)/(den^2), NA)
	gcv.one <- ifelse(den > 0, ((pure.ss + rss)/N)/(den1^2), NA)
	list(trace = trA, gcv = GCV, rss = rss, shat = shat, gcv.model = 
		gcv.model, gcv.one = gcv.one)
}
"sreg.fs2hat" <-
function(lam, obj)
{
	sreg.fit(lam, obj)$shat^2
}
"sreg.trace" <-
function(h, info)
{
	N <- length(info$x)
	#	h <- log(lam)
	temp <- (.Fortran("css",
		h = as.double(h),
		npoint = as.integer(N),
		x = as.double(info$x),
		y = as.double(rep(0, N)),
		wt = as.double(1/sqrt(info$wt)),
		sy = as.double(rep(0, N)),
		trace = as.double(0),
		diag = as.double(rep(0, N)),
		cv = as.double(0),
		ngrid = as.integer(0),
		xg = as.double(0),
		yg = as.double(0),
		job = as.integer(c(3, 0, 0)),
		ideriv = as.integer(0),
		ierr = as.integer(0))$trace)
	return(temp)
}
"stats" <-
function (x, by) 
{
    if (!missing(by)) {
        x <- cat.to.list(c(x), by)
    }
    if (!is.list(x) & !is.matrix(x)) 
        x <- matrix(x, ncol = 1)
    if (is.list(x)) {
        ncol <- length(x)
        out <- matrix(NA, ncol = ncol, nrow = length(describe()))
        dimnames(out) <- list(describe(), names(x))
        for (j in (1:ncol)) {
            if (is.numeric(x[[j]])) {
                out[, j] <- describe(x[[j]])
            }
        }
        return(out)
    }
    if (is.matrix(x)) {
        nc <- ncol(x)
        out <- matrix(NA, ncol = nc, nrow = length(describe()))
        dimnames(out) <- list(describe(), dimnames(x)[[2]])
        for (j in (1:nc)) {
            out[, j] <- describe(x[, j])
        }
        return(out)
    }
}
"stats.bin" <-
function (x, y, N = 10, breaks = NULL) 
{
    out <- list()
    if (is.null(breaks)) {
        breaks <- pretty(x, N)
    }
    NBIN <- length(breaks) - 1
    centers <- (breaks[1:NBIN] + breaks[2:(NBIN + 1)])/2
    test <- describe()
    obj <- matrix(NA, ncol = NBIN, nrow = length(test))
    dimnames(obj) <- list(test, format(1:NBIN))
    obj[, 1] <- describe(y[x <= breaks[2] & x >= breaks[1]])
    for (k in 2:NBIN) {
        obj[, k] <- describe(y[x <= breaks[k + 1] & x > breaks[k]])
    }
    list(centers = centers, breaks = breaks, stats = obj)
}
"stats.bplot" <-
function (x, by, style = "tukey", outlier = TRUE) 
{
    if (!missing(by)) {
        x <- cat.to.list(c(x), by)
    }
    if (!is.list(x) & !is.matrix(x)) 
        x <- matrix(x, ncol = 1)
    if (is.list(x)) {
        ncol <- length(x)
        out <- as.list(1:ncol)
        names(out) <- names(x)
        for (j in (1:ncol)) {
            if (is.numeric(x[[j]])) {
                out[[j]] <- describe.bplot(x[[j]], style = style, 
                  outlier = outlier)
            }
        }
        return(out)
    }
    if (is.matrix(x)) {
        nc <- ncol(x)
        out <- as.list(1:nc)
        names(out) <- dimnames(x)[[2]]
        for (j in (1:nc)) {
            out[[j]] <- describe.bplot(x[, j], style = style, 
                outlier = outlier)
        }
        return(out)
    }
}
"stats.sim.krig.image" <-
function (obj) 
{
    n <- length(obj$grid$y)
    m <- length(obj$grid$x)
    out1 <- out2 <- matrix(0, m, n)
    out3 <- out1[-1, ]
    out4 <- t(out3)
    k <- 1
    temp <- out1
    N <- length(obj$out)
    for (k in 1:N) {
        temp <- obj$out[[k]]
        out1 <- out1 + temp
        out2 <- temp^2 + out2
        out3 <- temp[1:(m - 1), ] * temp[2:m, ] + out3
        out4 <- temp[, 1:(n - 1)] * temp[, 2:n] + out4
        NULL
    }
    Hcor <- out3/sqrt(out2[1:(m - 1), ] * out2[2:m, ])
    Vcor <- out4/sqrt(out2[, 1:(n - 1)] * out2[, 2:n])
    out1 <- out1/N
    return(grid = obj$grid, var = (out2 - N * out1^2)/(N - 1), 
        Vcor, Hcor, Vcor, mean = out1)
}
"summary.Krig" <-
function(x, digits = 4)
{
	summary <- list(call = x$call, num.observation = length(x$residuals),
		enp = x$trace, nt = x$nt, res.quantile = quantile(x$residuals,
		seq(0, 1, 0.25)), shat.MLE = x$shat.MLE, shat.GCV = x$shat.GCV,
		rhohat = x$rhohat, m = x$m, lambda = x$lambda, cost = x$cost,
		gcvmin = min(x$gcv.grid[, 3]), rho = x$rho, sigma2 = x$sigma2,
		num.uniq = length(x$yM), knot.model = x$knot.model, np = x$
		np, method = x$method, lambda.est = x$lambda.est[!is.na(x$
		lambda.est[, 1]),  ], shat.pure.error = x$shat.pure.error)
	class(summary) <- "summary.Krig"
	summary$covariance <- cor(x$fitted.values * sqrt(x$weights), (x$y) *
		sqrt(x$weights))^2
	hold <- (sum((x$y - mean(x$y))^2) - sum(x$residuals^2))/(sum((x$y -
		mean(x$y))^2))
	summary$adjr2 <- 1 - ((length(x$residuals) - 1)/(length(x$residuals) -
		x$eff.df)) * (1 - hold)
	summary$digits <- digits
	summary$cov.function <- as.character(x$call.name)
	summary$correlation.model <- x$correlation.model
	summary$sum.gcv.lambda <- summary.gcv.Krig(x, x$lambda)
	summary
}
"summary.gcv.Krig" <-
function(out, lambda, cost = 1, verbose = FALSE, offset = 0, y = NULL)
{
	nt <- out$nt
	np <- out$np
	N <- out$N
	D <- out$matrices$D
	#
	# If new y's have been passed then update the u vector and the 
	# pure error estimates. Otherwise just use what is in the Krig object
	#
	#
	#
	#
	if(is.null(y)) {
		u <- out$matrices$u
		shat.pure.error <- out$shat.pure.error
		pure.ss <- out$pure.ss
	}
	else {
		# updating part 
		out2 <- Krig.updateY(out, y)
		u <- out2$u
		shat.pure.error <- out2$shat.pure.error
		pure.ss <- out2$pure.ss
	}
	#
	#  create a mini Krig object list with the information needed
	# for finding statistics
	#
	info <- list(matrices = list(D = D, u = u), N = N, nt = nt, cost = cost,
		pure.ss = pure.ss, shat.pure.error = shat.pure.error, offset = 
		offset)
	#       
	if(verbose) {
		print(info)
	}
	#
	#
	# data frame to hold different estimates for lambda
	#
	lambda.est <- rep(NA, 6)
	names(lambda.est) <- c("lambda", "trA", "GCV", "GCV.one", "GCV.model",
		"shat")
	#
	# fill in stuff for this  lambda
	lambda.est[1] <- lambda
	lambda.est[2] <- Krig.ftrace(lambda, D)
	lambda.est[3] <- Krig.fgcv(lambda, info)
	lambda.est[4] <- Krig.fgcv.one(lambda, info)
	if(!is.na(shat.pure.error)) {
		lambda.est[5] <- Krig.fgcv.model(lambda, info)
	}
	lambda.est[6] <- sqrt(Krig.fs2hat(lambda, info))
	lambda.est
}
"summary.gcv.sreg" <-
function(out, lambda, cost = 1, nstep.cv = 20, offset = 0, verbose = TRUE)
{
	shat.pure.error <- out$shat.pure.error
	pure.ss <- out$pure.ss
	nt <- 2
	np <- out$np
	N <- out$N
	out$cost <- cost
	out$offset <- offset
	lambda.est <- rep(NA, 6)
	names(lambda.est) <- c("lambda", "trA", "GCV", "GCV.one", "GCV.model",
		"shat")
	#
	# fill in stuff for this  lambda
	lambda.est[1] <- lambda
	temp <- sreg.fit(lambda, out)
	lambda.est[2] <- temp$trace
	lambda.est[3] <- temp$gcv
	lambda.est[4] <- temp$gcv.one
	if(!is.na(shat.pure.error)) {
		lambda.est[5] <- temp$gcv.model
	}
	lambda.est[6] <- temp$shat
	lambda.est
}
"summary.krig.image" <-
function (x, digits = 4, ...) 
{
    summary <- list(call = x$call, num.observation = length(x$residuals), 
        enp = x$trace, nt = x$nt, res.quantile = quantile(x$residuals, 
            seq(0, 1, 0.25)), shat.MLE = x$shat.MLE, shat.GCV = x$shat.GCV, 
        rhohat = x$rhohat, m = 2, lambda = x$lambda, cost = x$cost, 
        rho = x$rho, sigma2 = x$sigma2)
    class(summary) <- "summary.krig.image"
    summary$covariance <- cor(x$fitted.values * sqrt(x$weights), 
        (x$y) * sqrt(x$weights))^2
    hold <- (sum((x$y - mean(x$y))^2) - sum(x$residuals^2))/(sum((x$y - 
        mean(x$y))^2))
    summary$adjr2 <- 1 - ((length(x$residuals) - 1)/(length(x$residuals) - 
        x$eff.df)) * (1 - hold)
    summary$digits <- digits
    summary$cov.function <- as.character(x$call$cov.function)
    summary$correlation.model <- FALSE
    summary
}
"summary.qsreg" <-
function (x, ...) 
{
    digits <- 4
    c1 <- "Number of Observations:"
    c2 <- (x$N)
    c1 <- c(c1, "Effective degrees of freedom:")
    c2 <- c(c2, format(round(x$trace[x$ind.cv.ps], 1)))
    c1 <- c(c1, "Residual degrees of freedom:")
    c2 <- c(c2, format(round(x$N - x$trace[x$ind.cv.ps], 1)))
    c1 <- c(c1, "Log10(lambda)")
    c2 <- c(c2, format(round(log10(x$cv.grid[x$ind.cv.ps,1]), 2)))
    sum <- cbind(c1, c2)
    dimnames(sum) <- list(rep("", dim(sum)[1]), rep("", dim(sum)[2]))
    cat("Call:\n")
    dput(x$call)
    print(sum, quote = FALSE)
    invisible(x)
}
"summary.spatial.design" <-
function (x, digits = 4, ...) 
{
    class(x) <- ("summary.spatial.design")
    x
}
"summary.sreg" <-
function(x, digits = 4, ...)
{
	if(length(x$lambda) > 1) {
		stop("Can't do a summary on an object with a grid of smoothing\nparameters"
			)
	}
	summary <- list(call = x$call, num.observation = length(x$residuals),
		enp = x$trace, nt = x$nt, res.quantile = quantile(x$residuals,
		seq(0, 1, 0.25)), shat.GCV = x$shat.GCV, m = x$m, lambda = x$
		lambda, cost = x$cost, num.uniq = length(x$y), np = x$np, 
		method = x$method, lambda.est = x$lambda.est[!is.na(x$
		lambda.est[, 1]),  ], shat.pure.error = x$shat.pure.error)
	class(summary) <- "summary.sreg"
	summary$covariance <- cor(x$fitted.values * sqrt(x$wt.raw), (x$yraw) *
		sqrt(x$wt.raw))^2
	hold <- (sum((x$yraw - mean(x$yraw))^2) - sum(x$residuals^2))/(sum(
		(x$yraw - mean(x$yraw))^2))
	summary$adjr2 <- 1 - ((length(x$residuals) - 1)/(length(x$residuals) -
		x$eff.df)) * (1 - hold)
	summary$digits <- digits
	summary$cov.function <- as.character(x$call.name)
	summary$correlation.model <- x$correlation.model
	summary$sum.gcv.lambda <- summary.gcv.sreg(x, x$lambda)
	summary
}
"surface.Krig" <-
function(obj, grid.list = NA, extrap = FALSE, graphics.reset = NULL, xlab = NULL,
	ylab = NULL, main = NULL, zlab = NULL, zlim = NULL, levels = NULL,
	type = "b", nx=30, ny=30,...)
{
	## modified so that you can give main, and ylab as arguments
	## in ... and have them passed correctly
	out.p <- predict.surface(obj, 
             grid.list = grid.list, extrap = extrap, nx=nx,ny=ny)
	if(!is.null(ylab))
		out.p$ylab <- ylab
	if(!is.null(xlab))
		out.p$xlab <- xlab
	if(!is.null(zlab))
		out.p$zlab <- zlab
	if(!is.null(main))
		out.p$main <- main
	##    else
	##      out.p$main <- NULL
	plot.surface(out.p, type = type, graphics.reset = graphics.reset, 
		levels = levels, zlim = zlim, ...)
	invisible()
}
"surface" <-
function (x, grid.list = NA, extrap = FALSE, xlab = NULL, ylab = NULL, 
    zlab = NULL, main = NULL, levels = NULL, zlim = NULL, ...) 
UseMethod("surface")
"surface.default" <-
function (...) 
{
    plot.surface(...)
}
"surface.krig.image" <-
function (obj, grid.list = NA, extrap = TRUE, graphics.reset = FALSE, 
    xlab = NULL, ylab = NULL, main = NULL, zlab = NULL, zlim = NULL, 
    levels = NULL, ptype = "I", ...) 
{
    old.par <- par("mfrow", "oma")
    if (graphics.reset) 
        on.exit(par(old.par))
    if (is.na(grid.list)) {
        out.p <- out$surface
    }
    else {
        out.p <- predict.surface(obj, grid.list = grid.list, 
            extrap = extrap)
    }
    if (!is.null(ylab)) 
        out.p$ylab <- ylab
    if (!is.null(xlab)) 
        out.p$xlab <- xlab
    if (!is.null(zlab)) 
        out.p$zlab <- zlab
    if (!is.null(main)) 
        out.p$main <- main
    plot.surface(out.p, type = ptype, graphics.reset = graphics.reset, 
        levels = levels, zlim = zlim, ...)
    invisible()
}
"surface.surface" <-
function (...) 
{
# 
    plot.surface(...)
}
"test.data" <-
structure(list(x = structure(c(10.2420950223404, 3.80376523711237, 
9.10894898014071, 9.62401536295848, -2.42853799498812, -12.626852374789, 
-0.419779101996896, -7.88824165286121, 3.54623204570348, -16.9019033521803, 
-27.2032310085453, -6.18852258956094, -5.26140310048807, -12.2147992685346, 
-25.5550185835271, -15.6657440334172, 21.109995699806, 12.9204402129956, 
33.8836419936979, 28.1148985061338, 10.2420950223404, 3.80376523711237, 
9.10894898014071, 9.62401536295848, -2.42853799498812, -12.626852374789, 
-0.419779101996896, -7.88824165286121, 3.54623204570348, -16.9019033521803, 
-8.81404505952784, 6.475624941694, -12.2040623901154, -18.5689928883614, 
6.8907291046231, -14.9714234763093, -2.03401039835273, 10.6958505981398, 
12.287083222701, -4.939739538856, 11.4568748968428, 20.2432463455088, 
35.0486281566463, 28.0610414140067, 23.2873435403219, -20.2294095400778, 
-19.6759373228389, -16.9777602637997, -17.5312324810386, -18.4998088612067, 
-8.81404505952784, 6.475624941694, -12.2040623901154, -18.5689928883614, 
6.8907291046231, -14.9714234763093, -2.03401039835273, 10.6958505981398, 
12.287083222701, -4.939739538856), .Dim = c(30, 2), .Dimnames = list(
    c("170310032", "170310037", "170310050", "170311002", "170311003", 
    "170311601", "170314002", "170314003", "170317002", "170436001", 
    "170890005", "170970001", "170971002", "170973001", "171110001", 
    "171971008", "180891016", "180892008", "181270020", "181270024", 
    "170310032", "170310037", "170310050", "170311002", "170311003", 
    "170311601", "170314002", "170314003", "170317002", "170436001"
    ), c("East.West", "North.South"))), y = c(36.4902936963152, 
34.6396930821552, 31.6444005657229, 34.4646956838262, 37.7204739668803, 
40.1342965426748, 37.0181086910068, 38.4001686365134, 44.0485589002946, 
38.4870329290307, 42.2402282830657, 40.0049235817847, 42.1090485712195, 
39.6319596353327, 42.8054712629932, 44.1097465187358, 35.1186331327201, 
46.898470931915, 42.9564231070325, 46.6868555984414, 36.4902936963152, 
34.6396930821552, 31.6444005657229, 34.4646956838262, 37.7204739668803, 
40.1342965426748, 37.0181086910068, 38.4001686365134, 44.0485589002946, 
38.4870329290307), knots.data = c(10.6958505981398, 12.287083222701, 
11.4568748968428, -17.5312324810386, -15.6657440334172, 28.1148985061338, 
35.0486281566463, -5.26140310048807, -12.2040623901154, 23.2873435403219
)), .Names = c("x", "y", "knots.data"))
"test.data2" <-
structure(list(x = c(0.4, 0.4, 0.7, 0.3, 0.35, 0.35, 0.25, 0.65, 
0.75, 0.25, 0.35, 0.75, 0.95, 0.3, 0.15, 0.2, 0.75, 1, 0.45, 
0.5, 0.9, 0.45, 0.9, 0.85, 0, 0.7, 0, 0.65, 0.4, 0.9, 0.15, 0.65, 
0.9, 0.4, 0.6, 0.95, 0.15, 0.1, 0.95, 0.15, 0, 0.2, 0.05, 0, 
0.65, 0.2, 1, 0.3, 0.35, 0.6, 0.15, 0.8, 0.55, 0.2, 0.25, 0.7, 
0.15, 0.1, 0.9, 0.25, 0.1, 0.8, 0.55, 0.1, 0.65, 1, 0.6, 0.65, 
0.55, 0.4, 0.25, 0.25, 0.2, 0.9, 0.2, 0.15, 0.85, 0.5, 0.85, 
0.6, 1, 0.9, 0.65, 0.3, 0.6, 0.25, 0.55, 0.25, 0.2, 0.85, 0, 
0.75, 0.55, 0, 0.85, 0.25, 0.85, 0.65, 0.65, 0.35), y = c(0.98640639074561, 
1.22579874381002, 0.549319149927708, 0.771388094957842, 1.33786393245265, 
1.14815850793532, 1.01287181839253, 0.397735635128919, 0.0499471530345553, 
0.893181794116213, 0.810832470729094, 0.151247433892658, 0.385609949203335, 
1.12443122528868, 0.729610669304712, 0.54716949551964, 0.422192695111754, 
0.0326949949052746, 1.06418505325497, 0.875471630670542, 0.172222306129207, 
1.13060920336158, 0.196733959150468, 0.0946927952036593, -0.336785808313468, 
0.669662393029595, 0.015036189405521, 0.7287193152766, 1.03542612264139, 
0.378625803276854, 0.736125314023966, 0.696805519785702, -0.00743428243191269, 
1.12145726622649, 0.661780954588732, -0.066874620704709, 0.811392270497914, 
0.778563266874072, -0.175423296594844, 0.571174885379274, 0.0255110399800076, 
1.08934708902127, 0.235551332894746, 0.23325143972109, 0.868813131900236, 
0.802810396505409, -0.207578375086925, 0.946018512248871, 1.20843678336201, 
0.503176836924307, 0.694765068504962, 0.278560021334305, 0.426383113966063, 
0.6758919780734, 0.900733503518646, 0.501823359488979, 0.762167835924653, 
0.308070980433901, -0.133540550393086, 1.02959802983169, 0.707296956029798, 
0.430389873764071, 0.792201556950709, 0.751612177667865, 0.765919657861369, 
-0.358493246480646, 0.618530044695209, 0.297848561236735, 0.841499047764572, 
1.07473927499346, 1.05294938342673, 0.907275665825836, 1.07874388373414, 
0.131458925666395, 0.88786091955025, 1.13551296764612, 0.040077562386241, 
0.951471863798844, 0.293845451392964, 0.812466556084625, 0.326502136456003, 
0.00883846992658753, 0.763480773007732, 0.835142053208335, 0.554631906290923, 
0.88583502921549, 0.843079469758314, 0.565717923445237, 0.75503569684186, 
0.181670870368065, 0.020385565332862, 0.0290782843716785, 0.823025509980718, 
0.187153850654041, 0.0871469474790252, 0.989900968999736, 0.439289472049032, 
0.482376249158101, 0.793229066953671, 0.98708363454622), true = c(0.973795435333897, 
0.973795435333897, 0.42603550295858, 0.994082840236686, 1, 1, 
0.950972104818259, 0.538461538461538, 0.316990701606086, 0.950972104818259, 
1, 0.316990701606086, 0.0160608622147083, 0.994082840236686, 
0.732882502113271, 0.86559594251902, 0.316990701606086, 0, 0.920540997464075, 
0.84530853761623, 0.0608622147083685, 0.920540997464075, 0.0608622147083685, 
0.129332206255283, 0, 0.42603550295858, 0, 0.538461538461538, 
0.973795435333897, 0.0608622147083685, 0.732882502113271, 0.538461538461538, 
0.0608622147083685, 0.973795435333897, 0.649196956889264, 0.0160608622147083, 
0.732882502113271, 0.547759932375317, 0.0160608622147083, 0.732882502113271, 
0, 0.86559594251902, 0.305156382079459, 0, 0.538461538461538, 
0.86559594251902, 0, 0.994082840236686, 1, 0.649196956889264, 
0.732882502113271, 0.216398985629755, 0.753169907016061, 0.86559594251902, 
0.950972104818259, 0.42603550295858, 0.732882502113271, 0.547759932375317, 
0.0608622147083685, 0.950972104818259, 0.547759932375317, 0.216398985629755, 
0.753169907016061, 0.547759932375317, 0.538461538461538, 0, 0.649196956889264, 
0.538461538461538, 0.753169907016061, 0.973795435333897, 0.950972104818259, 
0.950972104818259, 0.86559594251902, 0.0608622147083685, 0.86559594251902, 
0.732882502113271, 0.129332206255283, 0.84530853761623, 0.129332206255283, 
0.649196956889264, 0, 0.0608622147083685, 0.538461538461538, 
0.994082840236686, 0.649196956889264, 0.950972104818259, 0.753169907016061, 
0.950972104818259, 0.86559594251902, 0.129332206255283, 0, 0.316990701606086, 
0.753169907016061, 0, 0.129332206255283, 0.950972104818259, 0.129332206255283, 
0.538461538461538, 0.538461538461538, 1)), .Names = c("x", "y", 
"true"))
"tim.colors" <-
function( n=64){
# tims original 64 color definition definition:

orig<-c("#00008F", "#00009F", "#0000AF", "#0000BF",
                "#0000CF", "#0000DF", "#0000EF", "#0000FF",
                "#0010FF", "#0020FF", "#0030FF", "#0040FF",
                "#0050FF", "#0060FF", "#0070FF", "#0080FF",
                "#008FFF", "#009FFF", "#00AFFF", "#00BFFF",
                "#00CFFF", "#00DFFF", "#00EFFF", "#00FFFF",
                "#10FFEF", "#20FFDF", "#30FFCF", "#40FFBF",
                "#50FFAF", "#60FF9F", "#70FF8F", "#80FF80",
                "#8FFF70", "#9FFF60", "#AFFF50", "#BFFF40",
                "#CFFF30", "#DFFF20", "#EFFF10", "#FFFF00",
                "#FFEF00", "#FFDF00", "#FFCF00", "#FFBF00",
                "#FFAF00", "#FF9F00", "#FF8F00", "#FF8000",
                "#FF7000", "#FF6000", "#FF5000", "#FF4000",
                "#FF3000", "#FF2000", "#FF1000", "#FF0000",
                "#EF0000", "#DF0000", "#CF0000", "#BF0000",
                "#AF0000", "#9F0000", "#8F0000", "#800000")
if( n==64) return( orig)

rgb.tim<-t(col2rgb(orig))
temp<-matrix( NA, ncol=3, nrow=n)
x<- seq( 0,1,,64)
xg<-seq( 0,1,,n)
for ( k in 1:3){
hold <- splint( x,rgb.tim[,k], xg)
 hold[ hold<0] <- 0
 hold[ hold>255] <- 255
temp[,k]<- round( hold)
}
rgb( temp[,1], temp[,2], temp[,3],maxColorValue = 255)
}
"transformx" <-
function (x, scale.type = "unit.sd", x.center, x.scale) 
{
    if (scale.type == "unscaled") {
        x.center <- rep(0, ncol(x))
        x.scale <- rep(1, ncol(x))
    }
    else if (scale.type == "unit.sd") {
        x.center <- apply(x, 2, mean)
        x.scale <- sqrt(apply(x, 2, var))
        x <- scale(x)
    }
    else if (scale.type == "range") {
        x.center <- apply(x, 2, min)
        x.scale <- apply(x, 2, max) - apply(x, 2, min)
        x <- scale(x, center = x.center, scale = x.scale)
    }
    else if (scale.type == "user") {
        if (missing(x.center)) 
            x.center <- apply(x, 2, mean)
        if (missing(x.scale) || length(x.scale) != ncol(x)) 
            stop("Error: x.scale must be a vector of length d")
        x <- scale(x, center = x.center, scale = x.scale)
    }
    else stop(paste("Error: scale.type must be one of", "unit.sd, range, user, unscaled"))
    attr(x, "x.center") <- x.center
    attr(x, "x.scale") <- x.scale
    attr(x, "x.scale.type") <- scale.type
    x
}
"unscale" <-
function (x, x.center, x.scale) 
{
    x <- scale(x, center = FALSE, scale = 1/x.scale)
    x <- scale(x, center = -x.center, scale = FALSE)
    x
}
"variogram.matrix" <-
function (dat, R = 5,dx) 
{
    shift.fct <- function(d) {
        shift.x <- c(0:d)
        shift.y <- sqrt(round(d^2) - shift.x^2)
        indices <- ((as.integer(shift.y))^2 == (round(d^2) - 
            shift.x^2))
        shift.y <- shift.y[indices]
        shift.x <- shift.x[indices]
        return(list(x=shift.x, y=shift.y))
    }
    n <- ncol(dat)
    m <- nrow(dat)
    a <- as.integer(R/sqrt(2)) + 1
    if (a > max(m, n)) {
        cat("\n a=", a, " has be larger than max(m,n) \n")
        return()
    }
    ind <- cbind(rep(1:a, a), rep(1:a, rep(a, a)))
    x.diff <- outer(ind[, 1], ind[, 1], "-")
    y.diff <- outer(ind[, 2], ind[, 2], "-")
    d.matrix <- sqrt(x.diff^2 + y.diff^2)
    d <- d.matrix[, 1]
    indices <- c(0)
    i <- 0
    l.d <- length(d)
    while ((i + 1) * a < l.d) {
        indices <- c(indices, c((i * a + i + 1):((i + 1) * a)))
        i <- i + 1
    }
    indices <- c(indices, (i * a + i + 1):l.d)
    indices <- indices[-2]
    l.i <- length(indices)
    d <- d[indices]
    d <- sort(d)
    vgram <- rep(NA, length(d))
    for (i in 1:length(d)) {
        sum.temp <- 0
        l.temp <- 0
        shift <- shift.fct(d[i])
        for (j in 1:length(shift$x)) {
            h.x <- shift$x[j]
            h.y <- shift$y[j]
            sum.temp <- sum.temp + sum((dat[1:(m - h.x), 1:(n - 
                h.y)] - dat[(1:(m - h.x) + h.x), (1:(n - h.y) + 
                h.y)])^2)
            l.temp <- l.temp + ((n - h.x) * (m - h.y))
        }
        vgram[i] <- (0.5 * sum.temp)/l.temp
    }
    list(vgram=vgram, d=d*dx)
}
"vgram" <-
function(loc, y, id = NULL, d = NULL, lon.lat = FALSE, dmax = NULL, 
N = NULL, breaks = NULL)
{
	if(is.null(id)) {
		n <- nrow(loc)
		ind <- rep(1.:n, n) > rep(1.:n, rep(n, n))
		id <- cbind(rep(1.:n, n), rep(1.:n, rep(n, n)))[ind,  ]
	}
	##
	## OK here it is :
	##
	if(is.null(d)) {
		loc <- as.matrix(loc)
		if(lon.lat) {
			d <- rdist.earth(loc)[id]
		}
		else {
			d <- rdist(loc, loc)[id]
		}
	}
	vg <- 0.5 * (y[id[, 1.]] - y[id[, 2.]])^2.
	call <- match.call()
	##
	##
	##
	if(is.null(dmax)) {
		dmax <- max(d)
	}
	od <- order(d)
	d <- d[od]
	## Replace next two statements
	## vgram <- vgram[od]
	## ind <- d <= dmax & !is.na(vgram)
	vg <- vg[od]
	ind <- d <= dmax & !is.na(vg)
	##
	## binned  variogram if breaks supplied
	##
	out <- list(d = d[ind], vgram = vg[ind], call = call)
	if(!is.null(breaks) | !is.null(N)) {
		out <- c(out, stats.bin(d[ind], vg[ind], N = N, breaks = breaks))
	}
	out
}
"vgram.matrix" <-
function (dat, R = 5, nsum = 1:8, collapse = TRUE, dx=1,dy=1) 
{

    if (collapse& (dx==dy)) {
        variogram.matrix(dat, round(R/dx),dx)
    }
    else {
        N <- ncol(dat)
        M <- nrow(dat)
        m <- round(R/dx)
        n <- round(R/dy)

        ind <- cbind(rep(0:m, n + 1), rep(0:n, rep(m + 1, n + 
            1)))
        d <- sqrt((dx*ind[, 1])^2 + (dy*ind[, 2])^2)
        ind <- ind[(d > 0) & (d <= R), ]
        d <- d[(d > 0) & (d <= R)]
        ind <- ind[order(d), ]
        d <- sort(d)
        nbin <- nrow(ind)
        ns <- length(nsum)
        hold <- matrix(NA, ncol = ns, nrow = nbin)
        hold2 <- rep(NA, nbin)
        for (k in 1:nbin) {
            m1 <- M - ind[k, 1]
            m2 <- ind[k, 1] + 1
            n1 <- N - ind[k, 2]
            n2 <- ind[k, 2] + 1
            hold[k, ] <- c(describe(0.5 * (dat[1:m1, 1:n1] - 
                dat[m2:M, n2:N])^2))[nsum]
            hold2[k] <- mean((0.5 * (abs(dat[1:m1, 1:n1] - dat[m2:M, 
                n2:N]))^0.5))
        }
        cst <- (0.457 + 0.494/nbin)
        hold2 <- hold2^4/cst
        list(d = d, ind = ind, stats = hold, vgram = hold[, 2], 
            vgram.robust = hold2)
    }
}
"world" <-
function (ylim = c(-90,90), xlim = NULL, add = FALSE, 
    asp = 1, xlab = "", ylab = "", xaxt = "n", yaxt = "n", 
eps=.1,shift=FALSE,...) 
{

if( shift){
# this changes
#the range of lon from (-180, 180) to (0,360)
world.dat$x[world.dat$x<0] <- world.dat$x[world.dat$x<0] +360
#
# find where there are lines that cross lon=0
# and add a break using NA

world.dat$x[world.dat$x<=eps|world.dat$x>=(360-eps)]<-NA

} 

if( is.null(xlim) ) {
   if( shift)
            {xlim<- c(0,360)}
         else
            {xlim<- c(-180,180)}
    }

    if (!add) {
        plot(world.dat, ylim = ylim, xlim = xlim, type = "n", 
            xaxt = xaxt, yaxt = yaxt, xlab = xlab, ylab = ylab, 
            asp = asp, ...)
    }
    lines(world.dat, err = -1, ...)
    invisible()
}
"world.dat" <-
structure(list(x = c(-131, -130.7, -130, -128.7, -128.1, -127, 
-126.6, -128, -127.9, -127.5, -126.6, -125.5, -125.2, -123.7, 
-123.5, -124.8, -124.7, -123.2, -122.4, -123.8, -124.6, -124, 
-124, -124.1, -124.2, -124.5, -124.3, -124.2, -124.1, -124.4, 
-123.9, -123.7, -123, -122.5, -122.2, -122, -122.5, -122.4, -121.8, 
-122, -121.5, -120.9, -120.6, -120, -119, -118.4, -117.5, -117, 
-116.7, -116.3, -116, -115.8, -115.7, -114.6, -114.2, -115.1, 
-113.7, -113, -112.1, -111.8, -110.7, -110.1, -109.5, -109.8, 
-110.3, -110.7, -111.4, -112, -112.9, -113.1, -113.6, -114.3, 
-114.5, -114.7, -114.8, -114, -113.1, -112.8, -112.2, -111.2, 
-110.7, -109.8, -109.5, -108.7, -108, -106.9, -106, -105.6, -105.3, 
-105.6, -105.4, -105.6, -105, -103.7, -103, -102, -101.7, -100, 
-98.8, -98.6, -97.8, -97.4, -96.9, -96.3, -95.7, -95.1, -94.4, 
-93.7, -93.1, -92.5, -91.9, -91.2, -90.5, -89.9, -89.5, -88.8, 
-87.9, -87.9, -87.7, -87.6, -87.6, -87.5, -87.4, -87.7, -87.6, 
-87.2, -86.7, -86.2, -85.7, -85.9, -85.7, -85.8, -85.8, -85.4, 
-85.1, -84.9, -85.3, -84.8, -84.7, -84.2, -83.6, -83.8, -83.3, 
-83.5, -83.5, -83.2, -83, -82.9, -82.2, -81.6, -81.2, -80.9, 
-80.4, -80, -80.5, -80.2, -79.8, -79.6, -79, -78.4, -78.3, -78.3, 
-77.7, -77.5, -77.5, -77.4, -77.4, -77.5, -77.4, -77.3, -77.5, 
-77.1, -77.7, -78, -78.5, -78.5, -78.8, -78.8, -79.5, -80, -80.4, 
-80.5, -80.9, -80.9, -80.8, -80.7, -80.3, -80, -79.7, -80, -80.8, 
-81.3, -81.4, -81.2, -81, -81.1, -80.8, -79.9, -79.6, -79.1, 
-78.7, -78.6, -78.2, -77.7, -77.3, -77.2, -77, -76.8, -76.5, 
-76.2, -76.3, -75.9, -75.2, -74.7, -73.8, -72.9, -72.8, -71.9, 
-71.5, -71, -70.3, -70.3, -70.2, -70.2, -70.1, -70.2, -70.5, 
-70.7, -70.4, -70.5, -70.5, -70.7, -70.7, -70.8, -70.9, -71.2, 
-71.6, -71.3, -71.7, -71.7, -71.6, -71.5, -71.6, -71.8, -71.6, 
-72, -72.2, -72.4, -72.5, -72.8, -73.2, -73.3, -73.7, -73.7, 
-73.5, -73.2, -73.4, -73.7, -74, -73.7, -74, -74.2, -74.2, -73.7, 
-73.4, -73.1, -72.9, -73.1, -73.6, -74.1, -74.5, -74.5, -74.7, 
-75.1, -75.7, -75.1, -74.2, -74.8, -75.2, -75.7, -75.7, -75.6, 
-75, -75.5, -75.3, -75, -75.2, -75.2, -75.1, -75.1, -74.7, -74.1, 
-73.3, -74.7, -73.9, -73.4, -72.7, -72, -72.5, -71, -70.5, -70.1, 
-69.1, -68.5, -68, -68.5, -67.5, -67, -66.8, -66.2, -65.7, -65.3, 
-65.2, -66.3, -66.8, -67.5, -68, -68.6, -68.2, -68.8, -69.5, 
-69.1, -68.5, -68.7, -69.1, -69, -67.9, -67.7, -67.4, -67.1, 
-66.7, -66.1, -65.9, -65.7, -66.3, -67.1, -67.5, -67.4, -67, 
-66.4, -65.6, -65.8, -65.2, -65, -65, -64.2, -63.6, -63.8, -64, 
-64.6, -64.9, -65, -64.9, -63.7, -62.3, -62.5, -62.1, -62.3, 
-62.1, -61.4, -60.6, -59.2, -58.1, -57.5, -56.6, -57.1, -57.1, 
-57.9, -58.5, -58, -57.4, -56.8, -56.1, -54.9, -54.1, -53.5, 
-53, -52.5, -51.8, -50.8, -50.3, -49.9, -49.1, -48.7, -48.7, 
-48.7, -48.5, -48.4, -47.9, -47, -46.6, -46.2, -45.2, -45.4, 
-44.6, -44.7, -44.1, -43.5, -42.5, -42, -41.3, -41, -40.8, -40.3, 
-40, -39.6, -39.7, -39.2, -39.2, -39, -38.9, -39, -38.9, -38.8, 
-38.5, -38, -37.4, -36.8, -36, -35.2, -34.9, -35, -35.1, -35.6, 
-36.6, -37.1, -37.8, -38.5, -39.5, -40.5, -41.3, -41.8, -42.3, 
-43.1, -43.9, -44.4, -44.6, -45.4, -46.4, -47.4, -48.3, -48.8, 
-48.5, -48.8, -49.6, -50.3, -50.7, -50.8, -49.9, -50, -50.7, 
-51, -51.1, -51.5, -51.8, -52.7, -53, -53.9, -54, -55.1, -55.9, 
-56.4, -57.2, -57.5, -58.3, -58.5, -58.7, -59.7, -60.4, -60.7, 
-60.7, -61.2, -61.8, -62.3, -62.9, -61.9, -62.2, -63.3, -64.3, 
-63.7, -64.2, -64.7, -65.3, -66.1, -66.6, -67.6, -68.3, -68.5, 
-69.3, -69.8, -70.1, -70.3, -69.7, -70.5, -71.5, -71.3, -71.1, 
-71.7, -72.1, -71.6, -71.7, -72, -71.1, -71.7, -72.2, -72.7, 
-73.4, -74, -74.3, -74.5, -75.3, -75.5, -75.6, -76.1, -76.6, 
-76.9, -76.7, -77, -77.8, -78.5, -79.1, -79.9, -80, -80.2, -80.7, 
-81.6, -81.8, -82.4, -82.6, -83.1, -83.6, -83.9, -83.7, -83.5, 
-83.5, -83.2, -83.1, -83.9, -84.7, -85.2, -86, -86.5, -87.5, 
-88.1, -88.6, -88.7, -88.3, -88.2, -88.1, -88.4, -88, -87.9, 
-87.7, -87.5, -87.6, -87.4, -87.7, -87.5, -86.9, -86.9, -87.1, 
-88, -88.7, -89.1, -90.2, -90.5, -90.7, -91, -91.3, -91.6, -91.8, 
-92.3, -92.9, -94, -94.7, -95.6, -95.9, -96.3, -96.8, -97.4, 
-97.7, -97.7, -97.7, -97.7, -97.4, -97.1, -97.4, -97.4, -96.8, 
-96, -95.1, -95.1, -94.7, -94.2, -93.2, -92.1, -91.9, -91.2, 
-90.9, -90.2, -90, -89.5, -89, -89.6, -89.5, -89.7, -90.4, -90, 
-89.4, -88.4, -88, -87.7, -86.7, -85.8, -85.4, -85, -84.3, -84, 
-83.1, -82.7, -82.9, -82.7, -82.7, -82.2, -82, -81.8, -81.7, 
-81.2, -80.8, -80.5, -80.2, -80, -80.4, -80.6, -81.1, -81.4, 
-81.3, -81, -80.5, -80, -79.2, -78.5, -77.8, -77, -76.3, -76.5, 
-76.5, -75.7, -75.6, -76.7, -75.8, -75.9, -76.3, -76.3, -76.5, 
-76, -76.2, -76.3, -75.9, -75.7, -76, -75.6, -75.1, -75.5, -75.6, 
-74.9, -74.5, -74, -74.1, -74, -73, -72, -72.5, -72.6, -73.7, 
-73.7, -72.5, -71.5, -71.1, -70.7, -70, -70.1, -70, -70.6, -71, 
-70.8, -70.4, -69.5, -69, -67.7, -67, -65.8, -64.6, -64.8, -64.2, 
-64, -64.3, -64.9, -66, -66, -65.3, -64.3, -64, -63.5, -62.3, 
-61, -61, -59.9, -60.5, -60.6, -61.2, -61.5, -61.9, -63.2, -63.8, 
-64.7, -64.9, -65, -64.5, -65.7, -65.8, -65.9, -64.8, -64.1, 
-65.4, -67, -68.5, -69.6, -70.5, -70.8, -69.9, -69.2, -68.6, 
-68, -67.1, -66.5, -65, -63.5, -62.1, -60.8, -59.5, -58.7, -58, 
-57.1, -56.8, -55.8, -55.9, -56.6, -57.3, -57.6, -58.1, -58.3, 
-58.8, -59, -59.4, -59.9, -60.1, -60.4, -60.1, -59.9, -59.3, 
-58.9, -58.4, -58, -57.5, -57.4, -57.3, -57.7, -57.9, -58.1, 
-58.4, -58.8, -59, -59.1, -59.3, -59.5, -59.6, -60, -59.8, -60, 
-60.4, -60.4, -60.3, -60.5, -60.8, -61, -61.4, -61.6, -62, -61.9, 
-61.6, -61.7, -61.8, -61.4, -61.6, -61.8, -62.2, -61.8, -61.9, 
-62.1, -62.5, -62.4, -62.9, -62.6, -62.8, -63.2, -62.9, -63, 
-62.8, -63.1, -63.1, -63.6, -63.4, -63.5, -63.7, -63.7, -63.6, 
-64, -64.1, -64.1, -64.3, -64.5, -64.7, -65, -65.5, -65.1, -65.7, 
-65.6, -66, -66.6, -67, -67.7, -67.8, -68.2, -68.3, -69, -69.5, 
-69.2, -69.2, -69.7, -69.6, -69.7, -69.5, -69.7, -69.6, -69.7, 
-69.6, -69.4, -69.5, -69.7, -70, -70.1, -70.4, -71.4, -71.7, 
-71.8, -71.8, -72, -72.6, -73, -73.5, -73.8, -74.3, -74.7, -75, 
-75.7, -76.5, -77.4, -78, -78.2, -77.9, -77.7, -77.8, -77.8, 
-77.8, -77.6, -77.3, -77.5, -77.8, -77.9, -78, -78.5, -78.3, 
-77.6, -77, -76.7, -76.6, -76.6, -76.7, -76.4, -75.9, -76.7, 
-77, -77.7, -78.5, -79.5, -79.5, -79.2, -79, -78.9, -78.7, -78.7, 
-78.7, -78.8, -79, -79.3, -79.6, -80, -80.5, -80.8, -81.4, -81.5, 
-81.7, -82.3, -82.1, -82.1, -82.4, -82.2, -82.7, -83, -83.8, 
-84.4, -85.3, -86, -87, -87.8, -88.4, -89.4, -90.2, -91, -92, 
-92.5, -92.5, -92.5, -93, -93.6, -94, -94.4, -94.8, -94.5, -93.8, 
-93.5, -93.5, -92.8, -92.6, -91.9, -92.2, -92, -91, -90.6, -91.1, 
-91.7, -91, -90.2, -89.8, -89, -88.2, -87.8, -87.5, -87, -86.9, 
-87.4, -88.2, -89, -89.8, -90.3, -89.6, -89, -88.3, -87.6, -87, 
-86.3, -86.3, -86.5, -85.7, -85.2, -84.8, -84, -83.3, -83.5, 
-84.3, -84.1, -83.9, -83.8, -83.8, -83, -82.6, -82, -81.5, -81.1, 
-82, -82.5, -81.8, -81.2, -81.7, -81.5, -81.3, -82, -82.4, -82.9, 
-83.7, -84.5, -85.3, -85.4, -84.9, -85, -85, -85.6, -85.7, -86, 
-86.4, -86.6, -86.8, -86.5, -87, -87.5, -88.3, -88.3, -88.1, 
-87.8, -87.9, -88.4, -89, -89.4, -89.6, -90, -90.2, -90.4, -90.4, 
-90.6, -91, -90.9, -90.7, -90.2, -90.3, -90.9, -91.4, -92, -92.6, 
-92, -91.6, -92, -92.5, -93, -92.9, -93, -93.8, -94, -94.3, -93.6, 
-93.5, -92.5, -91.5, -90.5, -90.5, -91.5, -92, -93, -94, -95, 
-95.2, -95.9, -95.7, -95.3, -95.3, -95.5, -96, -96.5, -96.6, 
-96.4, -95.5, -94.5, -93.7, -94, -94.4, -94.7, -94, -93.8, -94, 
-95, -95.5, -95.5, -96.3, -96.1, -95.6, -96, -97, -98, -98.5, 
-99.5, -99, -98, -98.5, -98.8, -99.5, -100.5, -101.5, -103, -104, 
-104.7, -105.3, -106, -107, -108, -108.5, -108.4, -107.5, -106.5, 
-106.5, -107.5, -107.9, -107.3, -108, -109, -109.5, -110.5, -111.5, 
-112.5, -113.5, -114.5, -115.3, -115.2, -114.5, -114.8, -115.5, 
-116.5, -117.5, -118.5, -119, -120, -121, -122, -123, -124, -124.2, 
-124.8, -125.3, -126, -127, -128, -128.5, -129, -130, -130, -129.5, 
-130.5, -131.5, -132.5, -133.5, -134, -134.5, -135.5, -136, -137, 
-138, -139, -140, -141, -142, -143, -144, -145, -146, -147, -148, 
-149, -150, -151, -152, -152, -153.5, -154.5, -155, -156, -157, 
-158, -158.5, -159.5, -160.5, -161.5, -162.5, -163.3, -164, -165, 
-166, -166.4, -166.4, -165.5, -164.5, -163.7, -163, -162, -161.8, 
-161, -160.3, -160.5, -161.5, -161.5, -162, -163, -163.5, -163.8, 
-164.5, -165.5, -165.8, -166.8, -167.5, -167.5, -166.5, -166.5, 
-166, -165, -164, -163, -162.4, -161.5, -161, -161, -161, -161.8, 
-162.5, -163.5, -164.3, -165, -165.5, -165.8, -166.2, -165.8, 
-165.3, -165.4, -164.5, -163.7, -162.8, -162.3, -161.7, -161.8, 
-161.7, -161, -160.3, -159.7, -159, -158.8, -158.3, -157.5, -157.5, 
-157.7, -158.5, -158.8, -159, -160, -160.8, -161.5, -162.5, -163, 
-164, -165, -164.6, -164, -163.3, -163.2, -162.2, -161.6, -161.5, 
-160.5, -159.7, -159.4, -158.5, -158.3, -158.4, -157.8, -157, 
-156.4, -156.4, -155.5, -154.5, -154, -153.3, -153.7, -154, -153, 
-152.3, -151.5, -150.7, -150, -150.1, -151, -151.3, -151.9, -151.3, 
-151.8, -151, -150, -149.3, -148.5, -148, -147.7, -147.3, -146.7, 
-146.5, -145.7, -144.9, -144.5, -143.5, -142.5, -141.5, -141, 
-140, -139.8, -139, -138, -137, -136.2, -135.9, -136.6, -136.1, 
-135.7, -135, -134.7, -134.5, -133.8, -133.7, -133.1, -134, -134.4, 
-134.1, -133.3, -133.6, -133.8, -133.4, -133.2, -133.1, -132.9, 
-132.6, -132, -132, -132.7, -132.9, -132.6, -132, -131.9, -131.8, 
-131.4, -131, NA, 136.5, 137, 137.7, 138.2, 138.5, 139, 139.5, 
140.2, 140.6, 141.5, 142.2, 143, 144, 145, 146, 146.3, 146.6, 
147.5, 147.8, 148.5, 149, 148.8, 149.2, 150, 150.5, 151, 151.5, 
151.8, 152, 151.2, 151.7, 152.3, 153.2, 153.6, 154.3, 154.8, 
155.2, 154.5, 154.2, 155, 156, 156.8, 157.5, 158.5, 159.5, 160, 
160, 159.9, 159.8, 160.1, 161, 162, 162.8, 163.2, 163, 163.2, 
163.7, 164.7, 165.2, 164.3, 164, 163.7, 163.9, 163.5, 163.5, 
162.5, 161.8, 161.4, 160.7, 160.3, 159.8, 159, 158.5, 157.7, 
157.3, 157, 156.5, 156.8, 155.6, 155.7, 156, 156.4, 156.5, 157, 
158, 158.4, 158.5, 159.5, 159.8, 160, 161, 161.2, 162.2, 161.7, 
162.5, 163.3, 163.1, 162.8, 163.3, 162.5, 162.1, 162.4, 163.3, 
163.7, 164.5, 165.1, 165.5, 166.3, 166, 166.5, 167.5, 168.5, 
169.5, 170.4, 170.5, 171.5, 172.2, 173, 173.8, 174.5, 175, 176, 
177, 178, 179, 179.5, 179.3, 179, 178.6, 178.3, 177.7, 177.5, 
179, 180, 179, 177, 175, 173, 171, 170.3, 170.8, 169.6, 168.3, 
169.2, 168.4, 167.1, 166, 164, 163, 161.5, 160, 160.1, 159, 157, 
155, 153, 152.4, 151, 149.8, 150.2, 149, 147, 145, 143, 140.8, 
140.3, 139.2, 140.2, 138.9, 137, 135.5, 133.4, 132.9, 131, 129.7, 
128.6, 129.2, 128, 126, 124, 123.5, 122, 120, 118.4, 118.9, 117, 
115, 113.7, 112.9, 111.5, 110.2, 110.3, 108, 107.5, 110, 112, 
113, 113.6, 112, 109, 108.4, 105.8, 104, 102, 102, 99, 99, 97, 
94, 92.7, 89, 87, 87.2, 85, 81, 80.6, 82.4, 81.8, 79, 77.5, 77.4, 
76.3, 78.6, 75.3, 75.5, 75, 73.8, 73.1, 74, 73.7, 73.8, 75, 74.5, 
74, 72.5, 72.5, 73.5, 72.6, 72.6, 72, 72.5, 72.9, 71, 69.3, 69, 
68, 66.7, 67.3, 66.8, 68, 68.6, 68, 67, 65, 63, 61, 60.7, 60, 
58, 56, 53.8, 53.8, 52, 50, 48, 46.3, 46.4, 45, 44, 44.3, 44, 
44.6, 44, 42.2, 40, 40, 39, 37, 37, 37.7, 36, 35, 34.8, 33.4, 
35, 37, 39, 41, 41, 39, 37, 35, 34, 32.2, 33, 31.5, 30, 30, 28, 
27, 25, 23, 21, 19, 17, 17.2, 16, 15, 13.3, 12.4, 11.1, 9.8, 
8, 6, 5.1, 5.2, 5.3, 5.6, 5.3, 5.6, 6, 7.5, 8.5, 9.7, 10.5, 11.3, 
12, 12.8, 12.5, 13, 14, 14.2, 15, 16.2, 16.6, 16.8, 18, 18.4, 
19.1, 18, 17.2, 17.2, 17.5, 18.4, 19.5, 20.5, 21.5, 21.4, 22.5, 
24.5, 25.3, 24.7, 23.4, 22.6, 21.6, 21.2, 21.5, 21.5, 22.5, 23.4, 
25, 27, 28.5, 29, 29.6, 29.2, 28.4, 28, 27, 25, 23.4, 23.7, 24.5, 
24.5, 23.8, 23, 21.6, 21.2, 21.2, 21.3, 21.1, 20.9, 20.5, 20, 
20.2, 20.2, 19.8, 19.5, 19.3, 18.8, 18.5, 18.2, 17.8, 17.3, 16.7, 
16.4, 15.9, 15.3, 14.8, 14.2, 13.9, 13.5, 13, 12.5, 12.1, 11.6, 
11.3, 10.9, 11.1, 10.9, 10.5, 10.3, 9.9, 10, 9.6, 9.8, 10.1, 
10.3, 10.7, 10.9, 10.3, 10.5, 9.5, 8.4, 8.2, 8.4, 8.7, 8.9, 8.9, 
8.7, 8.9, 9, 9, 8.5, 8.4, 8.2, 8, 7.6, 7.2, 6.8, 6.2, 5.7, 5.5, 
5.7, 6, 5.7, 5.3, 5, 5.3, 5, 4.7, 4.4, 4.1, 4.4, 4.3, 3.8, 3.3, 
2.8, 2.5, 2.1, 1.9, 1.6, 1.5, 1, 0.5, 0, 0.5, 0.1, -0.3, -0.8, 
-1.2, -1.3, -1.7, -1.8, -1.6, -1.6, -1.4, -1.8, -2, -2.5, -2.8, 
-3.2, -3.5, -4, -4.2, -4.7, -4.8, -4.4, -4.6, -4.5, -4.3, -3.8, 
-3.2, -2.6, -2.5, -2.2, -2, -2, -1.5, -1.2, -1.1, -1.2, -0.8, 
-0.7, -0.6, -1, -1.1, -1.2, -1.3, -1.3, -1.4, -1.5, -1.8, -2.2, 
-2.6, -3, -3.5, -4, -4.4, -4.8, -5.3, -5.7, -6, -6.5, -6.9, -7.3, 
-7.6, -8, -8.3, -8.5, -9, -9.2, -9.2, -9.1, -9, -8.8, -8.8, -8.9, 
-8.9, -8.8, -8.7, -8.8, -8.9, -9.1, -9.3, -9.5, -9.3, -9.2, -8.9, 
-8.7, -8.8, -8.8, -8.9, -8.8, -8.4, -8, -7.9, -7.6, -7.2, -6.7, 
-6.5, -6.5, -6.2, -5.8, -5.4, -5.3, -4.9, -4.5, -4.2, -3.8, -3.4, 
-3, -2.6, -2.3, -2, -1.8, -1.4, -1, -0.8, -0.8, -0.6, -0.4, 0, 
0, -0.2, -0.3, 0, 0.3, 0.6, 0.7, 1.2, 1.6, 2, 2.2, 2.7, 3.2, 
3.2, 3.2, 3.1, 3.1, 3.3, 3.7, 4.1, 4.5, 4.6, 4.8, 5.2, 5.3, 5.8, 
6.3, 6.6, 7.2, 7.6, 8, 8.4, 8.7, 9.1, 9.5, 10, 10.2, 10.3, 10.5, 
10.6, 11, 11.4, 11.8, 12.2, 12.7, 12.8, 13.1, 13.4, 13.8, 14.1, 
14.2, 14.2, 14.6, 14.9, 14.9, 15.3, 15.6, 15.8, 16, 16.1, 16.2, 
15.9, 15.9, 15.8, 15.7, 16.1, 16.2, 16.5, 16.5, 16.7, 17, 17.1, 
17.1, 16.8, 16.5, 16.6, 16.9, 17.2, 17.6, 18, 18.1, 18.4, 18.4, 
18, 17.6, 17.2, 16.8, 16.3, 15.9, 16.2, 16, 15.6, 15.3, 15, 14.8, 
14.4, 14, 13.9, 13.6, 13.3, 13, 12.6, 12.2, 12.2, 12.5, 12.2, 
12.4, 12.8, 13.2, 13.7, 13.6, 13.6, 13.8, 13.9, 14.1, 14.3, 14.7, 
14.9, 14.9, 15.1, 15.1, 15.3, 15.7, 16, 16.4, 16.8, 17.2, 17.5, 
17.4, 17, 17.4, 17.9, 18.3, 18.8, 19, 19.2, 19.5, 19.4, 19.4, 
19.3, 19.4, 19.5, 19.9, 20, 20.1, 20.3, 20.6, 21, 21, 20.7, 20.6, 
20.7, 20.9, 21.1, 21.4, 21.7, 22.2, 22.4, 22.8, 23.2, 22.9, 22.7, 
22.2, 21.7, 21.3, 21.2, 21.3, 21.7, 21.6, 21.8, 21.9, 22.1, 22.4, 
22.5, 22.8, 22.9, 23.2, 23.1, 22.9, 22.7, 23.1, 23.1, 23.4, 23.3, 
23, 23.2, 23.5, 23.9, 24.1, 24, 24, 23.6, 23.3, 23.1, 22.8, 22.5, 
23, 22.9, 23.2, 23.3, 23, 22.8, 22.5, 22.6, 23, 23, 23.3, 23.6, 
23.6, 23.4, 23.7, 24, 23.7, 23.9, 24.3, 24, 23.9, 23.9, 24.2, 
24.5, 24.9, 25.1, 25.3, 25.7, 26, 26.3, 26.7, 26.7, 26.2, 26.3, 
26.7, 27.3, 27.4, 27.7, 28, 28.4, 28.6, 28.8, 29.2, 29.6, 29.7, 
29.3, 28.8, 29.1, 28.8, 28.4, 28, 27.8, 27.8, 27.3, 26.8, 26.4, 
26.2, 26.1, 26.5, 26.9, 26.6, 26.9, 26.8, 27, 26.9, 27.2, 26.7, 
26.5, 26.3, 26.6, 26.9, 27.2, 27, 27.2, 27.2, 27.4, 27.8, 28.2, 
28, 27.6, 27.6, 28, 28.4, 28.8, 29, 29.3, 29.8, 30.2, 30.5, 30.5, 
30.5, 30.9, 31.3, 31.8, 32.2, 32.5, 32.8, 33.2, 33.7, 34, 34.3, 
34.8, 35.3, 35.7, 36, 36.2, 35.8, 36, 35.7, 35.9, 35.8, 35.9, 
35.6, 35.6, 35.4, 35.1, 35, 34.8, 34.7, 34.5, 34.3, 34, 33.6, 
33.2, 32.8, 32.4, 32, 31.8, 31.8, 31.3, 30.8, 30.4, 30.1, 29.8, 
29.5, 29.1, 28.7, 28.5, 28.1, 27.9, 27.5, 27.2, 26.8, 26.3, 25.8, 
25.4, 25.2, 25, 24.6, 24.2, 23.8, 23.4, 23.1, 22.8, 22.4, 22, 
21.6, 21.3, 20.8, 20.3, 20, 19.9, 19.9, 20.1, 20.1, 19.8, 19.4, 
19, 18.6, 18.3, 18, 17.7, 17.4, 17, 16.6, 16.2, 15.8, 15.5, 15.4, 
15.3, 15, 14.6, 14.2, 13.8, 13.4, 13.2, 12.7, 12.3, 12, 11.6, 
11.4, 11.1, 11, 10.7, 10.5, 10.1, 10.2, 10.6, 10.9, 11, 11, 11.1, 
10.6, 10.5, 10.7, 11.1, 11, 10.7, 10.6, 10.4, 10.2, 10, 9.5, 
9, 8.7, 8.3, 8, 7.8, 7.5, 7.2, 6.9, 6.7, 6.3, 6, 5.5, 5.2, 4.8, 
4.5, 4, 3.6, 3.3, 3, 2.7, 2.5, 2, 1.5, 1, 0.5, 0.1, -0.1, -0.3, 
-0.6, -1, -1.3, -1.7, -2.2, -2.6, -3, -3.5, -4, -4.4, -4.8, -5.2, 
-5.4, -5.8, -6, -6.2, -6.3, -6.4, -6.6, -6.8, -7, -7.4, -7.9, 
-8.3, -8.6, -8.9, -9.2, -9.3, -9.4, -9.7, -9.8, -9.8, -9.7, -9.6, 
-9.8, -10.2, -10.5, -11, -11.3, -11.8, -12.1, -12.7, -13.1, -13.3, 
-13.5, -13.8, -14.2, -14.5, -14.7, -14.8, -14.9, -15.2, -15.5, 
-15.8, -16.1, -15.8, -15.9, -16.1, -16.2, -16.3, -16.5, -16.8, 
-17, -17, -17.1, -17.1, -16.9, -16.7, -16.5, -16.3, -16.2, -16.3, 
-16.5, -16.2, -16.2, -16.1, -16.1, -16.2, -16.4, -16.5, -16.5, 
-16.8, -17.1, -17.5, -17, -16.8, -16.7, -16.5, -16.3, -16.5, 
-16.8, -16.7, -16.8, -16.6, -16.4, -16.4, -16, -15.6, -15.3, 
-15.2, -15.5, -15.3, -15.2, -15.1, -14.9, -14.8, -14.6, -14.3, 
-14, -13.8, -13.7, -13.7, -13.5, -13.3, -13.2, -13.3, -13, -13.1, 
-13.3, -13, -12.9, -12.5, -12.3, -11.8, -11.5, -11.1, -10.8, 
-10.5, -10.2, -10, -9.6, -9.3, -8.8, -8.4, -8, -7.6, -7.4, -7, 
-6.6, -6.2, -5.8, -5.4, -5, -4.5, -4, -3.7, -3.4, -2.7, -2.3, 
-1.9, -1.6, -1.3, -1, -0.6, -0.4, 0, 0.4, 0.9, 1.1, 1.4, 1.6, 
2.2, 3, 3.5, 4, 4.5, 4.8, 5, 5.2, 5.4, 5.5, 5.7, 6, 6.5, 7, 7.3, 
7.7, 8.1, 8.3, 8.2, 8.4, 8.6, 8.9, 9, 9.1, 9.3, 9.7, 9.6, 9.9, 
9.9, 9.8, 9.8, 9.6, 9.5, 9.4, 9.6, 9.6, 9.5, 9.3, 9.5, 9.9, 9.5, 
9.4, 9.3, 9.3, 9.2, 9, 8.7, 8.8, 9, 9.2, 9.5, 9.8, 10.2, 10.4, 
10.7, 11, 11.2, 11.5, 11.8, 12, 12.2, 12.3, 12.6, 12.9, 12.9, 
12.6, 12.3, 12.5, 12.8, 12.9, 13, 13.1, 13.3, 13.5, 13.1, 13.1, 
13.3, 13.4, 13.6, 13.7, 13.9, 13.8, 13.8, 13.6, 13.4, 13, 13, 
12.7, 12.6, 12.4, 12.3, 12.2, 12.1, 11.9, 11.8, 11.9, 11.9, 11.8, 
11.8, 11.8, 11.8, 12, 12.4, 12.7, 12.9, 13.1, 13.3, 13.5, 13.8, 
14, 14.3, 14.5, 14.4, 14.5, 14.5, 14.5, 14.6, 14.7, 14.9, 14.8, 
14.8, 15, 15, 15.2, 15.1, 15.2, 15.5, 15.7, 16, 16.4, 16.7, 16.9, 
17.1, 17.3, 17.5, 17.7, 18, 18.2, 18.3, 18.3, 18, 17.9, 18.2, 
18.3, 18.5, 18.4, 18.4, 18.6, 18.9, 19.1, 19.4, 19.6, 20, 20.2, 
20.6, 20.9, 21.3, 21.7, 22, 22.2, 22.6, 23, 23.4, 23.7, 24.2, 
24.7, 25, 25.2, 25.6, 25.7, 25.9, 26.2, 26.6, 27, 27.4, 28, 28.4, 
29, 29.4, 30, 30.3, 30.6, 31, 31.2, 31.5, 31.8, 32.1, 32.5, 32.6, 
32.7, 32.9, 32.9, 32.9, 33, 32.8, 32.6, 32.7, 33, 33.4, 34.1, 
34.6, 35.1, 35.4, 35.5, 35.4, 35.3, 35.4, 35.6, 35.5, 35.5, 35.3, 
35.3, 35.2, 35.1, 34.9, 34.9, 34.7, 34.8, 35, 35.5, 35.8, 36.1, 
36.3, 36.6, 36.9, 37.2, 37.7, 38, 38.6, 39.1, 39.5, 39.8, 39.8, 
40.1, 40.3, 40.6, 40.6, 40.7, 40.8, 40.8, 40.7, 40.7, 40.6, 40.6, 
40.5, 40.6, 40.5, 40.5, 40.5, 40.4, 40.6, 40.7, 40.3, 39.9, 39.8, 
39.6, 39.6, 39.5, 39.4, 39.3, 39.4, 39.1, 39.2, 39.4, 39.4, 39.4, 
39.6, 39.6, 39.3, 38.9, 38.8, 38.8, 39, 39.2, 39.3, 39.4, 39.6, 
39.8, 39.9, 40, 40.2, 40.2, 40.4, 40.6, 40.8, 41, 40.9, 41, 41.4, 
41.6, 41.8, 42, 42.2, 42.5, 42.8, 43.1, 43.5, 43.9, 44.3, 44.5, 
44.8, 45.1, 45.5, 46, 46.3, 46.6, 46.9, 47.2, 47.4, 47.7, 48, 
48.1, 48.3, 48.5, 48.8, 49.1, 49.2, 49.4, 49.6, 49.8, 50, 50.2, 
50.3, 50.5, 50.8, 50.8, 50.9, 51.1, 51.4, 51.2, 51.2, 51.2, 51.3, 
51.2, 50.9, 50.8, 50.6, 50.4, 49.8, 49.5, 49, 48.5, 48.3, 47.9, 
47.5, 47.1, 46.8, 46.5, 46.3, 45.9, 45.6, 45.3, 45, 44.6, 44.4, 
44, 43.7, 43.5, 43.2, 43, 42.6, 42.7, 43, 43.4, 43.3, 43.1, 43, 
42.7, 42.6, 42.4, 42.2, 41.8, 41.5, 41.3, 41, 40.8, 40.5, 40.2, 
40.1, 39.9, 39.8, 39.6, 39.4, 39.4, 39.3, 39.2, 39.1, 38.9, 38.7, 
38.5, 38.2, 38, 37.7, 37.4, 37.3, 37.3, 37.2, 37.2, 37.1, 37.2, 
37.3, 37, 36.8, 36.7, 36.3, 36, 35.8, 35.7, 35.5, 35.5, 35.6, 
35.4, 35.2, 34.9, 34.7, 34.4, 34.2, 34, 34, 33.8, 33.6, 33.5, 
33.3, 33, 32.8, 32.7, 32.6, 32.4, 32.9, 32.7, 32.8, 33, 33.2, 
33.2, 33.6, 33.9, 34.2, 34.4, 34.3, 34.6, 34.7, 34.8, 35, 34.8, 
34.7, 34.7, 35, 35.3, 35.8, 36, 36.2, 36.5, 36.6, 36.8, 37, 37.1, 
37.2, 37.1, 37.3, 37.8, 38.1, 38.5, 38.8, 38.8, 39.1, 39, 39, 
39.1, 39.1, 39.3, 39.6, 39.9, 40.3, 40.4, 40.6, 40.7, 40.9, 41.2, 
41.2, 41.3, 41.5, 41.7, 42.1, 42.2, 42.5, 42.7, 42.8, 42.8, 42.7, 
42.6, 42.7, 42.8, 42.9, 43.1, 43.2, 43.3, 43.3, 43.4, 43.7, 44.2, 
44.6, 45.1, 45.4, 45.5, 45.9, 46.5, 46.9, 47.5, 47.8, 48.1, 48.3, 
48.8, 49, 49.7, 50.3, 50.8, 51.3, 51.9, 52.3, 52.2, 52.5, 53, 
53.5, 53.8, 54.1, 54.5, 54.7, 55, 55.2, 55.3, 55.3, 55.8, 56.2, 
56.5, 56.6, 56.8, 57.3, 57.7, 57.8, 57.7, 57.8, 58, 58.3, 58.5, 
58.7, 59, 59.4, 59.6, 59.8, 59.8, 59.3, 59.2, 59, 58.8, 58.4, 
57.8, 57.1, 56.8, 56.4, 56.3, 56.3, 56.2, 56.4, 56.5, 56.3, 56.1, 
55.8, 55.3, 54.8, 54.6, 54.3, 53.9, 53.6, 53.3, 52.8, 52.6, 52.2, 
51.9, 51.8, 51.5, 51.4, 51.4, 51.6, 51.5, 51.6, 51.4, 51.2, 50.9, 
50.8, 50.8, 50.9, 50.7, 50.6, 50.3, 50.1, 50, 50.2, 50, 49.8, 
49.6, 49.2, 49.2, 49, 48.8, 48.7, 48.3, 48.2, 48.1, 47.9, 47.9, 
48, 48.2, 48.6, 48.9, 48.8, 49.2, 49.5, 49.8, 50.2, 50.3, 50.6, 
50.6, 50.8, 50.8, 51, 51.2, 51.4, 51.7, 52.2, 52.7, 52.8, 53.3, 
53.5, 54, 54.4, 54.6, 55, 55.5, 55.7, 56.2, 56.6, 56.9, 57.1, 
57.2, 57.3, 57.7, 58.1, 58.5, 59, 59.4, 59.8, 60.2, 60.4, 60.6, 
61, 61.4, 61.6, 61.7, 62, 62.3, 62.7, 63.2, 63.5, 64, 64.1, 64.2, 
64.4, 64.6, 64.7, 65.2, 65.7, 65.9, 66.4, 66.8, 66.7, 67.2, 67.4, 
67.5, 67.5, 67.4, 67.5, 67.9, 68.2, 68.5, 68.5, 68.9, 69.2, 69.5, 
69.8, 70.1, 70.3, 70, 69.8, 69.2, 69, 68.9, 69.2, 69.5, 69.8, 
70, 70.4, 70.8, 71.2, 71.6, 71.9, 72.1, 72.2, 72.2, 72.3, 72.4, 
72.8, 72.5, 72.5, 72.5, 72.9, 72.6, 72.6, 72.7, 72.8, 72.9, 72.7, 
72.7, 72.7, 72.8, 72.9, 72.9, 72.8, 72.9, 73.1, 73.2, 73.3, 73.3, 
73.4, 73.5, 73.7, 73.9, 73.9, 74.1, 74.3, 74.4, 74.6, 74.7, 74.8, 
74.8, 75, 75.2, 75.3, 75.5, 75.7, 75.8, 76, 76.3, 76.3, 76.4, 
76.7, 76.9, 77.3, 77.7, 78.1, 78.2, 78.5, 78.9, 79.3, 79.3, 78.8, 
79, 79.3, 79.2, 79.5, 79.8, 79.8, 79.8, 79.7, 79.8, 79.9, 80.1, 
80.2, 80.2, 80.3, 80.2, 80.2, 80.1, 80.1, 80.2, 80.5, 80.8, 81, 
81.2, 81.3, 81.8, 82.2, 82.3, 82.3, 82.5, 83, 83.4, 83.8, 84.2, 
84.6, 84.8, 85.3, 85.9, 86.4, 86.6, 86.7, 86.9, 86.9, 86.8, 87.1, 
87.6, 88, 88, 88, 88.2, 88.3, 88.3, 88.7, 89.1, 89.5, 89.8, 89.9, 
90.2, 90.3, 90.3, 90.5, 90.7, 91.2, 91.5, 91.7, 91.9, 91.8, 92, 
92, 92.2, 92.5, 92.7, 92.8, 92.9, 93.2, 93.1, 93.4, 93.7, 93.9, 
94, 94, 94.3, 94.5, 94.6, 94.4, 94.4, 94.2, 94.2, 94.5, 94.7, 
94.7, 94.7, 95.1, 95.5, 95.7, 95.9, 96.2, 96.5, 96.8, 96.9, 96.9, 
97.1, 97.2, 97.3, 97.6, 97.5, 97.7, 97.7, 97.8, 97.9, 97.9, 97.9, 
98.1, 98.1, 98.2, 98.3, 98.4, 98.5, 98.6, 98.5, 98.6, 98.8, 98.7, 
98.7, 98.6, 98.5, 98.5, 98.7, 98.6, 98.5, 98.3, 98.3, 98.2, 98.2, 
98.3, 98.5, 98.7, 98.9, 99.1, 99, 99.2, 99.3, 99.5, 99.7, 99.7, 
100, 100.2, 100.3, 100.4, 100.3, 100.3, 100.6, 100.6, 100.6, 
100.7, 100.9, 101.1, 101.3, 101.3, 101.6, 102, 102.3, 102.7, 
103, 103.4, 103.7, 104, 104.1, 104.3, 104.2, 104, 103.9, 103.8, 
103.5, 103.4, 103.5, 103.4, 103.5, 103.4, 103.3, 103, 102.7, 
102.5, 102.3, 101.8, 101.6, 101.2, 100.9, 100.7, 100.5, 100.4, 
100.3, 100.2, 100, 99.9, 99.9, 99.7, 99.3, 99.3, 99.1, 99.2, 
99.3, 99.4, 99.6, 99.7, 99.8, 100, 99.9, 100.1, 99.9, 100.3, 
100.6, 101, 100.9, 100.9, 101, 101.5, 102, 102.3, 102.3, 102.6, 
102.7, 102.8, 103, 103.1, 103.1, 103.4, 103.5, 103.7, 103.5, 
103.6, 103.8, 104.3, 104.5, 104.7, 105, 105.1, 104.8, 104.8, 
104.8, 104.9, 104.7, 105.1, 105.3, 105.7, 106, 106.2, 106, 106, 
106.4, 106.4, 106.5, 106.8, 106.8, 107.1, 107.8, 108.1, 108.4, 
108.7, 109, 109.1, 109.3, 109.3, 109.2, 109.5, 109.3, 109.3, 
109.3, 109.2, 109.1, 108.9, 108.9, 108.6, 108.3, 108.2, 107.9, 
107.4, 107.2, 106.7, 106.5, 106.6, 106.4, 106.1, 105.7, 105.6, 
105.8, 105.9, 106.2, 106.5, 106.6, 106.6, 106.6, 107, 107.2, 
107.2, 107.3, 107.6, 108, 108.3, 108.5, 108.5, 108.7, 109, 109.2, 
109.5, 109.6, 109.9, 109.8, 109.7, 109.8, 110, 109.9, 110.2, 
110.5, 110.3, 110.2, 110.3, 110.8, 111.2, 111.8, 112.1, 112.2, 
112.5, 112.9, 113, 113.2, 113.3, 113.5, 113.5, 113.6, 113.9, 
114, 114.2, 114.2, 114.5, 114.6, 114.8, 115, 115.4, 115.4, 115.6, 
115.8, 116.3, 116.5, 116.7, 116.9, 117.1, 117.5, 117.8, 118.1, 
117.9, 118, 118.2, 118.6, 118.7, 118.9, 118.9, 119.2, 119.2, 
119.5, 119.5, 119.6, 119.5, 119.6, 119.7, 119.6, 119.9, 120.2, 
120.3, 120.6, 120.7, 120.7, 121, 121.2, 121.4, 121.6, 121.5, 
121.7, 121.8, 121.7, 121.6, 121.9, 121.9, 121.9, 121.8, 121.5, 
121.7, 121.8, 122, 121.9, 121.5, 121, 120.6, 120.3, 120.2, 120.6, 
120.9, 121.3, 121.7, 121.9, 121.7, 121.3, 120.9, 120.8, 120.3, 
120.5, 120.9, 121.2, 121.6, 121.8, 121.5, 121.4, 121, 120.9, 
120.8, 120.6, 120.5, 120.4, 120, 119.7, 119.3, 119.4, 119.6, 
119.9, 120.1, 120.1, 120.3, 120.6, 120.9, 121.2, 121.8, 122.1, 
122.5, 122.6, 122.4, 122.2, 121.9, 121.5, 121.1, 121, 120.7, 
120.3, 119.9, 119.8, 119.5, 119.1, 118.9, 119, 118.7, 118.5, 
118.1, 117.8, 117.6, 117.7, 118, 118.2, 118.5, 118.9, 119.3, 
119.3, 119.5, 119.9, 120.3, 120.5, 120.9, 121.2, 121.5, 121.8, 
122, 122.2, 122.2, 121.8, 121.5, 121.5, 121.5, 121.9, 121.7, 
121.3, 121.1, 121.5, 121.9, 122.1, 122.4, 122.6, 123, 123.2, 
123.6, 124, 124.4, 124.6, 125, 125.3, 125.4, 125.4, 125.1, 125, 
124.9, 125, 124.7, 125, 125.1, 125.2, 125.6, 125.6, 125.9, 126.1, 
126.4, 126.4, 126.7, 126.9, 126.5, 126.2, 126.3, 126.5, 126.7, 
126.8, 126.5, 126.5, 126.3, 126.3, 126.4, 126.6, 126.7, 127.2, 
127.3, 127.3, 127.4, 127.6, 127.6, 128.1, 128.2, 128.3, 128.4, 
128.8, 129.1, 129.3, 129.4, 129.5, 129.4, 129.4, 129.4, 129.4, 
129.4, 129.2, 129, 128.7, 128.3, 128, 127.9, 127.5, 127.5, 127.5, 
127.7, 128, 128.2, 128.4, 128.7, 129.1, 129.3, 129.8, 129.8, 
129.7, 129.8, 130, 130.1, 130.5, 130.9, 131, 131.2, 131.5, 131.7, 
132, 132, 132.3, 132.3, 132.4, 132.8, 133, 133.2, 133.5, 133.9, 
134.3, 134.7, 135.2, 135.6, 135.7, 136, 136.3, 136.7, 136.8, 
137.2, 137.8, 138, 138.2, 138.5, 138.6, 139, 139.3, 139.6, 139.7, 
140, 140.2, 140.4, 140.4, 140.4, 140.5, 140.6, 140.6, 140.6, 
140.5, 140.7, 140.8, 140.9, 141, 141.2, 141.4, 141.3, 141.4, 
141.1, 141.2, 141, 140.7, 140.3, 140.6, 140.9, 141.1, 141.2, 
141.3, 141.2, 140.9, 140.6, 140.3, 140, 139.7, 139, 138.8, 138.7, 
138.3, 138.6, 138.3, 137.7, 137.2, 137.5, 137.9, 137.5, 137.6, 
137.6, 137.2, 137.2, 136.9, 136.9, 136.9, 136.9, 136.5, 136, 
135.7, 135.3, 135.5, 135.8, 136.2, 136.5, NA, -179, -179.3, -179.7, 
-178.8, -178.6, -176.7, -175.9, -174.5, -173.1, -172.3, -172.9, 
-172.3, -172.6, -171, -170.5, -170.9, -172, -174, -174.3, -175, 
-177, -179, NA, 30, 29.6, 29.2, 28.8, 28.3, 28.1, 28, 27.8, 27.7, 
27.9, 28, 28.3, 28.6, 28.7, 28.8, 29, 29.4, 29.7, 29.7, 29.8, 
30.2, 30.5, 30.8, 31, 31.2, 31.6, 32, 32.4, 32.2, 31.8, 31.7, 
31.8, 32.3, 32.7, 33.1, 33.5, 33.6, 33.4, 32.8, 32.5, 32.9, 33.3, 
33.6, 33.5, 33.4, 33.7, 34.2, 34.6, 34.8, 35.1, 35.4, 35.6, 35.8, 
36.2, 36.6, 37, 37.3, 37.7, 38, 38.5, 38.9, 39.1, 39.4, 39.7, 
40, 40.3, 40.7, 40.9, 41.1, 41.5, 41.7, 41.8, 41.8, 41.5, 41, 
40.7, 40.3, 40, 39.7, 39.3, 38.6, 38.2, 37.9, 37.7, 37.4, 37, 
36.6, 36.3, 36.1, 35.8, 35.4, 35.1, 34.9, 34.5, 34, 33.6, 33.3, 
33, 32.7, 32, 31.6, 31.4, 31, 30.6, 30.3, 30, NA, 140.3, 140, 
139.9, 140, 139.9, 139.6, 139.5, 138.6, 138.2, 137.4, 137.2, 
137, 136.9, 137.4, 136.8, 136.7, 136, 135.5, 134.9, 134, 133.4, 
132.7, 132.1, 131.4, 130.9, 130.5, 130.3, 130, 129.7, 130.2, 
130.4, 130.1, 130.5, 130.7, 130.2, 130.4, 130.6, 130.7, 130.7, 
130.7, 131, 131.3, 131.6, 131.9, 131.5, 131.6, 131.1, 131.3, 
131.4, 132.1, 132.2, 132.5, 133.6, 134.5, 135.3, 135.1, 135.4, 
136.2, 136.9, 136.5, 136.9, 137, 137.3, 137.5, 138.2, 138.7, 
138.8, 139, 139.1, 139.6, 139.8, 139.9, 140.1, 139.9, 140.4, 
140.7, 140.5, 140.8, 141.1, 140.9, 141.4, 141.5, 142, 141.6, 
141.4, 141.5, 140.9, 141.3, 141.2, 140.9, 140.7, 140.5, 140.3, 
NA, 134.7, 134.2, 133.6, 133.2, 132.8, 132.3, 132.4, 132.5, 132.7, 
133, 133.3, 134.2, 134.7, NA, 122, 121.4, 120.9, 120.3, 120.4, 
120.1, 120.1, 120.4, 120.7, 120.9, 121.3, 121.6, 121.8, 122, 
122, NA, 122.3, 122, 121.4, 120.9, 120.5, 120.4, 120.5, 120.4, 
120.5, 119.9, 119.7, 119.8, 119.9, 120.1, 120.6, 120.8, 120.6, 
120.9, 121, 121.4, 121.8, 122.3, 122.5, 122.7, 122.7, 122.4, 
122.8, 123.4, 123.8, 124, 123.8, 124.1, 123.9, 123.8, 123.5, 
124, 123.4, 123.2, 123, 122.8, 122.2, 122.3, 121.7, 121.6, 121.5, 
121.6, 121.5, 122.2, 122.4, 122.4, 122.3, 122.2, 122.3, NA, 125.5, 
125.5, 125.2, 125.1, 124.7, 124.4, 124.2, 123.7, 123.7, 123.3, 
123, 122.3, 122.1, 121.9, 122.3, 122.8, 123, 123.4, 123.7, 124.2, 
124, 124.6, 125.1, 125.3, 125.2, 125.7, 125.5, 125.4, 125.7, 
126, 126.3, 126.6, 126.4, 126.1, 126.3, 126.2, 126, 125.5, NA, 
110.7, 110, 109.5, 109.2, 108.9, 108.6, 109.2, 109.7, 110.2, 
110.5, 111, 110.8, 110.7, NA, 117.1, 117, 116.7, 116.7, 116.2, 
115.9, 115.5, 115.5, 115.3, 115, 114, 113.7, 113.2, 112.5, 111.5, 
111.2, 111, 110.5, 109.7, 109.3, 109, 109, 108.9, 109.1, 109.2, 
109.3, 109.5, 109.4, 109.7, 109.9, 109.9, 110.1, 110.2, 110.6, 
111.4, 111.7, 111.8, 112.5, 113, 113.6, 114, 114.6, 115.2, 116, 
116.2, 116.5, 116.3, 116.5, 116.9, 117.6, 117.4, 117.5, 118.4, 
119, 118, 118.1, 117.6, 117.5, 117.8, 117.6, 118.5, 118.3, 118.4, 
118.8, 119.3, 118.2, 117.9, 118, 117.6, 117.5, 117.1, NA, 141.9, 
141.8, 141.7, 141.4, 141.2, 140.5, 140.5, 139.9, 140.1, 140.2, 
140.6, 141, 140.8, 140.4, 141, 141.7, 142.8, 143.3, 144.3, 145.2, 
146, 145.3, 145.1, 145.3, 144.9, 144.4, 143.6, 142.6, 141.9, 
NA, 130, 129.7, 129.4, 129.7, 129.3, 128.5, 128.1, 127.9, 127.4, 
127, 126.6, 126.3, 125.9, 125.2, 125.3, 124.7, 124.5, 124, 123.6, 
123.6, 123.3, 122.9, 122.2, 122.1, 122.2, 122.3, 121.7, 121.3, 
120.5, 119.7, 119, 118.3, 117.3, 116.8, 116.3, 115.4, 114.6, 
114.3, 114.1, 113.9, 113.6, 113.7, 113.4, 113.6, 114.2, 114, 
113.7, 113.7, 113.5, 113.5, 113.6, 113.3, 113.9, 114.1, 114.7, 
114.9, 115, 115.6, 115.7, 115.6, 115.3, 115, 115.4, 116.5, 117.5, 
118.4, 118.7, 119.2, 119.7, 120.5, 121.5, 122.1, 122.5, 123.1, 
124, 124.3, 125, 125.9, 127, 128.1, 129.3, 130.4, 131.1, 132.1, 
132.5, 133.4, 133.9, 134.3, 134.2, 134.8, 135.3, 135.1, 135.6, 
135.9, 135.8, 136.1, 136.3, 137.2, 137.8, 138, 137.8, 137.5, 
137.4, 136.8, 137.7, 138.1, 138.5, 138.4, 138.5, 139.1, 139.7, 
139.7, 140.2, 141, 141.6, 142.1, 142.9, 143.5, 144.4, 144.9, 
145.4, 145.9, 146.3, 146.5, 147.4, 148.4, 149.5, 150, 149.9, 
150.1, 150.5, 150.9, 151.3, 151.7, 152.4, 152.8, 153, 153, 153.3, 
153.6, 153.5, 153.5, 153.4, 153.1, 153.1, 153.1, 153.2, 153.3, 
153.3, 153.2, 153, 152.9, 152.5, 152, 151.5, 151, 150.8, 150.7, 
150.7, 150, 150, 149.6, 149.4, 149, 148.6, 148.8, 148.5, 147.9, 
147.8, 147.7, 147.5, 147, 146.5, 146.4, 146.1, 146, 145.5, 145.4, 
145.4, 144.9, 144.5, 144.1, 143.6, 143.6, 143.5, 143.4, 143.2, 
142.9, 142.7, 142.4, 142.1, 142, 141.7, 141.8, 141.7, 141.5, 
141.5, 141.5, 141.3, 140.9, 140, 139.3, 139, 138.3, 137.7, 136.6, 
135.9, 135.3, 135, 135.5, 136, 136, 136, 136.4, 136.5, 136.9, 
136.7, 136.5, 136.4, 136, 135.7, 135.8, 135.1, 134.5, 133.8, 
133.2, 132.8, 132.4, 132.1, 132.6, 132, 131.3, 131, 130.8, 130.6, 
130.7, 130.4, 130.2, 130.3, 130, NA, -80, -80.2, -80.2, -79.9, 
-79.5, -79.2, -79.7, -80, NA, -83, -83.2, -83.5, -83.7, -83.4, 
-83.1, -82.6, -82.3, -81.9, -82.4, -83, NA, -83, -83.3, -84, 
-84.5, -85, -85, -84.6, -85.2, -85.5, -86, -86.2, -86.3, -86.4, 
-87, -87, -86.5, -85.9, -85.6, -85.3, -84.6, -84.5, -84, -83.6, 
-83.6, -83.3, -82.9, -82.8, -82.3, -82.3, -81.8, -80, -80.3, 
-80.4, -80.4, -80.8, -81.6, -81.5, -81.8, -82.3, -83, NA, -90, 
-89.9, -90, -89.4, -88.6, -88, -87.9, -87.3, -87.3, -88, -88.4, 
-89, -89.5, -89.3, -89.3, -88.8, -88.1, -87.9, -87.3, -87, -86.6, 
-86, -85.3, -85.3, -85, -84.8, -84, -83.4, -83, -82.7, -82.3, 
-81.9, -82, -82.8, -82.3, -81.6, -81, -81, -81.5, -81.4, -80.6, 
-80, -79.3, -78.8, -78.6, -78.9, -79.2, -79.5, -79.5, -78.9, 
-78.3, -77.6, -77.6, -76.8, -76.8, -76, -76, -76.6, -76.5, -76.4, 
-75.6, -75.2, -74.8, -74.9, -74.6, -74, -73.6, -73, -73, -72.8, 
-72.4, -72.4, -72.8, -72.6, -71.8, -71.3, -71.2, -70.5, -70, 
-69.5, -69.5, -70.3, -70.8, -71.1, -71.1, -71.7, -72.4, -72.8, 
-73.4, -74, -74.3, -74, -73.5, -73.4, -74.2, -74.8, -75.1, -75.4, 
-75.8, -76.2, -77, -77.3, -77.3, -77.6, -78.1, -78.2, -77.8, 
-77.3, -76.8, -76.7, -76, -75.7, -75.1, -74.5, -74.2, -74, -73.7, 
-73, -72.8, -72.6, -72.6, -72.1, -72, -71.5, -71.5, -72.1, -71.7, 
-71.2, -70.9, -70.2, -69.5, -69, -68.4, -67.6, -66.9, -66.3, 
-65.9, -66.1, -66.1, -66.2, -67, -67.5, -68.3, -68.9, -68.5, 
-67.7, -67.4, -66.6, -66.4, -65.8, -65.5, -65.2, -65.1, -64.9, 
-65.2, -64.8, -64.8, -65, -65, -65.2, -64.8, -64.5, -64.5, -64.5, 
-65.1, -65.1, -65.2, -65, -65, -65.2, -65.7, -66, -66.6, -66.6, 
-66.7, -66.8, -67.2, -67, -67.4, -67.3, -68, -67.8, -68.2, -68, 
-67.9, -67.2, -67.3, -67.8, -67.2, -67, -66.4, -66, -66, -65.4, 
-64.9, -65.3, -65.3, -64.7, -64.5, -63.8, -63.5, -63.5, -63.3, 
-62.5, -62.2, -62.6, -62, -62.4, -62.5, -62, -61.4, -61.3, -62, 
-62.5, -62.9, -63.2, -63.3, -63.2, -63.5, -64, -64.1, -64.7, 
-65.2, -65.1, -65.7, -66, -66.8, -67, -67.2, -67.6, -68.4, -68.8, 
-68.1, -68.9, -68.9, -68.1, -68, -67.8, -68.5, -68.5, -68.1, 
-67.5, -66.7, -66.7, -67.4, -68.2, -68.2, -67.6, -67, -67.2, 
-67.3, -68, -68.3, -68.5, -68.9, -68.9, -69, -69.7, -69.7, -68.9, 
-68.5, -68.6, -69.3, -70, -69.9, -70.4, -71.2, -70.5, -70.7, 
-71.2, -71.2, -71.3, -71.2, -71.8, -72.2, -72.8, -73.2, -73.7, 
-74, -74.6, -74.5, -74.3, -74.7, -75.2, -75.2, -75.5, -76.1, 
-76.6, -76.6, -77.4, -78.1, -78.7, -78.7, -79, -79.5, -80.2, 
-80.8, -80.6, -80.4, -80.7, -81, -81.3, -81.9, -82.7, -83.4, 
-84.2, -85.1, -85.1, -85.1, -85, -85.6, -85.7, -85.5, -84.8, 
-85.4, -85.4, -84.8, -84.9, -85.4, -86, -86.5, -86.5, -86.4, 
-85.6, -84.9, -85.7, -86.5, -87.3, -88.1, -89, -89.3, -89.7, 
-89.8, -90, NA, -66, -65, -65, -64.5, -64.3, -64.5, -65.5, -66.5, 
-67, -67.4, -66.5, -65.5, -64.7, -63.8, -63, -62, -61, -60.9, 
-61.7, -61, -60, -59, -58.5, -58.5, -59, -59.8, -59, -58, -57, 
-56.4, -55.4, -54.5, -54, -53.8, -53.5, -52.5, -51.5, -50.5, 
-50.5, -51.5, -51.9, -51, -50, -49, -48.4, -47.5, -46.8, -46, 
-45.5, -45.5, -46.4, -47, -48, -49, -48.5, -47.5, -46.5, -45.5, 
-44.5, -43.5, -42.5, -41.5, -40, -39, -38, -37, -36, -35, -34, 
-33, -32, -31, -30.5, -29.5, -28.5, -27.5, -26.5, -27, -28, -28, 
-27, -26, -25.5, -24.5, -23.5, -22.5, -22, -23, -24, -25, -26, 
-27, -28, -29, -30, -31, -31.5, -32.5, -33, -34, -33, -32, -31, 
-30, -29, -28, -27, -26, -26.5, -27.5, -27.5, -26.5, -25.5, -24.5, 
-23.5, -22.5, -22.5, -23.5, -24.5, -23.5, -23, -22, -21, -20.5, 
-19.5, -18.5, -18, -17, -16, -15, -14, -13, -12.2, -13, -14, 
-15, -14.8, -15.5, -16.5, -17.5, -18.5, -19.5, -19.5, -18.5, 
-18, -17, -16.2, -17, -18, -19, -20, -20.5, -19.5, -18.5, -17.5, 
-18.5, -19.5, -19.8, -19, -20, -20.2, -20.9, -21.5, -22, -21.5, 
-20.5, -19.5, -19, -19.5, -20.5, -20.5, -20, -19, -18.5, -18.3, 
-19, -20, -21, -21.5, -22.5, -22.3, -21.5, -20.5, -19.8, -19.5, 
-20.5, -20.7, -20.7, -20, -19.3, -19.5, -20.5, -21, -22, -21.5, 
-20.5, -20.5, -20.8, -21.6, -22.3, -23, -22.5, -22.1, -22.8, 
-23.5, -24, -23, -22, -21.7, -22, -22.4, -23, -24, -24.6, -25.5, 
-25.2, -25.5, -26.5, -26, -25, -24, -23, -22.1, -23, -24, -25, 
-25.8, -26.5, -27.5, -28.5, -29.5, -30, -30.5, -31, -32, -32.5, 
-33.3, -34, -34.4, -35.2, -35.7, -36.2, -37, -37.7, -38, -38, 
-39, -39.7, -40.5, -41.2, -40.5, -40.5, -41.5, -42.3, -42.3, 
-42.8, -43.3, -43.7, -44.5, -45.3, -46, -47, -48, -49, -49.5, 
-50.4, -50.8, -51.5, -51.5, -52, -52.3, -52.5, -53.5, -53.5, 
-53.7, -54, -53.3, -52.7, -52, -51, -51.2, -51, -50.3, -51, -52, 
-53, -54, -54.7, -54.2, -53.5, -52.5, -51.5, -51, -50.9, -51.9, 
-52, -52.5, -53.3, -52.5, -53.5, -54, -55, -55.8, -55.5, -55, 
-54.5, -55.5, -55.5, -56, -56, -56, -56.6, -57, -57.5, -58.2, 
-59, -60, -61, -62, -63, -63.8, -64.5, -65.5, -66, -66.8, -67, 
-67, -68, -69, -70, -69, -68, -68.5, -69.5, -70.5, -71.2, -71, 
-70, -69, -68, -67, -66, -67, -68, -69, -70, -70.5, -70.5, -71.5, 
-72.5, -72.7, -72.5, -71.5, -70.5, -69.5, -69.4, -68.5, -67.5, 
-66.5, -66, NA, -3.3, -3.8, -3, -3.5, -4.2, -4.6, -5, -5.1, -5.3, 
-5.5, -5.7, -5.7, -5.6, -5.8, -5.9, -6, -6.2, -6.1, -5.9, -5.5, 
-5.1, -5.4, -5.5, -5.6, -5.5, -5.6, -5.6, -5.4, -5.4, -5.5, -5.4, 
-5.3, -5, -4.7, -4.9, -4.9, -4.7, -4.9, -5.1, -5.2, -4.9, -4.9, 
-4.6, -4.4, -4.3, -4, -3.9, -3.6, -3.6, -3.3, -3.1, -3.3, -3.6, 
-3.3, -3, -2.8, -2.9, -3.1, -2.9, -2.9, -3, -3.1, -3.4, -3.6, 
-3.9, -4.1, -4.2, -4.6, -4.5, -4.5, -4.7, -4.5, -4.4, -4.2, -4, 
-4.2, -4.5, -5, -5.3, -5.2, -5, -4.8, -4.5, -4.2, -3.9, -3.5, 
-3.2, -2.9, -2.7, -2.6, -2.9, -3.2, -3.6, -3.9, -4.2, -4.5, -4.6, 
-4.9, -5.2, -5.5, -5.5, -5.3, -5.1, -4.8, -4.5, -4.1, -3.7, -3.5, 
-3, -2.6, -2.3, -2, -1.9, -1.5, -1.2, -0.9, -0.6, 0, 0.4, 0.8, 
1, 1.4, 1.2, 0.8, 0.8, 1.1, 1.6, 1.8, 1.6, 1.2, 0.8, 0.3, 0, 
0.4, 0.3, 0, 0, 0, -0.1, -0.4, -0.7, -1.2, -1.4, -1.6, -1.7, 
-2, -2.3, -2.6, -2.9, -3.1, -3.4, -3.1, -2.8, -2.8, -2.8, -2.3, 
-2.1, -1.8, -2.1, -2.5, -2.9, -3.3, NA, -8, -8.3, -8.5, -8.6, 
-8.6, -8.2, -8.5, -8.8, -9.2, -9.5, -10, -9.9, -9.5, -9.7, -9.9, 
-10.1, -9.8, -9.4, -9, -9.2, -9.5, -9.6, -9.6, -9.2, -9, -9, 
-9.5, -9.9, -10, -10.3, -9.9, -10.2, -10.1, -10, -9.5, -9.1, 
-8.7, -8, -7.5, -7, -6.5, -6.4, -6.2, -6.1, -6.1, -6.3, -6, -5.9, 
-5.7, -5.4, -5.7, -5.8, -6, -6.5, -6.9, -7.2, -6.9, -7.5, -8, 
NA, -180, -176, -172, -168, -164.2, -161, -158.3, -156, -152, 
-150.5, -150, -147, -146.2, -142, -138, -137, -134.9, -131.5, 
-130, -127, -123.4, -122.4, -120, -116, -114, -111, -108, -106, 
-106.8, -104.8, -100.8, -100.4, -101.8, -100.8, -101.4, -101.8, 
-102.7, -100.9, -97.8, -95, -94, -90, -87, -84, -81, -77.8, -77, 
-74, -72, -73.1, -76, -75.5, -76, -75.4, -73, -71, -69.7, -68.8, 
-67, -67, -66, -65.7, -64, -62, -59, -56.9, -58.5, -59.8, -59.5, 
-60.3, -60.7, -60, -59.9, -59.1, -60.3, -60.7, -60.5, -60, -60, 
-61, -61, -61.8, -63, -62.8, -61, -59, -55, -51, -47, -43, -40, 
-36, -35, -31, -26.5, -25, -23.9, -22, -20, -18.9, -15, -12.4, 
-11, -9, -5, -1.3, -0.9, 0, 1, 5, 9, 11.9, 13, 13.5, 16, 20, 
21, 24, 28, 30, 31.5, 33.5, 34, 36, 38, 39.7, 41, 43, 44.6, 46, 
48, 46.5, 50, 50.2, 52, 55, 57, 56.8, 57, 59, 60.4, 64, 68, 69.5, 
70.1, 72.2, 73.5, 74.1, 75, 75.6, 78, 79, 82.4, 83.1, 83, 86, 
88.3, 89.5, 92, 94.7, 98.1, 99.6, 100.2, 101, 102.5, 104.1, 106, 
109.1, 109.4, 111, 113.9, 115.8, 118, 121.5, 123.3, 125.5, 127, 
128.4, 130, 132, 134, 136, 138, 140, 142, 143.5, 144.5, 145.3, 
145.4, 147.8, 147.6, 148.3, 148.8, 147.9, 149, 151.2, 153, 155, 
157, 159, 161, 162.7, 163.2, 164, 166, 168, 170, 170.2, 171.3, 
170.4, 169, 169.3, 166, 165.5, 164, 164.8, 163, 163, 164, 166.5, 
166.5, 170, 173, 177, 180, NA, 174.7, 175.2, 175.7, 176.5, 177, 
177.1, 178, 178.4, 178.3, 177.5, 176.5, 175.9, 175.4, 175.4, 
174.7, 174.5, 174, 173.5, 173.2, 173, 173.1, 173.4, 174, 174.5, 
174.8, 174.7, 174.1, 173.8, 174.3, 175.1, 175, 174.7, NA, 174.3, 
174, 173.4, 173, 172.7, 172.1, 172, 171.4, 170.5, 169.5, 168.8, 
168, 167, 166.2, 167, 167.4, 168.2, 169, 169.8, 170.7, 171.2, 
172, 173, 172.7, 172.7, 173.2, 174, 174.1, 174.3, NA, -20, -18.2, 
-16.8, -15, -13.5, -13.5, -14.8, -15, -15.5, -16.5, -17.1, -18.3, 
-18.7, -19.1, -19.5, -20.3, -21, -21.4, -22.5, -23, -22.9, -22.4, 
-23.8, -24, -23, -22.8, -21.8, -23, -24, -22.3, -21.7, -22.7, 
-21.2, -20, NA, -84.5, -84.8, -85, -85.7, -86.3, -87.5, -88.2, 
-89, -90, -91, -92.1, -91, -90.9, -89.8, -89, -88, -88.4, -87.4, 
-86.5, -86, -85, -84.6, -84.5, NA, -84, -85, -86, -87, -87.8, 
-87.4, -87.2, -87.8, -87.9, -87.8, -87, -86.2, -86.4, -86.2, 
-85.8, -85.2, -85, -84.8, -84.3, -83.5, -83.3, -83.9, -83.5, 
-82.9, -82.8, -82.4, -81.8, -81.8, -81.3, -81.7, -81, -80, -80.3, 
-81, -82, -83, -83.8, -84, NA, -78.9, -79.5, -80.3, -81, -82, 
-83, -83, -82, -81.3, -80.5, -80, -79, -78.9, NA, -78, -77.2, 
-76.5, -76.2, -76.2, -76.2, -77, -77.7, -78.5, -79.5, -79.7, 
-79.3, -78.5, -78, NA, 57, 56.3, 55.5, 54.6, 53.7, 53.4, 51.5, 
51.7, 52.6, 52.3, 53, 54.4, 53.8, 55.5, 56, 56, 57.7, 60, 61, 
62.4, 66, 67, 69, 68.3, 68, 64, 60.8, 60, 58, 56.5, 55.5, 55.8, 
57.8, 57, NA, 24.6, 22.7, 20.9, 20.5, 19.3, 18.5, 17.6, 16.8, 
14, 14, 16, 15, 13, 11.5, 12, 14, 15.5, 16.5, 20, 23, 24.5, 26, 
21, 19, 21, 22.3, 23.3, 24.6, NA, 100, 96, 93.5, 92, 94.1, 93, 
96, 97, 100, 100, NA, 100, 100.5, 104, 105.7, 102.5, 101, 100, 
NA, -55.4, -56.7, -57.6, -58.2, -58.7, -59, -59.3, -58, -56.7, 
-55.5, -55, -56, -55.9, -55, -54.5, -53.9, -54.1, -53.6, -52.9, 
-52.6, -52.8, -53, -53.2, -53.3, -53.6, -53.6, -53, -53.9, -54, 
-55, -56.6, -55.5, -56.8, -56.2, -55.4, NA, -74.1, -75.3, -75.6, 
-76.8, -77.6, -78.6, -78.7, -79.8, -81, -82.2, -83.3, -84.4, 
-84, -82.7, -81.6, -81.2, -79.7, -78.4, -77, -76, -74.1, NA, 
49.5, 49, 48.5, 48.4, 48, 47.7, 47.2, 46.7, 45.7, 45.2, 44.5, 
44, 43.9, 43.7, 43.5, 43.2, 43.5, 43.7, 44, 44.5, 44.2, 44, 44, 
44.2, 44.5, 44.5, 44.9, 45.5, 46, 46.2, 47.2, 47.5, 47.4, 47.5, 
47.7, 47.9, 47.9, 48.2, 48.4, 48.5, 48.7, 48.7, 48.7, 49, 49.2, 
49.2, 49.5, 49.5, 49.7, 49.9, 50.2, 50.2, 50.5, 50.2, 50, 49.7, 
49.7, 49.9, 49.7, 49.5, 49.5, NA, 80.8, 81.3, 81.8, 81.9, 81.5, 
81.4, 81.1, 80.9, 80.4, 80, 79.8, 80.1, 80, 79.9, 79.8, 79.8, 
80, 80.8, 80.8, NA, -155.8, -155.5, -155.1, -155, -155, -155.6, 
-155.8, -156, -155.8, -155.8, NA, -67.1, -65.8, -65.5, -66, -67.1, 
-67.1, -67.1, NA, -77.8, -78, -78.3, -77.5, -76.3, -76.5, -76.9, 
-77, -77.3, -77.8, NA, -70, -68.9, -68.5, -68.5, -68.9, -69.5, 
-69.1, -69.9, -70, -70.3, -70.5, -71.1, -71.8, -73.1, -73.4, 
-72.6, -72.3, -72.5, -73.5, -74.5, -74.1, -73.8, -73.5, -72.5, 
-72, -71.6, -71, -70.5, -70, -70, NA, 119.5, 119.4, 119.5, 119.5, 
118.9, 118.9, 118.6, 119, 119.1, 119.1, 119.5, 119.9, 119.8, 
119.8, 119.5, 119.8, 119.9, 119.9, 120, 120.3, 120.4, 120.5, 
120.6, 120.8, 121, 121.5, 122.5, 123, 124.1, 124.3, 124.5, 124.5, 
124.8, 125, 125.1, 125.3, 125, 124.5, 123.3, 122, 121.6, 121, 
120.6, 120.1, 120, 120, 120.5, 120.6, 121, 121.1, 121.5, 122.1, 
122.9, 123, 123.5, 123.3, 122.8, 122.4, 121.6, 121.5, 121.3, 
121.5, 121.8, 122, 122.3, 122.4, 122.1, 122.6, 122.6, 122.8, 
122.9, 122.6, 122.6, 122, 122, 121.5, 121.5, 121.3, 120.9, 121, 
121, 121, 120.1, 120.4, 120.4, 120.5, 120.1, 119.8, 119.5, 119.4, 
119.5, NA, 142, 142, 142.1, 142, 142, 142, 142.1, 142.3, 141.8, 
141.6, 141.8, 141.8, 142.3, 142.5, 142.1, 142.6, 143, 143.3, 
143.1, 143.1, 143.3, 144, 144.3, 144.6, 144.6, 144.6, 144.1, 
143, 142.6, 142.6, 143.1, 143.5, 143.3, 143.3, 142.8, 142.5, 
142.1, 142, NA, 105.1, 106.3, 106.5, 106.4, 107.5, 108.5, 109, 
110, 111, 112.4, 113, 114, 114.3, 114.5, 114.4, 114, 113, 112.8, 
112.5, 111.9, 111.5, 111.4, 111, 110.4, 110, 109.5, 109, 108.3, 
108, 107.6, 107, 106.6, 106, 106, 105.8, 105.6, 105.4, 105.1, 
NA, 105.8, 105.9, 105.9, 105.8, 106, 105.9, 105.6, 105.5, 104.6, 
104.6, 104.5, 104, 103.3, 103.8, 103.5, 103.8, 103.3, 102.9, 
102.1, 102, 101.5, 101.3, 101, 100.8, 100.9, 100.5, 100.1, 100, 
99.5, 98.6, 98.5, 98.3, 98, 97.5, 97, 96, 95.5, 95.1, 95.4, 96.3, 
96.8, 97.1, 97.4, 97.6, 97.9, 98.5, 98.8, 98.6, 99, 99.1, 99.8, 
100.4, 100.9, 101.5, 102.3, 103.1, 103.9, 104.5, 104.5, 104.5, 
105.3, 105.5, 105.8, NA, 137.8, 137.6, 138.8, 139.1, 139.5, 140, 
140.5, 140.8, 142.1, 142.6, 143.1, 143.3, 142.6, 143.8, 143.8, 
144.1, 144.3, 145.3, 145.8, 146, 146.3, 146.6, 146.8, 147.1, 
147.3, 148, 149.5, 149.8, 150.1, 150.6, 150.3, 150.8, 150.3, 
150, 150.1, 149.5, 149.1, 149.3, 148.5, 148.1, 147.6, 147.3, 
147.1, 146.8, 147.8, 147.6, 147.3, 146.5, 146, 145.8, 145, 144.6, 
143.8, 143.6, 142.5, 141.1, 140.6, 139.8, 138.8, 138.1, 137.8, 
137.1, 137.1, 136.5, 136.3, 136, 135.8, 135.5, 135.1, 134.8, 
134.6, 134.3, 134.6, 134.3, 134.1, 134.1, 134.1, 134.1, 133.3, 
132.6, 132.1, 131.3, 131.1, 131.6, 131.8, 133.6, 133.8, 133.8, 
133.1, 132.8, 132.6, 132, 132.3, 132.6, 132.8, 132.6, 132.8, 
133, 133.3, 133.6, 134.1, 134.1, 135.1, 136.1, 136.8, 137.5, 
138.1, 138.3, 138.6, 138.6, 138.8, 138.8, 138.8, 138.3, 137.8, 
NA, -125, -124.9, -124.6, -123.5, -122, -121.1, -120, -119, -120, 
-120, -119, -118.4, -117.6, -118, -118.1, -119, -120, -119.5, 
-120, -121, -121.3, -121.4, -121, -120.3, -120.3, -121.1, -121.4, 
-122.6, -123, -122.9, -123.6, -122.3, -121.6, -121.1, -121.5, 
-123, -123, -124, -124.5, -124.8, -125, NA, 48.2, 47.9, 47.7, 
47.5, 47.5, 47.4, 47, 46.7, 47, 47.2, 47.5, 48, 48.5, 48.7, 49.2, 
50, 50.9, 51.2, 51.7, 52, 52.2, 52.4, 53.2, 53.2, 53.2, 53, 53.2, 
52.7, 53.2, 52.9, 52.2, 51.5, 51.2, 51.2, 51.2, 51, 50.2, 50.2, 
50.9, 51.2, 51.7, 52.2, 52.7, 52.5, 52.5, 52.9, 52.7, 52.7, 53, 
53.5, 53.5, 53.2, 53.2, 53.5, 54, 53.7, 54, 53.4, 53.2, 52, 50.9, 
50.2, 49.9, 49.2, 48.9, 48.9, 49, 49, 49.2, 49.4, 49.4, 49.5, 
49.9, 50.2, 50.4, 50, 49.5, 49.2, 48.7, 48.2, NA, 74, 74, 73.6, 
73.5, 73.5, 73.4, 73.5, 73.5, 73.8, 74, 74, 74.5, 75, 75.1, 75.8, 
76.1, 77, 77.3, 77.5, 78.1, 78.4, 78.5, 78.8, 79.1, 79.3, 79, 
78.4, 78.4, 78, 77.5, 76.5, 75.6, 74.9, 74.5, 74.5, 74.3, 74, 
74.1, 74, NA, 53, 53, 52.7, 52.7, 53.2, 53.9, 54, 54.5, 54.7, 
54.7, 54.5, 53.7, 53.7, 53, NA, 103.6, 104.6, 106, 106.8, 107.5, 
108.5, 109, 109.1, 110, 109.5, 109.4, 108.3, 107.5, 106.8, 106.5, 
106.1, 105.4, 104.3, 103.6, NA, 58.4, 58.2, 58.2, 58.4, 58.7, 
59, 59.4, 59.2, 59.5, 59.5, 59.9, 60, 60.2, 60.7, 60.5, 60.7, 
61.2, 61.2, 61.5, 61.5, 61, 61.2, 61.5, 61.7, 62, 61, 61, 60.2, 
59.7, 59.7, 59.5, 59, 58.7, 59, 58.4, NA, 145, 145.6, 146.6, 
147.5, 147.8, 148.1, 148.3, 148.1, 147.8, 148, 147.6, 147.3, 
147, 146.6, 146, 145.8, 145.3, 145, 144.6, 145, NA, -116, -114.8, 
-114.3, -113.6, -113.3, -113, -111.5, -110.8, -110, -110.5, -111.3, 
-111.5, -111, -110, -109, -109.8, -111, -111.5, -112, -113.3, 
-114, -115, -115.9, -115.6, -115.1, -115, -114.5, -115, -116, 
-116.4, -116, NA), y = c(55, 54, 53.3, 52.3, 51.5, 50.8, 50.5, 
50.9, 50.3, 50.1, 49.4, 48.9, 48.7, 48.4, 48.9, 49.5, 50, 49.4, 
48.5, 48.2, 47.9, 46.6, 45.5, 44.4, 43.8, 42.8, 42.3, 41.8, 41.1, 
40.5, 39.8, 38.9, 38, 38.1, 38.1, 37.4, 37.8, 37.2, 36.9, 36.6, 
35.9, 35.2, 34.6, 34.5, 34.1, 33.7, 33.4, 32.3, 31.8, 31.3, 30.8, 
30.4, 29.7, 29, 28, 27.9, 26.7, 26.5, 25.5, 24.4, 23.7, 22.9, 
23.1, 24, 24.2, 24.8, 25.8, 27, 27.9, 28.5, 29, 29.3, 29.8, 30.9, 
31.7, 31.7, 31.2, 30.3, 29, 28, 27.4, 26.6, 26, 25.4, 24.6, 23.8, 
22.7, 22.1, 21.5, 20.7, 20.5, 20, 19.3, 18.7, 18.2, 18, 17.7, 
16.9, 16.6, 16.3, 16, 15.9, 15.8, 15.7, 15.9, 16.3, 16.2, 15.9, 
15.5, 14.8, 14.3, 13.9, 13.9, 13.7, 13.5, 13.3, 13.2, 13.4, 13.4, 
13.4, 13.5, 13.3, 13, 13.1, 12.8, 12.5, 12, 11.6, 11.1, 11, 10.8, 
10.5, 10.1, 9.9, 9.6, 9.9, 10.3, 10, 9.6, 9.4, 9, 8.6, 8.4, 8.6, 
8.7, 8.6, 8.3, 8.3, 8.2, 7.7, 7.9, 7.5, 7.3, 7.5, 8.1, 8.3, 8.6, 
8.9, 9, 8.4, 8.3, 7.7, 7, 6.7, 6.3, 6, 5.6, 5.5, 5.5, 4.7, 4.3, 
3.9, 3, 2.6, 2.6, 1.9, 1.8, 1.4, 1, 0.4, -0.2, -0.6, -1.1, -1.6, 
-2.2, -2.4, -2.7, -2.3, -2.5, -3.2, -3.7, -4.3, -4.6, -5.1, -5.4, 
-5.8, -6.3, -6.9, -7.5, -8.1, -8.6, -9.1, -10, -10.9, -11.5, 
-12.1, -12.2, -12.5, -13.1, -13.6, -14.2, -14.6, -15.2, -15.6, 
-16.2, -16.5, -16.6, -17.1, -17.3, -17.9, -18.4, -19, -19.6, 
-20.5, -21.3, -22.2, -23.1, -23.5, -23.6, -24.2, -25.1, -25.7, 
-26.3, -27, -27.6, -28.1, -28.9, -29.4, -30.3, -31.2, -31.6, 
-32.3, -32.8, -33.1, -33.6, -34.2, -34.9, -35.3, -35.8, -36.3, 
-36.7, -37.3, -37.4, -37.6, -38.5, -39.4, -39.8, -40.2, -41, 
-41.6, -41.8, -41.5, -43, -43.5, -43, -42.7, -43.3, -43.6, -44, 
-43.9, -44.5, -45, -45.7, -46.3, -46.9, -46.6, -46.8, -47.7, 
-47.8, -48.5, -49.3, -49.6, -50, -50.5, -50.7, -50.8, -51.4, 
-51.6, -51.5, -51.8, -52.4, -52.7, -53.2, -52.7, -53.3, -53.8, 
-54.2, -54.6, -54.8, -55.1, -55.2, -55.4, -55.7, -55.5, -55.8, 
-55.3, -55.3, -55.2, -55, -55, -54.9, -54.9, -54.6, -54.5, -54.3, 
-54, -53.6, -53.3, -53.2, -52.6, -52.5, -52.2, -52.4, -52, -51.2, 
-50.4, -50, -49.3, -48.9, -48.6, -48.4, -48.1, -47.9, -47.4, 
-47.1, -46.7, -46.5, -45.7, -45.3, -45.1, -45, -44.8, -44.3, 
-43.3, -42.7, -42.6, -42.8, -42.1, -42.3, -42.5, -42.2, -41.5, 
-40.7, -41.2, -40.9, -40.4, -39.9, -39.2, -38.9, -39, -38.9, 
-38.7, -38.4, -37.8, -36.9, -36.3, -35.4, -34.1, -34.4, -34.3, 
-34.5, -34.6, -34.9, -34.9, -34.6, -34.1, -33.5, -32.8, -31.9, 
-31.2, -30.5, -29.5, -28.8, -28.2, -27.7, -26.8, -26.3, -25.5, 
-25, -24.4, -24.1, -23.8, -23.9, -23.6, -23.4, -23.3, -23, -23, 
-22.9, -22.6, -22.1, -21.5, -20.8, -20.4, -19.3, -19.4, -18.4, 
-17.7, -17.2, -16.3, -15.6, -14.7, -13.7, -12.9, -12.8, -12.5, 
-11.5, -10.6, -10, -9, -8, -7, -6, -5.1, -5.1, -4.9, -4.4, -3.7, 
-3.1, -2.8, -2.8, -2.7, -2.7, -2.4, -2.5, -2.5, -1.8, -1.5, -1, 
-0.6, -0.9, -1.5, -0.6, -0.2, -0.3, -0.1, 0, 0.2, 1.1, 1.8, 2.2, 
3.2, 3.9, 4.5, 4.7, 5.3, 5.5, 5.8, 5.9, 6, 6, 5.9, 5.9, 6.3, 
6.9, 7, 7.7, 8.4, 8.6, 8.6, 9.4, 9.5, 9.8, 9.9, 10.6, 10.7, 10.8, 
10.7, 10.7, 10.5, 10.4, 10.2, 10.1, 10.5, 10.7, 10.5, 10.7, 11.3, 
11.6, 11.9, 12.2, 11.6, 11.5, 11.3, 11, 10.2, 9.3, 9.1, 9.8, 
10.5, 11, 11.6, 12.1, 12.5, 12.3, 11.7, 11.3, 11.4, 11, 11, 10.8, 
10.1, 9.5, 9.4, 8.7, 8.5, 7.9, 8.3, 9, 9.5, 9.6, 9.4, 9.1, 9.2, 
8.9, 8.8, 9, 9.5, 9.6, 10.1, 10.9, 11.4, 12, 12.5, 13.5, 14.3, 
15, 15.5, 15.9, 15.9, 16, 15.8, 15.8, 15.7, 15.7, 16.3, 16.7, 
17.5, 18, 18.4, 18.5, 18, 18.5, 19.3, 19.4, 19.6, 19.7, 20.2, 
20.8, 21.5, 21.5, 21.6, 21.5, 21.4, 21.2, 20.5, 19.7, 19.1, 18.8, 
18.5, 18.7, 18.7, 18.5, 18.3, 18.5, 18.7, 18.9, 19.3, 20.3, 21.2, 
22, 23, 24, 25, 25.4, 26.1, 26.5, 27.4, 28.2, 28.6, 29.1, 29.8, 
29.8, 29.6, 29.8, 29.6, 29.9, 29.4, 29.1, 29.1, 29.2, 29.3, 29.2, 
29.7, 30, 30.1, 30.1, 30.4, 30.3, 30.4, 30.8, 30.3, 30.5, 30.2, 
29.9, 29.7, 29.9, 30.1, 29.2, 28.7, 27.9, 28, 27.5, 26.8, 27, 
26.5, 25.9, 25.5, 25.2, 25, 25.8, 26.8, 27.8, 28.5, 29.5, 30.5, 
31.5, 31.9, 32.4, 32.6, 33.4, 33.9, 34.3, 34.7, 35, 35.3, 35.5, 
35.6, 36, 36, 36.2, 36.9, 37.1, 38.2, 39, 39.6, 39.3, 38.5, 38.3, 
37.8, 37.3, 37.6, 38.5, 39.1, 39.7, 39.2, 39.4, 40.4, 40.5, 40.6, 
40.7, 41, 40.9, 41, 40.8, 41, 41.3, 41.4, 41.7, 41.7, 41.7, 42.1, 
41.8, 41.9, 42.4, 42.7, 43.5, 43.9, 44.3, 44.5, 45.1, 45.3, 45.8, 
45.5, 45.4, 45.3, 45.1, 45.1, 44.5, 43.7, 43.6, 44.3, 44.7, 44.5, 
44.9, 45.3, 45.6, 46, 46.4, 47, 46.3, 45.7, 45.8, 45.8, 46.1, 
46.3, 47.1, 47.3, 48, 47.6, 47.9, 48.3, 48.2, 48.9, 49.3, 49, 
48.5, 47.8, 47, 47.1, 47.7, 48.5, 48.9, 49.3, 49.8, 50.3, 50.3, 
50.3, 50.3, 50.2, 50.5, 51.2, 51.3, 51.4, 51.5, 52.2, 53, 53.6, 
54.1, 54.2, 54.3, 54.1, 53.9, 53.7, 53.7, 53.5, 53.4, 53.4, 53.7, 
53.8, 53.9, 54, 54.3, 54.4, 54.4, 54.5, 54.6, 54.6, 54.8, 54.8, 
54.7, 54.8, 55, 55.2, 55.3, 55, 55.2, 55.1, 55.3, 55.3, 55.2, 
55.4, 55.7, 55.6, 55.6, 55.8, 56, 56.2, 56.3, 56.4, 56.6, 56.8, 
56.8, 57, 57.2, 57.4, 57.6, 57.8, 57.8, 57.9, 58, 58.2, 58.2, 
58.4, 58.5, 58.5, 58.6, 58.7, 58.9, 58.8, 59, 59.1, 59.3, 59.4, 
59.3, 59.5, 59.6, 59.7, 59.9, 60.1, 60.3, 60.5, 60.4, 60, 59.7, 
59.4, 59.2, 58.8, 58.6, 58.6, 58.4, 58.2, 58.4, 58.5, 58.8, 58.9, 
58.7, 59, 59.3, 59.3, 59.4, 59.5, 59.7, 59.9, 60.1, 60.4, 60.6, 
60.8, 61.1, 61, 60.7, 61.1, 61, 61.2, 61.4, 61.6, 61.8, 61.8, 
62, 62.2, 62.4, 62.4, 62.2, 62.1, 62.2, 62.3, 62.5, 62.6, 62.4, 
62, 61.7, 62.6, 61.1, 60.7, 60.5, 60.1, 60, 59.7, 59.6, 59.4, 
59.3, 58.9, 58.5, 58.2, 57.9, 57.5, 57, 56.5, 56.2, 56.5, 56.1, 
56.1, 55.8, 55.3, 55, 54.7, 54.5, 54.2, 53.5, 53, 52.5, 52.2, 
51.8, 51.5, 51.5, 51.7, 51.4, 51.3, 51.6, 51.9, 52.1, 52.5, 52.7, 
53, 53.4, 53.8, 54.3, 54.8, 55.2, 55.3, 55.4, 55.3, 55.4, 55.7, 
55.9, 56.3, 56.7, 56.9, 57.1, 57.3, 57.1, 57, 57.2, 57.5, 58.4, 
58.8, 58.8, 58.7, 59.5, 60.5, 61.4, 61.7, 61.9, 62.2, 62.5, 62.6, 
62.7, 62.8, 62.9, 63.1, 63.5, 63.7, 63.7, 63.7, 64, 64, 64.2, 
64.6, 64.7, 65, 65.2, 65.3, 65.3, 65.3, 65.7, 65.8, 65.9, 65.7, 
65.5, 65.5, 65.6, 65.9, 66.3, 66.5, 66.5, 66.4, 66.2, 65.8, 65.6, 
65.8, 66.2, 66.3, 66.4, 66.8, 66.5, 66.5, 66.6, 66.8, 66.9, 67.5, 
68, 68.5, 68.5, 68.7, 68.8, 68.9, 69.4, 69.4, 69.6, 69.7, 69.7, 
69.8, 69.8, 69.4, 69.1, 68.9, 68.7, 68.7, 68.6, 68, 68, 68.3, 
67.8, 67.4, 67.3, 67.4, 67.8, 68.4, 68.3, 68.5, 68.7, 69, 69.3, 
69.1, 68.7, 68.3, 68.3, 68.5, 68.8, 69.1, 69.3, 69.4, 69.3, 69.3, 
69.5, 69.5, 69.7, 69.5, 69.7, 70, 70.2, 70.4, 70.5, 70.8, 71, 
71.4, 71.7, 71.8, 72, 72.5, 72.8, 72.7, 73, 73.7, 73.9, 74, 74, 
74.1, 74.1, 74, 73.8, 73.8, 73, 72.4, 71.8, 71.5, 71.4, 70.8, 
70.3, 69.9, 69.7, 69.5, 69.4, 69.3, 69, 68.7, 68.8, 68.8, 68.4, 
68, 68, 67.3, 67.3, 68, 68.8, 69, 69.6, 69.8, 69.4, 69, 68.9, 
68.5, 68.4, 67.8, 67.8, 67.9, 67.8, 67.9, 68, 68.1, 68.3, 68.7, 
68.8, 68.6, 68.5, 68.1, 68.2, 68.5, 68.3, 68, 67.7, 66.9, 67.1, 
67.3, 67.7, 67.9, 67.8, 67.7, 67.7, 67.7, 67.8, 68.2, 68.2, 68.7, 
68.9, 68.9, 68.9, 69.1, 69.2, 69.3, 69.6, 69.8, 69.8, 69.4, 69.7, 
70.1, 69.6, 69.5, 70, 70.5, 70, 69.8, 69.8, 69.9, 70.2, 70.1, 
69.9, 69.7, 69.4, 69.6, 69.5, 69, 68.9, 68.9, 69.1, 69.4, 69.6, 
69.6, 69.7, 70, 70, 70, 70.1, 70.2, 70.2, 70.4, 70.4, 70.4, 70.5, 
70.9, 70.8, 70.8, 71.1, 71.2, 71.1, 70.8, 70.8, 70.9, 70.5, 70.2, 
70, 69.3, 69, 68.8, 68.9, 68.4, 68.2, 68.1, 67.8, 67.1, 67, 67, 
66.8, 66.7, 66.6, 66.4, 66.5, 66.3, 66, 66, 66.1, 66.5, 66.5, 
66.3, 66.1, 66, 65.7, 65.4, 65.3, 64.8, 64.5, 64.4, 64.5, 64.4, 
64.4, 64.7, 64.5, 64, 63.6, 63.5, 63.4, 63, 63.2, 62.6, 62.3, 
62, 61.8, 61.3, 61, 60.5, 60.1, 59.8, 59.9, 60.2, 59.5, 58.8, 
58.7, 58.8, 59, 58.9, 58.3, 58.8, 58.5, 58.7, 58.5, 57.7, 57.2, 
56.8, 56.8, 56.4, 55.9, 56, 55.5, 55.2, 55, 54.6, 54.4, 54.6, 
54.7, 54.9, 55.1, 55.6, 55.4, 55.6, 55.8, 55.8, 56, 56.2, 56.4, 
56.6, 56.9, 57.2, 57.3, 57.7, 58.2, 58.5, 58.8, 59, 59.3, 59.7, 
60.4, 61, 61.3, 61.2, 60.9, 60.9, 60.5, 59.9, 59.7, 59.3, 59.3, 
59.7, 60, 60, 60.4, 60.9, 60.9, 60.8, 60.7, 60.4, 60.4, 60.2, 
60.1, 60.1, 60, 59.8, 60, 59.6, 59.3, 59, 58.4, 58.4, 58.3, 58.1, 
57.6, 57.2, 56.5, 56.7, 57.1, 57.8, 57.8, 57.1, 57, 56.9, 56.1, 
56.5, 56.4, 56, 55.7, 55.4, 55, 55, 55.2, 54.7, 55.3, 56, 56.4, 
56.3, 56.1, 55.7, 55.3, 55.3, 55, NA, 55.5, 55.8, 56.2, 56.4, 
56.8, 57, 57.3, 57.7, 58, 58.5, 59, 59.3, 59.3, 59.3, 59.3, 59.1, 
59.4, 59.2, 59.3, 59.3, 59.2, 59.3, 59.6, 59.7, 59.6, 59.4, 59.6, 
59.3, 59.2, 59.2, 58.8, 59, 59.1, 59.2, 59.1, 59.2, 59.5, 59.6, 
59.8, 60.3, 61, 61.3, 61.8, 61.8, 61.8, 61.8, 61.5, 61.2, 61, 
60.6, 61, 61.4, 61.7, 61.6, 61.8, 62.3, 62.6, 62.6, 62.5, 62.4, 
61.7, 61.4, 61.2, 61, 60.8, 60.6, 60.4, 60, 59.6, 59.4, 59, 58.5, 
58.2, 58, 57.8, 57.5, 57, 56.4, 55.5, 54.5, 53.5, 52.5, 51.5, 
51.2, 51.8, 52.2, 52.9, 53.3, 53.4, 54.2, 54.6, 54.5, 54.9, 55.6, 
56.3, 56.3, 56.7, 57.1, 57.8, 58, 57.8, 58.7, 59.5, 60, 60, 59.9, 
60.3, 60.4, 59.8, 60, 60.4, 60.6, 60.5, 59.9, 60.4, 60.7, 61, 
61.4, 61.7, 61.9, 62, 62.3, 62.5, 62.5, 62.3, 62.6, 63, 63.3, 
63.8, 64.3, 64.2, 64.7, 64.8, 65, 69.3, 69.6, 69.9, 69.9, 70, 
69.8, 69.3, 68.9, 69.2, 69.6, 70, 69.6, 69.6, 69.8, 69.7, 69.5, 
69.7, 70.3, 70.9, 71, 70.9, 70.8, 71.2, 71.4, 71.6, 71.8, 72.3, 
72.3, 72.5, 72.6, 72.8, 72.5, 72.2, 71.5, 71.6, 71.4, 71.7, 71.6, 
71.9, 71.2, 71.2, 71.9, 72.8, 73.4, 73.5, 73.8, 73, 73, 73, 73.2, 
73.6, 73.7, 73.8, 73.6, 73.8, 73.9, 74, 73.7, 73.2, 73.6, 74.2, 
74.8, 75.1, 75.9, 76.5, 76.7, 77, 77, 77.6, 77.2, 76.4, 76.4, 
76.2, 76, 76.1, 75.9, 75.4, 74.8, 73.9, 73.9, 73.6, 73, 72.2, 
71.8, 72.3, 72.2, 72.1, 71.9, 71, 71.3, 72.2, 72.8, 72, 71.4, 
70.9, 70, 69.1, 68.9, 68.4, 67.5, 66.9, 67.5, 68.5, 69.5, 70.5, 
71.3, 72, 72.8, 72.9, 73, 72.5, 71.5, 70.8, 70.5, 70, 69.4, 68.5, 
68.3, 68.9, 69.3, 69.7, 69.9, 69.3, 68.7, 68.8, 68.7, 68.2, 69, 
68.6, 68.1, 67.3, 66.9, 67.9, 68.6, 68.6, 68.3, 67.5, 66.9, 66.2, 
66.5, 65.7, 65, 64.7, 65.1, 64.5, 63.8, 64.2, 64.8, 65.8, 66.7, 
66.6, 66.3, 66.1, 66.6, 67.5, 68.3, 68.9, 69.2, 69.3, 69.6, 69.7, 
69.8, 70, 70.7, 71, 71, 70.9, 70.4, 70, 69.7, 69.2, 68.8, 68.2, 
67.5, 66.5, 65.5, 64.5, 63.5, 63.1, 62.4, 61.5, 60.5, 60.2, 60, 
59.4, 59, 58.3, 58, 58.2, 59, 59.5, 58.5, 57.5, 56.6, 56.3, 55.5, 
55.3, 55.8, 56.2, 56.5, 57.5, 58.5, 59, 59.5, 59.9, 60.5, 60.8, 
61.5, 62.4, 63, 63.5, 63.8, 64.4, 65, 65.8, 65.7, 65.3, 64.9, 
64, 63.7, 63.2, 62.5, 61.5, 60.7, 60.3, 59.9, 60.2, 60.5, 60.6, 
60.2, 60.2, 60, 59.8, 59.8, 59.5, 59.5, 59.3, 58.3, 58.5, 57.5, 
57, 57.4, 57.6, 57, 56.7, 55, 54.8, 54.9, 54.9, 54.9, 54.7, 54.6, 
54.4, 54.2, 54.3, 54.3, 54.6, 54.8, 54.8, 54.7, 54.6, 54.4, 54.3, 
54.2, 54, 53.9, 54.2, 54.2, 54.5, 54.5, 54.2, 54, 54, 54, 54.3, 
54.4, 54.4, 54.4, 54.4, 54.8, 55.1, 55.5, 55.7, 56, 56.2, 56.5, 
56.8, 57.8, 57.3, 57, 56, 55.4, 55.1, 54.6, 54.4, 54.3, 54.2, 
53.9, 53.8, 53.7, 53.6, 53.5, 53.7, 53.7, 53.6, 53.5, 53.4, 53.3, 
53, 52.8, 52.6, 52.4, 52.4, 52.6, 52.7, 52.9, 52.8, 52.3, 52, 
51.7, 51.5, 51.4, 51.4, 51.2, 51.1, 51, 50.9, 50.6, 50.2, 49.9, 
49.7, 49.5, 49.5, 49.3, 49.3, 49.4, 49.3, 49.7, 49.7, 49.6, 49.3, 
48.8, 48.7, 48.6, 48.7, 48.6, 48.6, 48.8, 48.7, 48.7, 48.7, 48.6, 
48.4, 48.3, 48.2, 47.9, 47.7, 47.8, 47.6, 47.5, 47.4, 47.3, 47, 
46.8, 46.5, 46.4, 46, 45.7, 45.5, 45.2, 45, 45.5, 45.4, 45, 44.8, 
44.4, 44, 43.6, 43.4, 43.3, 43.4, 43.4, 43.5, 43.5, 43.4, 43.4, 
43.5, 43.5, 43.6, 43.6, 43.6, 43.6, 43.8, 43.7, 43.5, 43.4, 43.2, 
43, 42.9, 42.7, 42.5, 42.4, 42.3, 42.1, 41.7, 41.3, 40.9, 40.5, 
40, 39.6, 39.4, 39, 38.8, 38.4, 38.5, 38.4, 38.2, 37.8, 37.3, 
37.1, 37.2, 37, 36.9, 37.2, 37.3, 37.1, 36.9, 36.7, 36.3, 36.1, 
36.1, 36.3, 36.5, 36.6, 36.7, 36.7, 36.7, 36.7, 36.6, 36.8, 36.8, 
37.2, 37.5, 37.5, 37.6, 37.9, 38, 38.4, 38.6, 38.9, 39.2, 39.6, 
39.9, 40.3, 40.6, 40.8, 41.1, 41.3, 41.3, 41.4, 41.7, 41.9, 42.1, 
42.3, 42.5, 42.9, 43.3, 43.4, 43.5, 43.5, 43.5, 43.4, 43.3, 43.2, 
43.1, 43.2, 43.4, 43.7, 43.8, 43.9, 44.2, 44.5, 44.4, 44.2, 44.1, 
43.8, 43.5, 43.2, 42.9, 42.7, 42.4, 42.2, 41.8, 41.5, 41.4, 41.2, 
41.2, 41.1, 40.9, 40.9, 40.7, 40.7, 40.6, 40.2, 40, 40.1, 39.8, 
39.5, 39, 38.8, 38.7, 38.5, 38.3, 38, 37.9, 38.2, 38.4, 38.8, 
38.9, 38.9, 39.1, 39.4, 39.6, 39.8, 40.2, 40.5, 40.4, 40.3, 40.2, 
39.9, 40, 40.3, 40.7, 40.8, 41, 41.2, 41.4, 41.6, 41.8, 41.9, 
41.9, 41.9, 42, 42.2, 42.3, 42.7, 43, 43.5, 43.7, 43.9, 44.2, 
44.5, 44.8, 45, 45.3, 45.5, 45.7, 45.8, 45.8, 45.6, 45.3, 45, 
44.8, 45, 45.4, 45.2, 45.2, 44.8, 44.5, 44.3, 44, 43.8, 43.5, 
43.5, 43.4, 43.2, 43, 43, 43.1, 42.9, 42.7, 42.5, 42.3, 42.2, 
41.9, 41.8, 41.4, 41, 40.6, 40.3, 40.2, 40, 39.7, 39.6, 39.3, 
39, 39, 38.9, 38.9, 38.6, 38.7, 38.6, 38.4, 38.4, 38.4, 38.4, 
38.5, 38.3, 38.3, 38.1, 38.1, 38.2, 38.3, 38.2, 38, 37.7, 37.3, 
37.1, 36.8, 37, 36.9, 36.5, 36.6, 36.8, 36.6, 36.4, 36.8, 37.2, 
37.6, 37.5, 37.3, 37.4, 37.6, 37.8, 37.9, 38.1, 37.8, 37.8, 38, 
38.3, 38.4, 38.5, 38.6, 38.7, 38.9, 39, 39.3, 39.2, 39.3, 39.6, 
39.8, 40.2, 40.5, 40.7, 40.4, 40.1, 39.9, 40, 40.3, 40.1, 40, 
40.4, 40.4, 40.2, 40.5, 40.6, 40.8, 40.8, 40.9, 40.9, 41.1, 40.9, 
40.8, 40.8, 40.6, 40.7, 40.6, 40.3, 40.2, 40.4, 40.7, 40.9, 41, 
40.9, 41.1, 40.9, 41, 40.9, 40.7, 40.6, 40.6, 40.5, 40.4, 40.3, 
40.3, 40.3, 40.4, 40.3, 40.4, 40.3, 40.1, 39.8, 39.4, 39.5, 39.6, 
39.3, 39.1, 38.9, 38.8, 38.5, 38.5, 38.4, 38.6, 38.3, 38.1, 38.1, 
38, 37.7, 37.4, 37.1, 37, 37, 37.1, 36.8, 36.8, 36.6, 36.5, 36.8, 
36.6, 36.6, 36.3, 36.2, 36.3, 36.3, 36.5, 36.9, 36.9, 36.8, 36.6, 
36.4, 36.2, 36.1, 36.2, 36.3, 36.2, 36.6, 36.8, 36.6, 36.7, 36.9, 
36.6, 36.3, 36, 35.6, 35.2, 34.8, 34.5, 34.3, 34.1, 33.7, 33.2, 
32.8, 32.4, 32, 31.6, 31.3, 31.2, 31.1, 31.1, 31.1, 31.2, 31, 
31.3, 31.4, 31.5, 31.5, 31.5, 31.4, 31.2, 31, 30.8, 31, 31.1, 
31.1, 31.2, 31.2, 31.3, 31.4, 31.6, 31.7, 31.5, 31.7, 32, 32, 
32, 32.2, 32.2, 32.4, 32.7, 32.9, 32.9, 32.9, 32.8, 32.7, 32.4, 
32.1, 32, 31.6, 31.3, 30.9, 30.7, 30.5, 30.3, 30.4, 30.7, 30.8, 
31, 31.1, 31.2, 31.2, 31.3, 31.4, 31.7, 32, 32.3, 32.4, 32.5, 
32.7, 32.7, 32.9, 32.9, 32.8, 32.8, 33, 33.1, 33.2, 33.4, 33.6, 
33.5, 33.7, 34, 34.3, 34.5, 34.8, 35.2, 35.4, 35.7, 35.8, 36.2, 
36.5, 36.8, 37.1, 36.9, 36.8, 36.8, 37, 37.3, 37.3, 37.1, 37, 
36.9, 36.8, 37, 37.1, 37.1, 36.9, 37, 37.1, 36.8, 36.7, 36.6, 
36.9, 36.9, 36.9, 36.8, 36.8, 36.8, 36.7, 36.6, 36.6, 36.5, 36.5, 
36.3, 36, 35.8, 35.9, 35.7, 35.7, 35.4, 35.2, 35.1, 35.1, 35.5, 
35.3, 35.3, 35.4, 35.3, 35.5, 35.9, 35.8, 35.6, 35.3, 35.2, 34.7, 
34.4, 34.2, 33.9, 33.7, 33.5, 33.3, 33.1, 32.9, 32.7, 32.3, 32, 
31.7, 31.3, 30.8, 30.5, 30.2, 29.8, 29.4, 29, 28.8, 28.5, 28.2, 
28.1, 28, 27.8, 27.5, 27, 26.5, 26.3, 26, 25.7, 25.3, 24.7, 24.5, 
24.3, 24, 23.7, 23.9, 23.7, 23.4, 23, 22.7, 22.4, 22.2, 21.8, 
21.4, 21.2, 20.8, 21.1, 20.8, 20.7, 20.3, 20, 19.6, 19.3, 19, 
18.6, 18.3, 17.8, 17.4, 16.8, 16.3, 15.8, 15.4, 15, 14.7, 14.4, 
14.1, 13.7, 13.3, 13.3, 13.2, 13.4, 13, 12.6, 12.3, 12.3, 12, 
11.9, 11.9, 11.9, 11.8, 11.8, 11.4, 11, 11, 10.9, 10.9, 10.5, 
10.2, 10, 9.8, 9.7, 9.5, 9.4, 9.2, 8.9, 8.6, 8.5, 8.4, 8.4, 8.2, 
7.9, 7.7, 7.4, 7.1, 6.9, 6.6, 6.4, 6.2, 6, 5.8, 5.5, 5.1, 4.9, 
4.6, 4.5, 4.3, 4.4, 4.6, 4.8, 4.9, 5, 5.1, 5.2, 5.2, 5.3, 5.2, 
5.2, 5, 4.9, 4.8, 5, 5.1, 5.2, 5.3, 5.5, 5.7, 5.8, 5.8, 6, 6.2, 
6.3, 6.4, 6.4, 6.4, 6.4, 6.3, 6.1, 5.8, 5.5, 5.2, 4.9, 4.5, 4.3, 
4.3, 4.4, 4.4, 4.5, 4.5, 4.6, 4.9, 4.8, 4.8, 4.3, 4.1, 4, 4, 
4, 3.6, 3.3, 2.8, 2.3, 1.9, 1.7, 1.4, 1.2, 1, 0.7, 0.7, 0.6, 
0.3, 0.2, 0.2, 0.4, 0.2, -0.2, -0.6, -0.7, -0.7, -0.8, -1.3, 
-1.7, -2.2, -2.6, -2.9, -3.2, -3.5, -3.8, -4, -4.4, -4.7, -5, 
-5.4, -5.8, -6, -5.9, -6, -6.1, -6.2, -6.5, -6.9, -7.2, -7.7, 
-7.9, -8.2, -8.7, -9, -9.2, -9.6, -10.1, -10.5, -10.8, -11, -11.4, 
-11.8, -12.3, -12.7, -12.8, -13, -13.3, -13.6, -14, -14.4, -14.9, 
-15.3, -15.8, -15.9, -16, -16.5, -17, -17.4, -17.8, -18.2, -18.5, 
-18.8, -19.2, -19.6, -20.1, -20.5, -21, -21.5, -21.9, -22.2, 
-22.7, -23, -23.3, -23.6, -24, -24.3, -24.7, -25.1, -25.3, -25.7, 
-26, -26.3, -26.6, -26.8, -27.2, -27.6, -28, -28.3, -28.6, -28.9, 
-29.2, -29.7, -30.2, -30.7, -31.1, -31.5, -31.8, -32.2, -32.7, 
-32.8, -33.1, -33.3, -33.5, -33.8, -33.9, -34.4, -34.2, -34.2, 
-34.4, -34.5, -34.7, -34.8, -34.7, -34.5, -34.4, -34.5, -34.4, 
-34.3, -34.1, -34, -34.1, -34.2, -34, -34.1, -34.3, -34, -34, 
-34.1, -34, -33.7, -33.7, -33.8, -33.6, -33.4, -33, -32.7, -32.2, 
-31.7, -31.3, -31, -30.7, -30, -29.8, -29.4, -29, -28.8, -28.5, 
-28, -27.5, -27, -26.8, -26.4, -26.1, -26.3, -26, -25.7, -25.5, 
-25.3, -25, -24.8, -24.6, -24.4, -24, -23.9, -23.8, -23.4, -23, 
-22.6, -22.2, -22.2, -21.8, -21.3, -20.9, -20.7, -20.6, -20.3, 
-20, -19.8, -19.4, -19.1, -18.9, -18.7, -18.4, -18.1, -17.8, 
-17.5, -17.3, -17.1, -17, -16.7, -16.5, -16.2, -16.1, -15.8, 
-15.4, -15.2, -15, -14.6, -14.4, -14.5, -14, -13.6, -13.2, -13, 
-12.9, -12.5, -12, -11.6, -11.3, -11, -10.6, -10.3, -10, -9.9, 
-9.7, -9.1, -9, -8.7, -8.3, -8.1, -8.1, -8, -8, -7.7, -7.5, -7.2, 
-6.9, -6.7, -6.4, -6.2, -5.8, -5.5, -5.2, -4.8, -4.6, -4.3, -4, 
-3.7, -3.3, -3.2, -2.8, -2.6, -2.6, -2.4, -2.3, -2.1, -2.1, -1.9, 
-1.7, -1.2, -1, -0.8, -0.5, -0.1, 0.2, 0.5, 1, 1.2, 1.5, 1.7, 
1.9, 2.2, 2.4, 2.6, 3, 3.3, 3.5, 3.9, 4.2, 4.5, 4.7, 5, 5.3, 
5.7, 6.2, 6.5, 7, 7.4, 7.9, 8.1, 8.3, 8.6, 9, 9.3, 9.7, 10.2, 
10.4, 10.5, 10.6, 11, 11.3, 11.6, 11.8, 11.9, 12, 11.8, 11.6, 
11.5, 11.3, 11.2, 11.3, 11.2, 11.2, 11.2, 11, 10.8, 10.6, 10.7, 
10.8, 10.7, 10.6, 10.4, 10.4, 10.3, 10.7, 11, 11.4, 11.6, 11.6, 
11.5, 11.6, 11.8, 12, 12.4, 12.8, 12.8, 12.8, 13.2, 13.4, 13.7, 
13.9, 14.2, 14.6, 14.7, 14.8, 15, 15, 15.3, 15.5, 15.1, 15.5, 
15.7, 15.8, 16, 16.6, 17, 17.4, 17.8, 18.1, 18.3, 18.5, 18.7, 
19, 19.4, 19.8, 20, 20.4, 20.8, 21.2, 21.1, 21.4, 21.8, 22.2, 
22.5, 22.7, 22.8, 23, 23.5, 23.9, 24, 24.3, 24.6, 25, 25.5, 25.9, 
26.3, 26.6, 26.8, 27.2, 27.5, 27.8, 28, 28.4, 28.7, 29, 29.3, 
29.7, 29.9, 29.8, 29.3, 29.1, 28.9, 28.5, 28.1, 27.9, 27.7, 28, 
28.3, 28.7, 29, 29.4, 29.4, 28.7, 28.3, 28.1, 28.1, 27.8, 27.3, 
26.9, 26.5, 26.1, 25.9, 25.8, 25.5, 25.3, 25, 24.8, 24.5, 24.3, 
24, 23.7, 23.2, 22.9, 22.5, 22.2, 21.8, 21.5, 21.3, 21, 20.5, 
20.3, 20.2, 20, 19.8, 19.6, 19.3, 19, 18.7, 18.6, 18.3, 17.9, 
17.6, 17.2, 17, 16.7, 16.3, 15.9, 15.5, 15.4, 15.2, 15, 14.7, 
14.2, 13.9, 13.5, 13.2, 12.9, 12.7, 12.7, 12.8, 12.8, 13, 13.2, 
13.3, 13.4, 13.5, 13.7, 13.8, 14, 14, 14.1, 14.5, 14.8, 15, 15.1, 
15.3, 15.5, 15.7, 16, 16.5, 16.7, 16.8, 16.9, 17, 17, 16.9, 17, 
17.2, 17.4, 17.8, 17.9, 17.9, 18, 18.4, 18.7, 18.9, 18.9, 19.2, 
19.5, 20, 20.3, 20.6, 20.4, 20.7, 21.2, 21.6, 21.9, 22.2, 22.5, 
22.7, 22.9, 23.1, 23.5, 23.5, 23.6, 24, 24.2, 24.8, 25.2, 25.5, 
25.7, 26, 26.2, 26.2, 26, 25.7, 25.3, 24.9, 24.5, 24.3, 24.1, 
24, 24.2, 24.2, 24.2, 24, 24, 24.2, 24.2, 24.4, 24.6, 25, 25.5, 
25.9, 26.1, 26.1, 25.7, 25.5, 25, 24.7, 24.9, 25.2, 25.6, 26, 
26.2, 26.2, 26.6, 26.9, 27.2, 27.3, 27.4, 27.6, 27.8, 28.1, 28.5, 
28.9, 29.2, 29.3, 29.5, 29.8, 29.9, 29.9, 30, 30.3, 30.1, 30, 
30.2, 30, 29.8, 29.5, 29.2, 29.1, 28.9, 28.8, 28.3, 28, 27.8, 
27.7, 27.4, 27.2, 27, 26.8, 26.7, 26.6, 26.5, 26.6, 26.7, 26.9, 
27.2, 27.2, 26.9, 26.6, 26.2, 25.8, 25.7, 25.6, 25.6, 25.4, 25.5, 
25.4, 25.4, 25.4, 25.3, 25.2, 25.1, 25.3, 25.1, 25.2, 25.3, 25.3, 
25.3, 25.4, 25.4, 25.5, 25.4, 25.3, 25.2, 25.3, 25.3, 25.4, 25.4, 
25.4, 25.2, 24.8, 24.8, 24.6, 24.8, 24.4, 24.2, 23.9, 23.8, 23.7, 
23.7, 23.3, 23, 22.8, 22.7, 22.8, 22.9, 22.8, 22.6, 22.4, 22.3, 
22.4, 22.3, 22, 21.7, 21.5, 21.2, 20.9, 20.7, 20.8, 21, 21.1, 
21.2, 21.4, 21.8, 22.1, 22.3, 22.3, 22.2, 21.9, 21.7, 21.7, 21.5, 
21.2, 21.1, 20.8, 20.6, 20.3, 19.9, 19.6, 19.1, 19.1, 18.9, 18.6, 
18.2, 17.8, 17.4, 17, 16.6, 16.2, 15.9, 15.8, 15.4, 15.1, 14.9, 
14.7, 14.3, 13.9, 13.5, 13, 12.9, 12.4, 12.2, 11.9, 11.6, 11.3, 
10.8, 10.5, 10, 9.7, 9.3, 8.8, 8.4, 8.2, 8.2, 8.5, 8.9, 9.2, 
9.3, 9.3, 9.3, 9.5, 9.7, 10.1, 10.2, 10.3, 10.4, 10.8, 11.2, 
11.4, 11.8, 12.1, 12.4, 12.8, 13.1, 13.5, 13.9, 14.3, 14.7, 15.2, 
15.5, 15.8, 15.9, 15.8, 16, 16.3, 16.3, 16.5, 16.6, 16.9, 17.2, 
17.5, 17.8, 18.2, 18.5, 18.9, 19.2, 19.5, 19.8, 20, 20.2, 20.4, 
20.6, 20.8, 21.2, 21.5, 21.7, 22, 22.2, 22.3, 22, 21.7, 21.6, 
21.6, 21.6, 21.7, 22, 22, 21.7, 22, 22.5, 22.9, 22.8, 22.8, 22.7, 
22.3, 22, 21.7, 21.5, 21.3, 21, 20.6, 20.4, 20.2, 20.1, 19.8, 
20, 20, 19.9, 19.5, 19.2, 18.9, 18.6, 18, 17.6, 17.2, 16.8, 16.4, 
15.9, 16.2, 16.5, 16.1, 15.8, 15.7, 15.8, 16, 16.2, 16.3, 16.5, 
16.8, 17, 17.3, 17.1, 17, 16.7, 16.5, 16, 15.8, 15.4, 15, 14.9, 
14.7, 14.4, 14.2, 13.8, 13.8, 13.9, 13.5, 13, 12.6, 12.2, 11.9, 
11.9, 11.5, 11.3, 10.8, 10.5, 10, 10.4, 10, 9.7, 9.3, 8.9, 8.8, 
8.4, 8.2, 8.4, 8.3, 8, 7.9, 7.7, 7.7, 7.4, 7.3, 7.2, 6.8, 6.6, 
6.3, 6.1, 5.8, 5.4, 5, 4.8, 4.4, 4.2, 4, 3.8, 3.5, 3.1, 2.9, 
2.6, 2.4, 2.1, 1.8, 1.7, 1.5, 1.3, 1.4, 1.5, 1.3, 1.8, 2.2, 2.3, 
2.6, 2.8, 3.2, 3.5, 3.9, 4.3, 4.8, 5.2, 5.5, 5.7, 5.8, 6.2, 6.4, 
6.8, 6.8, 6.9, 7, 7.4, 7.8, 8.2, 8.5, 8.5, 9, 9.2, 9.3, 9.2, 
9.4, 9.6, 10, 10.4, 10.8, 11.2, 11.6, 11.9, 12.2, 12.7, 13, 13.3, 
13.5, 13.6, 13.5, 13.3, 12.8, 12.6, 12.6, 12.5, 12.3, 12.2, 12.1, 
12, 11.8, 11.5, 11.2, 10.8, 10.8, 11.2, 10.8, 10.7, 10.5, 10.7, 
10.6, 10.4, 10.3, 10.1, 9.9, 9.8, 9.4, 9, 8.8, 8.6, 8.7, 8.8, 
9.2, 9.3, 9.4, 9.7, 9.9, 9.5, 9.8, 9.9, 10, 10.3, 10.4, 10.6, 
10.9, 11.1, 11.2, 11.3, 11.5, 11.9, 12.3, 12.6, 12.9, 13.1, 13.5, 
13.7, 14.2, 14.6, 15, 15.3, 15.5, 16, 16.2, 16.3, 16.7, 17.1, 
17.4, 17.7, 17.9, 18.1, 18.3, 18.7, 19, 19.3, 19.7, 20.6, 20.2, 
20.6, 20.9, 21, 20.9, 21, 20.9, 21.3, 21.4, 21.5, 21.7, 21.6, 
21.8, 21.8, 21.6, 21.4, 21.5, 21.6, 21.5, 21.3, 21, 20.6, 20.4, 
20.3, 20.3, 20.5, 20.7, 20.8, 21.1, 21.4, 21.5, 21.6, 21.8, 21.7, 
21.7, 21.8, 22.2, 22.1, 22.3, 22.5, 22.9, 22.9, 22.5, 22.4, 22.3, 
22.5, 22.4, 22.7, 22.6, 22.8, 22.8, 22.7, 22.8, 22.8, 23, 23, 
23.3, 23.6, 23.5, 23.8, 24, 24.3, 24.4, 24.5, 24.6, 24.5, 24.7, 
24.8, 25.2, 25.2, 25.4, 25.4, 25.6, 25.8, 26.1, 26.3, 26.4, 26.6, 
26.7, 26.9, 27.1, 27.4, 27.8, 28, 28.1, 28.4, 28.2, 28.3, 28.6, 
28.8, 28.9, 29.1, 29.2, 29.2, 29.4, 29.5, 29.6, 29.4, 29.6, 29.7, 
29.8, 29.9, 30.2, 30.2, 30.3, 30.2, 30.3, 30.4, 30.5, 30.7, 30.8, 
31, 31.3, 31.5, 31.7, 31.9, 31.9, 32.2, 32, 31.8, 31.7, 32, 32.3, 
32.4, 32.6, 32.8, 33, 33.5, 33.8, 34.2, 34.4, 34.6, 34.8, 35.1, 
35.5, 35.7, 35.9, 36.1, 36.2, 36.2, 36.5, 36.7, 36.9, 36.9, 37, 
37.2, 37.4, 37.5, 37.5, 37.4, 37.6, 37.7, 37.8, 37.6, 37.4, 37.2, 
37.1, 37.2, 37.4, 37.7, 38, 38.1, 38.1, 38.2, 38.6, 39, 39.3, 
39.1, 39.3, 39.3, 39.5, 39.7, 39.9, 40, 40.2, 40.3, 40.7, 40.9, 
40.9, 41, 40.7, 40.5, 40.3, 40, 39.9, 39.6, 39.4, 39.4, 39.1, 
38.9, 38.7, 38.8, 39, 39.2, 39.4, 39.5, 39.7, 39.8, 39.8, 39.8, 
39.8, 39.7, 39.7, 39.5, 39.4, 39.2, 38.8, 38.6, 38.4, 38.2, 38.2, 
38.1, 38, 37.9, 37.7, 38, 37.9, 37.7, 37.8, 37.7, 37.5, 37, 37, 
36.8, 36.6, 36.3, 36, 35.9, 35.6, 35.4, 35.2, 34.9, 34.6, 34.4, 
34.5, 34.7, 34.6, 34.4, 34.7, 34.7, 34.9, 35.1, 34.8, 34.9, 35, 
35.1, 35.1, 35.3, 35.7, 35.9, 36, 36.3, 36.5, 36.7, 37, 37.4, 
37.8, 38.2, 38.7, 38.9, 39.1, 39.2, 39.4, 39.6, 39.8, 40, 40.2, 
40.1, 40.3, 40.4, 40.7, 40.8, 41.2, 41.4, 41.7, 41.9, 42.1, 42.3, 
42.5, 42.7, 42.6, 42.9, 43.2, 43.3, 43.1, 43.3, 43, 42.9, 42.8, 
42.8, 42.7, 42.8, 42.9, 43.2, 43.3, 43.5, 43.8, 44.2, 44.4, 44.6, 
45, 45.2, 45.4, 45.8, 46.1, 46.3, 46.7, 47, 47.3, 47.7, 47.9, 
48.1, 48.3, 48.6, 48.9, 49, 49.3, 49.7, 50, 50.1, 50.3, 50.7, 
50.9, 51.2, 51.4, 51.6, 51.8, 51.9, 52.1, 52.3, 52.5, 52.7, 52.9, 
53.1, 53.2, 53.2, 53.2, 53, 53.1, 53.1, 53.3, 53.5, 53.7, 53.9, 
54.1, 54.3, 54.2, 54.1, 53.7, 53.6, 54, 53.8, 53.6, 53.6, 53.7, 
54, 54, 54.2, 54.3, 54.2, 53.9, 53.5, 54.1, 54.3, 54.7, 54.6, 
54.6, 54.7, 54.8, 55.1, 55.2, 55.4, 55.5, NA, 68.7, 65.5, 66.2, 
65.9, 65.4, 65.6, 65, 64.7, 64.2, 64.4, 64.6, 65.2, 65.7, 65.5, 
65.9, 66.4, 67, 67.1, 66.5, 67.3, 68.1, 68.7, NA, 41.2, 41.2, 
41.3, 41.3, 41.5, 41.7, 42, 42.4, 42.6, 43, 43.3, 43.4, 43.6, 
43.9, 44.4, 44.7, 44.8, 45, 45.4, 45.6, 45.9, 46.2, 46.4, 46.6, 
46.6, 46.6, 46.7, 46.6, 46.5, 46.5, 46.4, 46.3, 46.2, 46.2, 46.2, 
46.1, 46, 45.8, 45.6, 45.4, 45.4, 45.2, 45.1, 44.8, 44.6, 44.4, 
44.5, 44.8, 44.8, 44.7, 45, 45.2, 45, 45.1, 45.2, 45.1, 44.8, 
44.7, 44.6, 44.3, 44.2, 44.1, 43.8, 43.6, 43.4, 43.2, 43.1, 43, 
42.9, 42.7, 42.3, 42, 41.8, 41.5, 41.2, 41.1, 41, 41, 41.1, 41.1, 
41, 41, 41, 41.2, 41.1, 41.3, 41.4, 41.4, 41.7, 41.7, 41.7, 42, 
42, 42, 42, 42, 42.1, 41.9, 41.8, 41.6, 41.4, 41.2, 41.2, 41.2, 
41.2, 41.2, NA, 41.3, 40.7, 40.1, 39.8, 39.3, 38.7, 38.2, 37.5, 
37.1, 36.9, 36.7, 37, 37.2, 37.5, 37.4, 36.7, 36, 35.5, 35.6, 
35.5, 35.4, 35.4, 34.9, 34.4, 34.4, 33.8, 33.6, 33.4, 33, 32.8, 
32.7, 33.1, 33.1, 32.7, 32.1, 31.5, 31.2, 31.7, 31.5, 31, 31.4, 
31.4, 32.4, 33.2, 33.4, 33.6, 33.7, 33.9, 34, 33.9, 34.3, 34.3, 
34.5, 34.7, 34.7, 34.3, 33.7, 33.9, 34.3, 34.6, 35.1, 34.9, 34.8, 
34.7, 34.6, 35.1, 34.9, 34.6, 35.1, 35.3, 35.2, 35.7, 35.5, 34.9, 
35.1, 35.7, 36.2, 36.9, 37.4, 38.1, 38.4, 38.6, 39.5, 40.5, 40.8, 
41.4, 41.6, 41.3, 40.8, 40.8, 41, 41.2, 41.3, NA, 33.8, 34.3, 
34.3, 33.9, 34, 33.5, 33.3, 32.9, 32.8, 33, 33.4, 33.3, 33.8, 
NA, 25, 25.1, 24.7, 24, 23.8, 23.6, 23, 22.5, 22, 22.3, 23, 24, 
24.5, 25, 25, NA, 18.5, 18.3, 18.5, 18.5, 18.5, 18, 17.5, 16.7, 
16.2, 16.4, 16.4, 15.9, 15.4, 14.9, 14.4, 14.7, 14.3, 13.9, 13.8, 
13.6, 13.9, 13.5, 13.4, 13.2, 13.4, 13.9, 13.6, 13, 12.8, 12.9, 
12.8, 12.5, 13.1, 13.3, 13.6, 13.7, 13.9, 14, 13.7, 14.3, 14.1, 
13.9, 14.1, 14.6, 15, 15.7, 15.9, 16.2, 16.6, 17.1, 17.3, 18.1, 
18.5, NA, 9.8, 9.3, 9, 8.8, 8.5, 8.6, 8.2, 8, 8.6, 8.5, 8.2, 
8, 7.5, 6.9, 7.3, 7.7, 7.3, 7.4, 7.8, 7.3, 6.5, 6, 6.1, 5.9, 
5.8, 5.9, 6.5, 6.8, 7.3, 6.9, 6.7, 7.7, 8.2, 8.5, 8.8, 9.2, 9.5, 
9.8, NA, 20.1, 19.9, 19.8, 19.7, 19.5, 18.8, 18.3, 18.4, 18.6, 
19, 19.7, 20, 20.1, NA, 7, 6.8, 6.6, 7, 6.2, 5.8, 5.5, 5.2, 4.9, 
5, 4.6, 4, 3.3, 3, 2.8, 2.4, 1.5, 1.7, 1.8, 1.9, 1.5, 0.9, 0.3, 
-0.3, -0.6, -0.7, -1, -1.3, -1, -1.2, -1.8, -2.3, -3, -3, -2.9, 
-2.7, -3.6, -3.5, -3, -3.2, -3.3, -3.7, -3.9, -3.6, -3.2, -2.5, 
-2.2, -1.5, -1.2, -0.7, -0.3, 0.5, 0.8, 1, 1.8, 2.3, 3, 3.7, 
3.8, 4.4, 4.3, 4.6, 5, 4.9, 5.4, 5.8, 5.8, 6, 6.2, 6.6, 7, NA, 
45.5, 44.7, 44.3, 43.8, 43.2, 43.3, 43, 42.6, 41.9, 41.4, 41.6, 
41.7, 42.1, 42.5, 42.3, 42.6, 42.2, 42.4, 43, 43.1, 43.4, 43.3, 
43.7, 44.3, 43.9, 43.9, 44.3, 44.8, 45.5, NA, -13.5, -13.9, -14.2, 
-14.7, -14.9, -14.8, -15.1, -14.5, -13.9, -13.8, -14.3, -14.3, 
-14.2, -14.3, -15.2, -15.3, -16, -16.3, -16.6, -17, -17.2, -16.4, 
-17.1, -17.6, -18, -18.1, -18.5, -19.4, -19.8, -19.9, -20, -20.4, 
-20.7, -20.7, -20.8, -21.5, -21.8, -22.5, -22.2, -22, -22.6, 
-23.5, -24.5, -25.1, -25.9, -26.5, -26.2, -25.8, -25.5, -26.1, 
-26.6, -26.5, -27.2, -28.1, -28.9, -29.6, -30.5, -31.5, -32.2, 
-33, -33.6, -34, -34.4, -35, -35.1, -34.9, -34.6, -34.5, -34.1, 
-33.9, -33.8, -34, -34, -34, -33.6, -32.9, -32.7, -32.3, -32.3, 
-32, -31.6, -31.6, -31.5, -32, -31.9, -32.2, -32.5, -32.7, -33.2, 
-33.6, -34.5, -34.5, -34.9, -35, -34.8, -34.5, -34.1, -33.7, 
-33, -33, -33.2, -34, -34.9, -35.3, -35.2, -34.2, -34.7, -35.4, 
-35.6, -35.7, -36.4, -37, -37.7, -38.1, -38.4, -38.4, -38.6, 
-38.8, -38.3, -38.5, -38.5, -38.9, -39.1, -38.7, -38.3, -37.9, 
-37.8, -37.5, -36.9, -36.3, -35.4, -34.5, -34, -33.1, -32.6, 
-32, -31, -30.7, -29.7, -28.8, -28.2, -27.4, -27.7, -27.3, -27.2, 
-26.6, -25.9, -25.2, -24.7, -24.8, -25.3, -25.3, -25, -24.5, 
-24, -23.6, -23, -22.4, -22.6, -22.2, -22.6, -22.4, -21.6, -20.9, 
-20.5, -20.2, -20.2, -19.9, -19.7, -19.8, -19.4, -19.2, -19.2, 
-18.5, -18, -17.3, -16.6, -15.6, -15, -14.7, -14.2, -14.5, -14, 
-13.4, -12.9, -12.6, -12, -11.9, -11, -10.7, -10.9, -11.7, -12, 
-12.6, -13.4, -14, -14.5, -15.5, -16.5, -17.4, -17.7, -17.4, 
-16.9, -16.7, -16.3, -16, -15.3, -15, -14.8, -14.6, -14, -13.8, 
-13.3, -13.3, -12.8, -12.3, -12.2, -12, -12.3, -12.5, -12.3, 
-12, -12.3, -12.1, -11.7, -11.7, -11.4, -11.2, -11.5, -11.7, 
-12.3, -12.1, -12.2, -12.4, -12.4, -12.7, -12.8, -12.9, -13.3, 
-13.5, NA, 62.3, 62.1, 61.9, 61.7, 61.8, 62.3, 62.4, 62.3, NA, 
62.8, 62.9, 62.6, 62.2, 62.3, 62.2, 62.4, 62.6, 62.9, 62.9, 62.8, 
NA, 64.8, 65.1, 65.2, 65.5, 65.5, 65.7, 65.8, 65.8, 65.9, 65.6, 
64.8, 64.3, 64.1, 63.8, 63.6, 63.8, 63.8, 63.4, 63.2, 63.4, 63.5, 
63.7, 63.8, 64.1, 64.1, 64.1, 63.9, 63.8, 63.6, 63.6, 63.4, 63.7, 
63.8, 63.9, 64, 64, 64.2, 64.5, 64.7, 64.8, NA, 72, 71.8, 71.4, 
71.3, 71.2, 71.3, 71.2, 71, 70.9, 70.9, 71, 71, 71.1, 70.9, 70.7, 
70.4, 70.3, 70.2, 70.3, 70.4, 70.3, 70, 70, 70.1, 70.1, 70, 69.9, 
69.9, 70, 69.8, 69.7, 69.8, 70, 70.3, 70.3, 69.9, 69.7, 69.9, 
70, 70.2, 70.1, 70, 69.8, 69.8, 70, 70.3, 70.3, 70.4, 70.5, 70.5, 
70.2, 70.2, 69.7, 69.7, 69.5, 69.3, 69, 69, 68.8, 68.6, 68.9, 
68.9, 69.2, 68.9, 68.6, 68.5, 68.3, 68.2, 67.9, 67.7, 67.3, 67.1, 
67.1, 66.8, 66.7, 66.8, 67, 66.9, 66.8, 66.5, 66.3, 66.2, 66.2, 
65.9, 66.3, 66.6, 66.7, 66.7, 66.6, 66.3, 66.1, 65.8, 65.7, 65.5, 
65.6, 65.4, 65.4, 65.3, 65.4, 65.4, 65.5, 65.4, 65.3, 65.2, 64.9, 
64.7, 64.4, 64.3, 64.3, 64.3, 64.5, 64.6, 64.5, 64.5, 64.6, 64.5, 
64.4, 64.3, 64.2, 64, 63.8, 63.8, 63.7, 63.7, 63.4, 63.4, 63.2, 
63, 63, 62.7, 62.7, 62.4, 62.3, 62.2, 62, 61.8, 61.8, 62.1, 62.4, 
62.5, 62.8, 63, 63.4, 63.8, 63.8, 63.4, 63.4, 63, 63, 63, 62.8, 
62.8, 62.6, 62.7, 63, 62.8, 63, 63.3, 63.5, 63.8, 63.5, 63.6, 
63.8, 64, 64, 64.2, 64.3, 64.4, 64.5, 64.6, 64.8, 64.8, 65.1, 
64.8, 65.2, 65.3, 65.4, 65.5, 65.6, 65.7, 65.5, 65.8, 65.9, 66, 
65.9, 65.9, 66.2, 66.5, 66.3, 66.5, 66.3, 66.1, 66, 65.9, 66.1, 
65.8, 65.6, 65.2, 65.3, 65.2, 64.8, 65.5, 65.7, 65.7, 65.8, 66, 
66, 66.3, 66.5, 66.4, 66.5, 66.7, 67, 66.9, 66.9, 67, 67.2, 67.4, 
67.3, 67.4, 67.6, 67.8, 67.7, 68.1, 68, 68, 68.1, 68.3, 68.4, 
68.5, 68.5, 68.6, 68.6, 68.7, 68.8, 68.8, 68.9, 69, 69.1, 69.3, 
69.3, 69.2, 69.2, 69.4, 69.5, 69.5, 69.6, 69.7, 69.7, 70, 70.1, 
70.3, 70.2, 70, 69.9, 70, 70.2, 70.1, 70.2, 70.3, 70.4, 70.6, 
70.8, 70.6, 70.8, 70.7, 70.5, 70.9, 71.1, 70.9, 71, 71.1, 71.4, 
71.6, 71.7, 71.7, 71.5, 71.5, 71.8, 71.6, 71.8, 72, 72.1, 72, 
72.5, 72.6, 72.6, 72.7, 72.8, 72.8, 72.7, 72.5, 72.4, 72.3, 72.3, 
72.3, 71.9, 72.4, 72.7, 73, 73.3, 73.5, 73.7, 73.7, 73.6, 73.4, 
73.2, 73.1, 73, 72.9, 72.9, 72.5, 72.4, 72.2, 72.1, 71.8, 71.7, 
71.4, 71.6, 71.8, 72.2, 72.6, 73, 73.6, 73.8, 73.8, 73.8, 73.7, 
73.5, 73.4, 72.9, 72.6, 72.1, 72, NA, 79.1, 79.5, 79.7, 79.8, 
79.9, 80.1, 80, 80.1, 80.2, 80.4, 80.5, 80.6, 81, 81.1, 81.2, 
81.1, 81.1, 81.5, 81.7, 81.8, 81.9, 81.8, 81.6, 81.7, 81.9, 82, 
82.1, 82.2, 82.3, 82.3, 82.4, 82.3, 81.8, 81.6, 82.1, 81.9, 81.8, 
81.9, 82, 82.3, 82.6, 82.6, 82.6, 82.4, 82.3, 82.2, 82, 81.8, 
81.8, 81.9, 82.2, 82.3, 82.5, 82.7, 82.9, 83, 83.1, 83.2, 83.3, 
83.3, 83.4, 83.4, 83.5, 83.5, 83.5, 83.6, 83.6, 83.7, 83.7, 83.7, 
83.7, 83.5, 83.5, 83.5, 83.5, 83.4, 83.3, 83.2, 83.2, 83.1, 83.1, 
83.2, 82.9, 82.9, 82.8, 82.7, 82.4, 82.3, 82.2, 82.2, 82.1, 82.1, 
82.1, 82.1, 82.1, 82.1, 82, 81.9, 81.8, 81.7, 81.7, 81.8, 81.9, 
82, 82, 82, 82, 82, 81.7, 81.6, 81.5, 81.6, 81.7, 82, 82.1, 82, 
81.3, 81.3, 80.5, 80.8, 81, 81.2, 81.6, 81.5, 81.6, 81.5, 81.7, 
81.9, 82, 81.9, 81.8, 81.7, 81.5, 81.4, 81.2, 81.2, 80.9, 80.8, 
80.7, 80.7, 80.7, 80.7, 80.6, 80.6, 80.6, 80.6, 80.6, 80.4, 80.3, 
80.3, 80.3, 79.8, 80, 80.1, 80.1, 79.8, 79.8, 79.3, 79.2, 79.1, 
78.8, 78.8, 78.2, 77.8, 77.7, 78, 77.8, 77.6, 77.6, 77.7, 77.6, 
77.4, 77.3, 77.4, 76.8, 76.8, 77, 77, 76.7, 76.8, 76.5, 76.3, 
76.3, 75.8, 75.2, 75.3, 75.2, 74.6, 74.6, 74.6, 74.3, 74.1, 74.1, 
74.2, 74, 73.9, 73.8, 73.5, 73.5, 73.3, 73.3, 73, 72.5, 72.2, 
72.3, 72.3, 72, 71.5, 71, 70.5, 70.6, 70.4, 70.6, 71.2, 71.2, 
70.7, 70.6, 70.5, 70.3, 70.3, 70.2, 70.2, 70.2, 69.9, 69.5, 69.1, 
68.9, 68.8, 68.6, 68.5, 68.3, 68.6, 68.3, 68.1, 68.3, 67.8, 67.6, 
67, 66.6, 66.3, 66.3, 65.9, 65.9, 65.7, 65.8, 66.2, 65.6, 65.6, 
65.2, 65, 64.5, 63.8, 63, 62.6, 61.8, 61, 60.3, 59.9, 59.8, 60.2, 
60.7, 60.9, 61, 61.4, 61.7, 62.6, 63.1, 63.5, 64, 64.2, 65, 65.4, 
66, 66.5, 66.9, 67.5, 68, 68.4, 68.5, 68.5, 68.7, 69.5, 70.1, 
70, 70.1, 70.3, 70.3, 70.7, 70.8, 70.7, 70.8, 70.4, 70.6, 70.8, 
71, 71.1, 71.1, 71.3, 71.6, 71.6, 71.4, 71.3, 71.6, 72.2, 72.6, 
72.8, 73.1, 73.6, 73.8, 74, 74.5, 74.7, 74.8, 75, 75.6, 75.8, 
76, 76, 76.2, 76.3, 76.1, 76.2, 76.1, 76.3, 76.3, 76.1, 76, 76.1, 
76.2, 76.4, 76.5, 76.6, 76.7, 76.7, 76.8, 77, 77.2, 77.3, 77.4, 
77.4, 77.4, 77.5, 77.6, 77.6, 77.5, 77.6, 77.7, 77.8, 77.9, 78.1, 
78.3, 78.5, 78.7, 78.8, 78.8, 79, 79.1, 79.2, 79.1, 79.1, NA, 
57.8, 58, 58.7, 58.6, 58.6, 58.6, 58.7, 58.5, 58.3, 57.8, 57.6, 
57.4, 57.3, 57.1, 56.8, 56.7, 56.7, 56.6, 56.6, 56.6, 56.8, 56.5, 
56.2, 55.9, 55.8, 55.5, 55.4, 55.6, 55.8, 56, 56, 55.8, 56, 55.9, 
55.9, 55.7, 55.5, 55.2, 55, 54.8, 54.6, 54.8, 54.6, 54.6, 54.8, 
54.7, 54.8, 54.8, 55, 54.9, 54.9, 54.7, 54.5, 54.3, 54.3, 54.2, 
53.9, 53.8, 53.7, 53.6, 53.4, 53.2, 53.4, 53.3, 53.3, 53.2, 53.4, 
53.5, 53.2, 53, 52.8, 52.8, 52.8, 52.7, 52.5, 52.3, 52.2, 52, 
51.8, 51.8, 51.6, 51.7, 51.7, 51.5, 51.6, 51.4, 51.4, 51.5, 51.6, 
51.6, 51.4, 51.2, 51.3, 51.3, 51.2, 51, 50.8, 50.6, 50.3, 50.2, 
50.1, 50, 50.2, 50.4, 50.4, 50.3, 50.2, 50.6, 50.8, 50.7, 50.8, 
50.7, 50.8, 50.8, 50.8, 50.8, 50.8, 50.8, 50.8, 50.9, 50.9, 51.3, 
51.4, 51.4, 51.6, 51.8, 52.2, 52.5, 52.8, 52.9, 52.9, 52.8, 52.9, 
53.2, 53.4, 53.6, 53.7, 53.8, 54.1, 54.4, 54.6, 54.7, 55, 55.4, 
55.6, 55.8, 55.9, 56.1, 55.9, 55.9, 56, 56.2, 56.3, 56.5, 56.6, 
56.8, 57.3, 57.5, 57.7, 57.7, 57.7, 57.8, NA, 55.3, 55.2, 55, 
54.8, 54.6, 54.6, 54.4, 54.3, 54.2, 54.3, 54.2, 53.9, 53.9, 53.7, 
53.6, 53.5, 53.3, 53.2, 53.3, 53.1, 53, 52.7, 52.6, 52.6, 52.7, 
52.6, 52.5, 52.4, 52.3, 52.2, 52.2, 52, 51.7, 51.7, 51.5, 51.6, 
51.7, 51.9, 52.1, 52.2, 52.2, 52.4, 52.7, 53.1, 53.5, 53.9, 54, 
54.3, 54.3, 54.5, 54.7, 54.9, 55.3, 55.3, 55.2, 55.1, 55.4, 55.4, 
55.3, NA, -78.3, -78.5, -78.5, -78.5, -78.4, -78, -77.8, -77, 
-77.3, -77.2, -76.5, -76.4, -76, -75.7, -75.2, -74.8, -74.8, 
-74.2, -74.2, -74.1, -73.5, -73.1, -73.6, -73.8, -73.8, -74, 
-74, -74.8, -74, -74.4, -74.6, -74, -73.5, -73.2, -72.7, -72.4, 
-72.1, -71.8, -72, -72, -72.6, -72.9, -72.9, -72.8, -73, -72.6, 
-72.4, -72.9, -73.2, -72.4, -71.5, -71, -70.5, -69.8, -69.5, 
-68.9, -69.4, -69.5, -67.5, -66.6, -66.8, -66.2, -65.3, -64.6, 
-63.8, -63.5, -64, -64.5, -65.3, -66, -67, -68, -68.2, -68.6, 
-69.2, -70, -71, -72, -73, -73.5, -74.2, -74.7, -74.8, -75.7, 
-75.5, -75.6, -76.4, -77.1, -77.8, -77.8, -77.9, -78, -77.7, 
-76.8, -75.8, -75.3, -74.8, -74.2, -73.5, -72.5, -72, -71.6, 
-71, -70.5, -70.3, -70, -69, -68.9, -69.9, -70, -70, -69.5, -69.1, 
-69.8, -70, -69.9, -70.2, -70.3, -69.8, -69.7, -69.5, -69.3, 
-68.5, -69.4, -69.7, -69.5, -68.5, -67.8, -67.7, -67.3, -67.7, 
-67, -67.1, -66.8, -66, -66, -66.4, -66.9, -67.1, -67.2, -67.3, 
-67.5, -67.8, -67.7, -68.2, -68.5, -68.4, -68.7, -69.4, -69.5, 
-69, -68.2, -67.3, -66.7, -66.5, -66.5, -66.2, -66.8, -66.5, 
-66.6, -65.8, -65.8, -66, -66.2, -65.5, -65.6, -66.2, -66.8, 
-66.6, -66, -65.8, -66.6, -66.8, -66.8, -66.7, -66.4, -66.2, 
-67, -66.5, -66.2, -66.1, -66.1, -66.4, -66.7, -66.8, -66.9, 
-67, -67, -67.5, -67.7, -67.3, -67.3, -67.7, -68.3, -68.3, -68.3, 
-68.7, -68.9, -69.1, -69.3, -69.6, -70, -70.2, -70.7, -70.6, 
-71, -71.6, -71.2, -71.8, -72.5, -73, -73.5, -74.2, -74.5, -75, 
-75.6, -75.5, -76.5, -75.5, -77.9, -77.2, -77.4, -77.6, -77.9, 
-78.3, NA, -41.3, -41.4, -41.5, -40.5, -39.6, -39.2, -39, -38, 
-37.5, -38, -37.8, -37.3, -36.5, -37.2, -36.7, -36, -35.1, -34.9, 
-35, -34.4, -35.1, -35.5, -36.3, -37, -37.5, -38.5, -39, -39.4, 
-39.8, -40, -40.8, -41.3, NA, -41.3, -40.9, -41.1, -40.8, -40.5, 
-40.8, -41.4, -42, -43, -43.6, -44, -44.3, -45, -46, -46.5, -47.4, 
-47, -46.8, -46, -45, -44.3, -44, -43.9, -43.4, -43.2, -42.8, 
-42, -41.6, -41.3, NA, 63.5, 63.4, 63.8, 64.3, 65, 65.5, 65.8, 
66.1, 66.2, 66.6, 66.2, 66.2, 66.2, 66.1, 65.8, 65.6, 65.3, 66.1, 
66.4, 66.4, 66.2, 66, 66, 65.4, 65.5, 65.2, 65.1, 65, 64.8, 64.8, 
64.2, 63.8, 63.8, 63.5, NA, 46.6, 47, 47.5, 47.9, 48.7, 48.9, 
49, 48.5, 47.8, 47.3, 46.7, 47, 46.6, 46.8, 47, 47.4, 46.9, 46.5, 
46.4, 46.5, 46.7, 46.5, 46.6, NA, 46, 46, 46, 45.9, 45, 45, 45, 
44, 43, 42, 41.7, 42.5, 43.5, 44.5, 45.1, 44.8, 45.3, 45.8, 45.7, 
45.4, 44.5, 43.9, 43.7, 44.1, 44, 43, 43.4, 44, 44.7, 45.2, 44.8, 
44.5, 45.5, 45.9, 46.1, 46.2, 46.2, 46, NA, 42.9, 42.9, 42.7, 
42.7, 42.2, 42, 41.6, 41.5, 41.7, 42, 42.2, 42.7, 42.9, NA, 43.3, 
43.2, 43.5, 43.7, 44, 44.2, 44, 44, 43.9, 43.6, 43.2, 43.1, 43.3, 
43.3, NA, 70.6, 70.6, 70.6, 70.8, 71.1, 71.5, 71.4, 72.1, 72.5, 
72.7, 73.1, 73.6, 73.8, 74.2, 75, 75.2, 75.3, 76, 76.3, 76.2, 
76.6, 77, 76.8, 76.2, 76.2, 75.7, 75, 74.6, 74, 73.2, 72.5, 71.5, 
70.8, 70.6, NA, 77.9, 77.2, 77.4, 78.4, 78.6, 78, 77.4, 76.6, 
77.5, 77.7, 78.3, 78.5, 78.2, 79, 79.8, 79.8, 79.3, 80.1, 80.5, 
80.4, 80.3, 79.5, 79.4, 79.3, 78.8, 78.5, 78.3, 77.9, NA, 78.9, 
79.1, 79.6, 79.7, 80, 80.6, 81.3, 80.7, 79.9, 78.9, NA, 78.5, 
78, 78.2, 78.6, 79.5, 79, 78.5, NA, 51.6, 51.3, 50.4, 49.4, 48.6, 
48.1, 47.6, 47.7, 47.6, 47.5, 47.5, 47, 46.8, 47.2, 47.5, 47.5, 
46.8, 46.6, 47, 47.5, 47.8, 47.6, 47.7, 48, 47.5, 48.2, 48.5, 
48.9, 49.5, 49.4, 49.6, 50, 49.6, 50.5, 51.6, NA, 20.2, 20.7, 
21.1, 21.4, 22.1, 22.6, 22.4, 22.8, 23.1, 23.2, 22.9, 22.3, 22, 
22.7, 22.5, 22.1, 21.7, 21, 20.6, 20, 20.2, NA, -18, -19.3, -20.5, 
-21.5, -22.2, -23.5, -24.2, -25.2, -25.3, -25.6, -25.2, -25.1, 
-24.6, -24, -23.2, -22.6, -21.6, -21.2, -20.7, -19.5, -18.6, 
-18, -17.6, -17, -16.6, -16.2, -16.2, -15.8, -15.8, -15.6, -15.1, 
-14.6, -15, -15.1, -14.3, -14.1, -13.8, -13.5, -13.8, -13.5, 
-13.3, -13.1, -12.3, -12.5, -12.3, -12, -12.3, -12.6, -12.8, 
-13, -13.8, -14.6, -15.3, -16, -15.6, -15.3, -15.8, -16.2, -16.7, 
-17.2, -18, NA, 6, 6.1, 6.8, 7.3, 7.8, 8.1, 8.5, 9, 9.6, 9.8, 
9.6, 9.5, 9.3, 8.8, 8.5, 7.5, 6.4, 6, 6, NA, 20.2, 20.2, 19.8, 
19.7, 19.3, 19, 19.1, 19.7, 20, 20.2, NA, 18, 18, 18.2, 18.5, 
18.5, 18.2, 18, NA, 18, 18.2, 18.5, 18.5, 18.2, 17.8, 17.7, 17.8, 
17.7, 18, NA, 18.3, 18.3, 18.2, 18.3, 19, 19.2, 19.2, 19.3, 19.7, 
19.7, 19.7, 19.7, 19.7, 19.8, 19.7, 19.6, 18.7, 18.6, 18.5, 18.7, 
18.3, 18.1, 18.2, 18.2, 18.2, 17.7, 18.2, 18.3, 18.2, 18.3, NA, 
-5, -4.5, -4, -3.5, -3.5, -2.7, -2.5, -2.4, -2, -1.7, -1, -0.8, 
-0.6, -0.1, 0, -0.1, 0.1, 0.2, 0.5, 0.8, 1, 0.8, 1, 1.2, 1.2, 
1.1, 1, 0.8, 1, 1.2, 1.2, 1.3, 1.5, 1.7, 1.7, 1.5, 1.1, 0.5, 
0.3, 0.5, 0.5, 0.4, 0.5, 0.3, 0, -0.6, -1.1, -1.3, -1.3, -1.2, 
-0.8, -0.8, -0.6, -0.5, -0.6, -1.1, -0.8, -1.5, -1.8, -1.7, -2, 
-2.2, -2.2, -2.7, -3, -3.2, -3.5, -2.9, -4, -4.1, -4, -4.4, -4.5, 
-4.5, -4.8, -4.8, -4.3, -4, -3.5, -3.2, -2.7, -2.7, -3, -3.7, 
-4.6, -5.5, -5.5, -5.6, -5.5, -5.1, -5, NA, 46, 46.9, 47.2, 46.7, 
48.5, 48.9, 50.2, 51, 51.7, 51.7, 52.5, 53.4, 53.4, 53.7, 54.2, 
54.4, 54, 53, 52.4, 52, 51.7, 50, 49.2, 48.9, 48.7, 48.5, 49.2, 
49.2, 48, 47.5, 47, 46.7, 46, 46.5, 46.5, 46.5, 45.9, 46, NA, 
-6.9, -7, -7, -7.4, -7.5, -7.8, -7.8, -7.9, -8.1, -8.3, -8.3, 
-8.6, -8.8, -8.6, -8, -7.6, -7.6, -7.3, -6.9, -6.8, -6.5, -6.6, 
-6.4, -7, -6.9, -6.8, -6.8, -6.3, -6.3, -6.3, -6, -6, -6, -5.9, 
-6.3, -6.5, -6.6, -6.9, NA, -5.8, -4.5, -3.9, -3.7, -3.2, -3, 
-2.7, -2.5, -2.2, -2, -1.7, -1, -0.6, -0.3, 0, 0.3, 0.6, 0.6, 
1, 1.3, 1.6, 2, 2.2, 2.2, 2, 2.2, 2.7, 2.9, 3.4, 3.7, 4, 4.4, 
4.5, 5.3, 5.3, 5.3, 5.5, 5.5, 4.8, 4, 3.7, 3.2, 2.9, 2.4, 2.2, 
1.8, 1.7, 1.5, 0.8, 0.3, -0.3, -1, -2.2, -3.2, -4, -4.5, -5, 
-6, -5.8, -5.5, -5.5, -5.8, -5.8, NA, -8, -8.3, -8.3, -8.1, -8.1, 
-8.1, -8.6, -9.1, -9.1, -9.3, -9.1, -8.6, -8.3, -8.1, -8, -7.8, 
-7.6, -7.9, -8, -8.1, -8.6, -9, -9.3, -9.3, -9.5, -10.1, -10.3, 
-10.5, -10.6, -10.5, -10.3, -10.3, -10.1, -10.1, -9.6, -9.6, 
-9.3, -9, -8.6, -8.1, -7.9, -7.5, -7.1, -6.9, -6.6, -6.1, -5.9, 
-5.5, -5.4, -4.8, -4.3, -3.7, -3.7, -3.5, -3.2, -2.5, -2.5, -2.4, 
-1.8, -1.7, -1.5, -1.8, -2, -2.2, -2.2, -2.7, -3, -3.2, -3.4, 
-2.9, -2.5, -2.5, -2.7, -2.5, -1.7, -1.5, -1.2, -0.8, -0.6, -0.4, 
-0.5, -1, -1.2, -1.5, -1.8, -2.2, -2, -2.5, -2.4, -2.7, -2.7, 
-2.7, -2.9, -3.4, -3.5, -3.7, -4, -4, -3.7, -3.5, -3.7, -4, -4.4, 
-4.5, -4.9, -5.1, -5.4, -6, -6.6, -6.9, -7.3, -7.4, -7.4, -7.4, 
-8, NA, 66, 66.3, 66.4, 66.4, 66.5, 66.8, 67, 66.8, 66.5, 66.3, 
66.3, 66.4, 66.5, 66.1, 65.8, 65.8, 65.6, 65.5, 65.3, 64.8, 64.6, 
64.9, 65.1, 65.4, 65.5, 65.5, 65, 65, 65.3, 65.5, 65.8, 66, 65.9, 
66, 66.1, 66.3, 66, 66, 66.1, 66, 66, NA, 42, 42.5, 42.7, 43.5, 
43.9, 44, 44.2, 44.4, 44.7, 45.2, 45.5, 45.7, 45.9, 46, 46.2, 
46.5, 47, 47, 46.9, 46.7, 46.9, 47, 46.7, 46.4, 46.2, 46, 45.7, 
45.5, 45.4, 45.2, 45.4, 45.2, 45.2, 45, 44.5, 44.5, 44.5, 44.2, 
44, 43.5, 43.2, 42.9, 42.7, 41.7, 41.5, 41, 40.5, 40, 39.7, 40, 
39.5, 39.7, 39.2, 39.2, 38.9, 38, 37.2, 36.7, 36.7, 36.5, 36.7, 
37, 37.4, 37.5, 38.2, 39.2, 39.2, 38.9, 39.2, 39.4, 39.7, 40.2, 
40.4, 40.2, 40.4, 40.5, 40.7, 41, 41.7, 42, NA, 45, 45.2, 45.4, 
45.5, 45.5, 45.7, 45.7, 46, 46.2, 46.2, 46.4, 46.5, 46.7, 46.7, 
46.7, 46.7, 46.5, 46.5, 46.7, 46.5, 46.5, 46.5, 46.7, 46.7, 46.7, 
46.5, 46.4, 46.2, 46.2, 46.5, 46.5, 46.5, 46.4, 46, 46, 45.5, 
45.4, 45, 45, NA, 40.7, 40.9, 41.4, 41.7, 42, 42, 41.7, 41.2, 
41, 40.7, 40.7, 40.5, 40.7, 40.7, NA, 51.7, 51.9, 52.5, 53, 53.5, 
54.4, 55, 55.5, 55.7, 54.2, 53.9, 53, 52.7, 52.4, 52.4, 51.9, 
51.5, 51.5, 51.7, NA, 44, 44.2, 44.7, 45.2, 45.9, 45.9, 46, 45.9, 
45.7, 46.2, 46, 46.2, 46.7, 46.5, 46.7, 46.5, 46.7, 46.7, 46.7, 
46.5, 46, 45.5, 45.2, 45, 45, 44.5, 43.5, 43.5, 43.4, 43.5, 43.7, 
43.7, 43.9, 43.7, 44, NA, -40.7, -41, -41.2, -41, -40.9, -40.7, 
-41.5, -42, -42.7, -43.2, -42.7, -43, -43.5, -43.5, -43.5, -43.2, 
-42.5, -41.7, -41, -40.7, NA, 60.7, 60.9, 61, 61, 61.5, 61.4, 
62, 62.4, 62.5, 62.7, 62.5, 62.5, 62.7, 62.7, 62.7, 62.9, 62.7, 
62.5, 62.2, 62, 62.2, 62.5, 62.7, 62.5, 62.5, 62.2, 61.9, 61.7, 
61.2, 61, 60.7, NA)), .Names = c("x", "y"))
"xline" <-
function (x, ...) 
{
    abline(v = x, ...)
}
"yline" <-
function (y, ...) 
{
    abline(h = y, ...)
}
".First.lib" <-
function (lib, pkg) 
{library.dynam("fields",pkg, lib)
cat("fields is loaded use help(fields) for an overview of this library", 
fill=T)
}
