Iterate over (N+1)D field and get all LC configurations
data2LCs
gets all PLC or FLC configuration from a
(N+1)D field given the LC template. The shape and
dimension of this LC template depends on coordinates
passed on by setup_LC_geometry
.
Since data2LCs
passes the LC.coordinates
array to get_LC_config
to iterate over the
entire dataset, this functional programming approach
allows user-defined light cone shapes (independent of the
shapes implemented by setup_LC_geometry
).
Just replace the $coordinates
from the "LC"
class with a user-specified LC template.
data2LCs(field, LC.coordinates = list(PLC = NULL, FLC = NULL))
field |
spatio-temporal field; either a matrix or a
3-dimensional array with time t as the first
dimension, and the spatial coordinates as subsequent
dimensions. Make sure to check
|
LC.coordinates |
coordinates for LC shape and
dimension (usually the |
set.seed(1) AA <- matrix(rnorm(200), ncol = 10) LC_geom <- setup_LC_geometry(speed = 1, horizon = list(PLC = 2, FLC = 0), shape = "cone") bb <- data2LCs(t(AA), LC.coordinates = LC_geom$coordinates) image2(bb$PLC) plot(density(bb$FLC)) # a time series example data(nottem) xx <- nottem LC_geom <- setup_LC_geometry(speed = 1, horizon = list(PLC = 24, FLC = 3), space.dim = 0) bb <- data2LCs(xx, LC.coordinates = LC_geom$coordinates) image2(bb$PLC) plot(density(bb$FLC))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.