inlabru-org / inlabru

inlabru
https://inlabru-org.github.io/inlabru/
76 stars 21 forks source link

Expand *_layer to allow dynamic layer selection #98

Closed finnlindgren closed 1 year ago

finnlindgren commented 3 years ago

To handle space-time covariates where each timepoint is stored in a layer, should let main_layer take an expression of inputs that computes a vector of layer indices. The internal spatial grid/raster evaluator would then need to use this when extracting information.

finnlindgren commented 3 years ago

Alternatively, replace the current special handling with an evaluator function that could be called as comp(evaluator(covariate_object, cbind(x,y), timepoint), ...). With this approach, future enhancements wouldn't require changing the available component() arguments, but could instead just provide new/different evaluators.

finnlindgren commented 1 year ago

This has been implemented via the eval_spatial generic.