Skip to content

Conversation

@brandynlucca
Copy link
Collaborator

This includes the post-processing performed on the kriged mesh population estimates, which achieves the following steps:

  • Convert mesh biomass to NASC
  • Distribute the kriged estimates over a grid (e.g. age-vs-length for each sex)
  • Standardize the unaged distributions to be distributed across age as well with optional imputation
  • Combine the aged and unaged tables into one single table
  • Redistribute values in the distribution based on some defined criteria, such as excluding age-1 fish

This PR also includes a function for removing specimen-specific haul numbers from the catch data. This avoids incidentally double-counting haul weights where an entire haul's catch was represented in the specimen station dataset and not binned length station data.

All functions are accompanied by corresponding pytest functions and fixtures. coverage clocks in with 92%, with all misses pointing to interspersed validation lines that raise Errors (e.g. missing columns) that were retained from earlier debugging.

brandynlucca and others added 28 commits July 10, 2025 15:43
@brandynlucca brandynlucca self-assigned this Jul 23, 2025
Copy link
Member

@leewujung leewujung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brandynlucca : Thanks for the PR. I added a few comments. I read through the code for some of the functions, but not all.

Two of my comments are about the function names - IMHO these two functions have limited use case and can be renamed to reflect the operations they are designed to do:

  • standardize_kriged_estimates distributes unaged estimates to aged estimates according to previously calculated aged proportions
  • combine_population_tables: combined aged and distributed unaged and already aged estimates.

I've also made notes in #369 re changing these to use xarray dataset/data variables operations.

Other than these and my other small questions, I think this PR is ready to be merged.

@brandynlucca brandynlucca merged commit cf3196e into OSOceanAcoustics:main Sep 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants