Skip to content

Commit

Permalink
Compute vmap
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardlavender committed Oct 23, 2024
1 parent 326f4fd commit e780a40
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion analyses/patter-02_exploration.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ library(tictoc)
dv::src()

#### Load data
# map <- terra::rast(here_input("map.tif"))
map <- terra::rast(here_input("map.tif"))
map_len <- qs::qread(here_input("map_len.qs"))
start <- qs::qread(here_input("start.qs"))
paths <- qs::qread(here_input("paths.qs"))
Expand Down Expand Up @@ -102,6 +102,10 @@ curve(dgamma(x, shape = step_shape, scale = step_scale),
lwd = 3, add = TRUE)
toc()

#### Compute validity map from mobility
vmap <- patter:::spatVmap(.map = map, .mobility = mobility, .plot = TRUE)
terra::writeRaster(vmap, here_input("vmap.tif"), overwrite = TRUE)

#### Examine turning angles
# This is a quick way of generating an approximately suitable model across all individuals
angles <- paths_metrics$angle[!is.na(paths_metrics$angle)]
Expand Down

0 comments on commit e780a40

Please sign in to comment.