Last data update: 2014.03.03

R: Get configuration of a light cone (LC)
get_LC_configR Documentation

Get configuration of a light cone (LC)

Description

get_LC_config obtains the PLC or FLC at a particular (mathbf{r}, t) from a (N+1)D field based on the LC template from compute_LC_coordinates (or setup_LC_geometry).

Usage

get_LC_config(coord, field, LC.coordinates)

Arguments

coord

space-time coordinate (mathbf{r}, t)

field

spatio-temporal field; either a matrix or a 3-dimensional array with time t as the first coord, and the spatial coords in order. Make sure to see also compute_LC_coordinates for correct formatting.

LC.coordinates

template coords for the LC

See Also

compute_LC_coordinates

Examples

AA <- matrix(rnorm(40), ncol = 5)
image2(AA)
LCind <- compute_LC_coordinates(speed = 1, horizon = 1, shape = "cone")
AA
get_LC_config(cbind(5, 2), AA, LCind)
# a time series example
data(nhtemp)
xx <- c(nhtemp)
LCind <- compute_LC_coordinates(speed = 1, horizon = 4, shape = "cone", space.dim = 0)
cc <- get_LC_config(6, xx, LCind)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LICORS)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LICORS/get_LC_config.Rd_%03d_medium.png", width=480, height=480)
> ### Name: get_LC_config
> ### Title: Get configuration of a light cone (LC)
> ### Aliases: get_LC_config
> ### Keywords: method utilities
> 
> ### ** Examples
> 
> AA <- matrix(rnorm(40), ncol = 5)
> image2(AA)
> LCind <- compute_LC_coordinates(speed = 1, horizon = 1, shape = "cone")
> AA
            [,1]        [,2]        [,3]        [,4]       [,5]
[1,] -0.62926220  1.23380286 -0.46215729  1.03857352 -1.0480172
[2,] -0.51061997 -0.53590737  0.14673755 -0.07962702  0.5317261
[3,]  0.17953791  1.59426648 -0.05073597 -0.42959528 -0.6057971
[4,]  0.13979016 -1.59186704  1.22657943 -1.24102994  0.9353591
[5,]  0.41937528  0.01382195 -1.00264976 -2.28030709 -0.1397670
[6,]  0.67954740  2.04963057  1.29012784 -0.63947875 -0.8188177
[7,] -1.14344457 -2.03325770 -0.06635335 -0.72170803 -0.5460171
[8,] -0.06611785 -1.21338306 -0.44629492  1.56576462  0.3182160
> get_LC_config(cbind(5, 2), AA, LCind)
           [,1]
[1,]  0.1397902
[2,] -1.5918670
[3,]  1.2265794
> # a time series example
> data(nhtemp)
> xx <- c(nhtemp)
> LCind <- compute_LC_coordinates(speed = 1, horizon = 4, shape = "cone", space.dim = 0)
> cc <- get_LC_config(6, xx, LCind)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>