Repository navigation
Ledger row records each fuel's median non-zero value and sd - #144
Merged
Merged
Conversation
… (covMedianNonZero_spread, covSD_spread) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
…ovSD_spread Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
… is merged and bumped) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
eliotmcintire
added a commit
that referenced
this pull request
Nov 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
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.
The spread fit now also saves, for each fuel, how much of it is typically present where it occurs. With that, the ELF map can show how much each fuel changes the chance of fire spread, in the same units for every fuel.
Affects: new spread-fit ledger rows get two extra columns for fits that have fuel terms. Existing columns, fits and results are unchanged, and older rows still read.
Technical details
Defect: the ledger row (
R/spreadFitLedgerRow.R) kept the covariate centres (covCentre_spread) but nothing about the size of the fuel covariates, so no one could turn a fuel coefficient into an effect from the row alone.Fix: after
covCentre_spreadis computed (fireSense_spreadFit.R,spreadFitPrep),fireSenseUtils::spreadCovStats()gives the centres and the median non-zero value and sd of each fuel covariate, in one pass, (dom_agb_*,sec_agb_*,treedWetland_agb), on the same scale as the centres. They are new outputscovMedianNonZero_spreadandcovSD_spreadand are written to the row ascovMedianNonZero_spreadandcovSD_spread, exactly as the centres are (only when notNULL, so a fit with no fuel term writes none).reqdPkgsfloor is fireSenseUtils >= 0.2.3.9191, the version after fireSenseUtils#260 merges (to be confirmed when it merges). Old rows without the columns read as before (an unrelated column is alreadyNAwhen rows are bound, ascovCentre_spreadis for 7 of the 50 current rows).Reuses:
fireSenseUtils::spreadCovStats()(new in #260, built on the loop ofspreadCovMeans()thatspreadCovCentre()uses), thecovCentre_spreadoutput/column pattern,mecandmod$covsX1000as for the centre; new: no function in this module (the calculation lives in fireSenseUtils, where the median and sd needed one place with the centre's scale).Tests (
test-fuelSummary.R, 3 new;test-metadata.Rupdated): the stored median and sd equal a hand calculation on the toy data (fuel cleared on young pixels, as in the fit), the row carries both andfireSenseUtils::spreadFuelEffect()reads it, a fit with no fuel term writes none, the outputs are declared. Module suite viaconvertToPackage()+test_local()(fireSenseUtils from the #260 branch, scratch library): branch 317 tests, 0 failed, 0 errors, 0 skipped (1484 expectations); base with the same new tests: 3 tests fail (7 expectations), the rest pass.Version note: fireSenseUtils#261 is merged and development is 0.2.3.9190, so #260 becomes 0.2.3.9191 when merged. The floors in fireSense_spreadFit#144 and fireSense_spreadPredict#52 name 9191 as a placeholder until then.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh