Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fireSense_dataPrepPredict.R
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ spreadParamsRowUnusable <- function(row, fuelClassCol) {
#' The ledger rows to predict with: the simulated ELF's, then the neighbours that can be blended
#'
#' @param sa `sim$studyAreaWithSpreadParams`.
#' @param ownELF character; the simulated ELF (`sim$.ELFind`), or ELFs: over a `studyAreaLarge`,
#' @param ownELF character; the simulated ELF (`sim$.ELFind`), or ELFs: over a `studyArea_fireSense`,
#' `fireSense_ELFs` makes `.ELFind` all the ELFs it covers, and each keeps its row.
#' @param blend logical; the `blendNeighbourELFs` parameter.
#' @param placeableELFs character; the ELFs `sim$rasterToMatchLargeELF` labels (see [ELFlabels()]).
Expand All @@ -894,7 +894,7 @@ selectSpreadParamRows <- function(sa, ownELF, blend, placeableELFs, fuelInputELF
stop("fireSense_dataPrepPredict: sim$studyAreaWithSpreadParams has no row for the simulated ELF ", ownELF,
" (sim$.ELFind); it has ", paste(ids, collapse = ", "), ". Fit ELF ", ownELF, " first.", call. = FALSE)
}
## one row per simulated ELF; was `own[1]`, which kept only the first of several (a studyAreaLarge)
## one row per simulated ELF; was `own[1]`, which kept only the first of several (a studyArea_fireSense)
own <- own[!duplicated(ids[own])]
keep <- integer(0)
if (isTRUE(blend)) {
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-ownELFRows.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ test_that("a missing own row stops with a message naming the ELF", {
"13\\.1")
})

## Over a studyAreaLarge, fireSense_ELFs makes `.ELFind` every ELF it covers; `which(ids == ownELF)` then
## Over a studyArea_fireSense, fireSense_ELFs makes `.ELFind` every ELF it covers; `which(ids == ownELF)` then
## recycled the vector and kept the first ELF only (2026-11-02).
test_that("several simulated ELFs (.ELFind of a studyAreaLarge) each keep their row, neighbours as before", {
test_that("several simulated ELFs (.ELFind of a studyArea_fireSense) each keep their row, neighbours as before", {
sel <- function(own, blend) selectSpreadParamRows(threeRows(), ownELF = own, blend = blend,
placeableELFs = c("4.2.2", "13.1", "14.3"),
fuelInputELFs = c("4.2.2", "13.1", "14.3"),
Expand Down
Loading