Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weight threshold option for temporal operations #683

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Jul 30, 2024

Description

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

If applicable:

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass with my changes (locally and CI/CD build)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

@tomvothecoder tomvothecoder added the type: enhancement New enhancement request label Jul 30, 2024
@tomvothecoder tomvothecoder self-assigned this Jul 30, 2024
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (753a046) to head (b44d0d5).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #683   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1546      1565   +19     
=========================================
+ Hits          1546      1565   +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

xcdat/utils.py Outdated
Comment on lines 143 to 147
This function is useful for cases where the weighting of data might be
skewed based on the availability of data. For example, if one season in a
time series has more significantly more missing data than other seasons, it
can result in inaccurate calculations of climatologies. Masking values that
do not meet the minimum weight threshold ensures more accurate calculations.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this an accurate description?

xcdat/utils.py Outdated Show resolved Hide resolved
xcdat/temporal.py Outdated Show resolved Hide resolved
- This method now masks data using the weights grouped properly, instead of using the `weight_var_with_weight_threshold()` function
- Add `from __future__ import annotations` to `spatial.py`
- Add and update units
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

1 participant