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

Fix for slocums, to interpolate over gaps smaller than 'maxgap' #149

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

hvdosser
Copy link
Collaborator

A new function find_gaps has been added to utils.py, which identified gaps in scientific variables, and fills any gaps longer than the user-specified parameter maxgap with nans.

A new function `find_gaps` has been added to utils.py, which
identified gaps in scientific variables, and fills those gaps
longer than the user-specified paramter `maxgap` with nans.
@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.14 🎉

Comparison is base (676712c) 79.47% compared to head (9b2a757) 79.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   79.47%   79.62%   +0.14%     
==========================================
  Files           7        7              
  Lines        1364     1374      +10     
==========================================
+ Hits         1084     1094      +10     
  Misses        280      280              
Impacted Files Coverage Δ
pyglider/slocum.py 75.00% <100.00%> (+0.13%) ⬆️
pyglider/utils.py 68.38% <100.00%> (+0.83%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

try:
tg_ind = utils.find_gaps(_t,time,maxgap)
val[tg_ind] = np.nan
except ValueError:
Copy link
Member

Choose a reason for hiding this comment

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

Did you hit this exception? Why? A print statement probably is wrong. Either warm or log.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I never hit the exception, and the print statement should've been removed after testing. I've done that now. Thanks!

@jklymak jklymak merged commit 747863f into c-proof:main Apr 19, 2023
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.

2 participants