Repository navigation
firePixelsByYear checks the raster geometry; stopIfNonForestCannotBeYoung shared - #239
Merged
Merged
Conversation
…nForestCannotBeYoung moves here from fireSense_dataPrepFit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
…nce table and for clearing fuel on young pixels Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development #239 +/- ##
===============================================
+ Coverage 93.49% 93.52% +0.02%
===============================================
Files 67 67
Lines 5242 5265 +23
===============================================
+ Hits 4901 4924 +23
Misses 341 341 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eliotmcintire
added a commit
that referenced
this pull request
Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four small shared helpers so the spread fit and its hindcasts treat "recently burned" land in the same way. No change to any result.
Affects: nothing for users now; the data-preparation modules (the fit and the hindcast) call these instead of each keeping a copy.
Technical details
firePixelsByYear(fireRaster =, template =)now stops when the raster and template differ in geometry (R/timeSinceDisturbance.R);fireSense_dataPrepFithad that check in its ownallFirePixelsByYear(), andfireSense_dataPrepPredictneeds it too.firePixelsByYear()already prefersfireRasteroverfirePolys, so it is also the one place that picks the fire source.stopIfNonForestCannotBeYoung()moves here fromfireSense_dataPrepFit(R/youngAge.R):nonForestCanBeYoungAge = FALSEis unsupported, and the hindcast now follows the fit. NewtsdTable()(thepixelID/tsdtableyoungAgeAtYear()reads) replaces three copies (prepare_FuelCovsCoarseByYear(),fireSense_dataPrepFitaddAnnualYoungAge(),fireSense_dataPrepPredict). NewclearYoungAge()is the rule that clears fuel (tologMinB(0)), non-forest land cover and treed wetland whereyoungAgeis 1, taken out ofprepare_FuelCovsCoarseByYear(); the hindcast's spread covariates call it, becausefireSense_spreadPredictclears fuel only for a linear-fuel fit (fireSense_spreadPredict.R:512-516,fuelColsis empty for a log-scale fit).Reuses:
firePixelsByYear()(generalised in place, with the fit's geometry check); new:stopIfNonForestCannotBeYoung()(moved),tsdTable()(the table was built three times),clearYoungAge()(moved out ofprepare_FuelCovsCoarseByYear(); the hindcast needs the same rule).Tests (
test-youngAgeAtYear.R): geometry mismatch stops; raster used when both given; the stop function;tsdTable();clearYoungAge().R CMD check --no-manual(scratch library,rcmdcheck, tests and vignettes run): 0 errors, 0 warnings, 2 notes (.gitin the worktree,objFunInnerglobals, both already in the base).Used by PredictiveEcology/fireSense_dataPrepFit and PredictiveEcology/fireSense_dataPrepPredict#46. The version bump follows the merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_014G18Mik3fH4z5M5CyMSUS6