Skip to content

Never let youngAge match its own mutuallyExclusiveCols pattern - #46

Merged
eliotmcintire merged 2 commits into
developmentfrom
fix/youngage-exclusivity
Sep 28, 2026
Merged

eliotmcintire merged 2 commits into
developmentfrom
fix/youngage-exclusivity

Conversation

@eliotmcintire

Copy link
Copy Markdown
Collaborator

spreadFitPrep() (fireSense_SpreadFit.R:519-526) appended every non-annual covariate name to youngAge's own mutuallyExclusiveCols entry, including "youngAge" itself when youngAge is a non-annual column, which is true for some ELFs (e.g. 14.3, 14.4). fireSenseUtils::makeMutuallyExclusive() then zeroed youngAge on young pixels instead of leaving it at 1, and once zeroed, later columns such as nfLCC_* were left un-zeroed because the function re-derived "which rows are young" from the now-zeroed column.

youngAge is now excluded from its own pattern list before it is appended. This requires fireSenseUtils@development (>= 0.2.3.9047) (PredictiveEcology/fireSenseUtils#92), which fixes the matching root cause inside makeMutuallyExclusive() itself.

A new test builds the toy fixture with youngAge as a non-annual column (the existing fixture only ever had it annual, which is why this was never caught) and checks youngAge stays 1 on young pixels through spreadFitPrep() and the objective's covariate path. It fails on development and passes here. SpaDES.core::convertToPackage() + testthat::test_local(): 148 tests / 499 expectations pass on development, 150 tests / 505 expectations pass on this branch, 0 failures either way. Version bumped to 1.0.6.9019.

Merge PredictiveEcology/fireSenseUtils#92 first.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv

…ols pattern list

fireSense_SpreadFit.R:519-526 appended every non-annual covariate name to youngAge's own
mutuallyExclusiveCols entry, including "youngAge" itself when youngAge is a non-annual column
(true for some ELFs). fireSenseUtils::makeMutuallyExclusive() then zeroed youngAge on young
pixels instead of leaving it at 1, and left later columns (e.g. nfLCC_*) un-zeroed. youngAge is
now excluded from its own pattern list.

Requires fireSenseUtils@development (>= 0.2.3.9047), which fixes the same root cause inside
makeMutuallyExclusive() (PredictiveEcology/fireSenseUtils#92).

Version 1.0.6.9019.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
fireSenseUtils#92 landed as 0.2.3.9048 (development moved to 0.2.3.9047 via a concurrent PR
first), so the floor here follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CwcjqqK59FmTJscyi7xUqv
@eliotmcintire
eliotmcintire merged commit 1cf44e5 into development Sep 28, 2026
7 of 11 checks passed
@eliotmcintire
eliotmcintire deleted the fix/youngage-exclusivity branch September 28, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant