Never let youngAge match its own mutuallyExclusiveCols pattern - #46
Merged
Merged
Conversation
…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
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.
spreadFitPrep()(fireSense_SpreadFit.R:519-526) appended every non-annual covariate name to youngAge's ownmutuallyExclusiveColsentry, 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 asnfLCC_*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 insidemakeMutuallyExclusive()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 ondevelopmentand passes here.SpaDES.core::convertToPackage()+testthat::test_local(): 148 tests / 499 expectations pass ondevelopment, 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