Skip to content

Conversation

@brandynlucca
Copy link
Collaborator

@brandynlucca brandynlucca commented Aug 4, 2025

This PR includes:

  • Refactored function for partitioning overall NASC/abundance/biomass and specific groups (e.g. sex) based on proportions calculated for age-1 fish per stratum
  • Minor update to the stratum averaging function to ensure index names are retained
  • New functions that appropriately compute not only abundance/biomass but also divvying them up by defined groups, e.g. sex, age
  • Test, fixtures, and docstrings for all new functions

This PR overlaps with #355. This was done for easier downstream testing to make sure that there were no ill effects from the updated code.

brandynlucca and others added 30 commits July 10, 2025 15:43
@brandynlucca
Copy link
Collaborator Author

This integrates responses to suggested edits and comments from #355 with those specific to this open PR.

Relevant changes:

  • transect.set_interval_distance -> utils.compute_interval_distance [efa5d9]
  • Change number_proportions argument for get_proportions.get_weight_proportions_slice to require a Dict[str, pandas.DataFrame] [2a5358]
  • Add exclude_filter as an argument to all get_*_proportions_slice functions [63501b]
  • New functions for converting number densities to abundance/biomass, and partitioning values based on the age-1 (or whatever other group) slices [e6d3e9], [4a2450], [925e70]
  • Removed set_population_metrics as this was deprecated by biology.set_abundance and biology.set_biomass [f13c2e]
  • biology.set_abundance/biology.set_biomass -> biology.compute_abundance/biology.compute_biomass [576665]
  • Incorporated suggested function docstring changes [de27de], [78a3b8], [d76889], [4b9aa1], [8571e2]
  • Updates to feat_hake.py to reflect incorporated changes [cfc56e]

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.

I made a few inline comments that require some changes, but I think this PR is ready to be merged once those are addressed.

I made a note in #369 (comment) for incorporating xarray ND representation that will make the calculations more straightforward for the various slicing operations.

brandynlucca and others added 16 commits September 16, 2025 10:10
@brandynlucca brandynlucca merged commit 1f63b41 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

None yet

Development

Successfully merging this pull request may close these issues.

Add age-1 removal to all processing stages

2 participants