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

Dolfyn cleaning function updates #354

Merged
merged 28 commits into from
Nov 27, 2024

Conversation

jmcvey3
Copy link
Contributor

@jmcvey3 jmcvey3 commented Sep 18, 2024

Renames and makes the functions that calculate water depth and remove surface interference more robust. The functions were designed around Nortek ADCPs but didn't take into account the calculations RDI already does. Errors or warnings will guide the user through the proper use of functions if previous calculations were already completed or data is missing.

Also removes the "ignore rankwarning" as some users may not want to do so, and updates future package deprecations.

Solves the problems Calum and I found in Issue #353. Tests were updated as appropriate.

Also added some fixes for determining beam angle and carrier frequency attributes for Sentinel V ADCPs.

@ssolson ssolson mentioned this pull request Oct 28, 2024
@ssolson ssolson self-requested a review October 29, 2024 20:10
@ssolson ssolson added the Clean Up Improve code consistency and readability label Oct 29, 2024
@ssolson
Copy link
Contributor

ssolson commented Oct 29, 2024

@jmcvey3 is this ready for review?

@ssolson ssolson linked an issue Oct 29, 2024 that may be closed by this pull request
@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Oct 29, 2024

@jmcvey3 is this ready for review?

It is. I've also done some serious reorganizing of the I/O files in an attempt to make them easier to follow, and have added a few random fixes for random hiccups. The fix for 535 is in the first couple commits.

@ssolson
Copy link
Contributor

ssolson commented Oct 30, 2024

Thanks James. I plan to tackle this Monday.

Copy link
Contributor

@ssolson ssolson left a comment

Choose a reason for hiding this comment

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

@jmcvey3 thanks for fixing the bug and improving the modularity of the dolfyn module.

I was adding docstrings to what I thought were new functions but realized they were primarily moved functions in our meeting yesterday. As such I will finish improving docstrings when we get to linting this module in the future.

That said could you review the proposed docstrings I already did?

mhkit/dolfyn/adp/clean.py Outdated Show resolved Hide resolved
mhkit/dolfyn/adp/clean.py Outdated Show resolved Hide resolved
mhkit/dolfyn/adp/clean.py Outdated Show resolved Hide resolved
mhkit/dolfyn/adp/clean.py Outdated Show resolved Hide resolved
mhkit/dolfyn/adp/clean.py Outdated Show resolved Hide resolved
mhkit/dolfyn/io/rdi.py Outdated Show resolved Hide resolved
mhkit/dolfyn/io/rdi.py Outdated Show resolved Hide resolved
mhkit/dolfyn/io/rdi.py Outdated Show resolved Hide resolved
mhkit/dolfyn/io/rdi.py Outdated Show resolved Hide resolved
mhkit/dolfyn/io/rdi.py Outdated Show resolved Hide resolved
@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Nov 14, 2024

@jmcvey3 thanks for fixing the bug and improving the modularity of the dolfyn module.

I was adding docstrings to what I thought were new functions but realized they were primarily moved functions in our meeting yesterday. As such I will finish improving docstrings when we get to linting this module in the future.

That said could you review the proposed docstrings I already did?

Yep, and sounds like a plan

@jmcvey3
Copy link
Contributor Author

jmcvey3 commented Nov 20, 2024

@ssolson Did you want me to update certain files with docstrings and typehints in this PR, or shall we merge this one as is and do so in another?

@akeeste
Copy link
Contributor

akeeste commented Nov 26, 2024

@ssolson looks like the typer import is throwing an error as it is not an explicit dependency of mhkit. Should this package be included via one of our other dependencies or called out explicitly?

#360 will resolve the DeprecationWarnings

@ssolson
Copy link
Contributor

ssolson commented Nov 26, 2024

@ssolson looks like the typer import is throwing an error as it is not an explicit dependency of mhkit. Should this package be included via one of our other dependencies or called out explicitly?

#360 will resolve the DeprecationWarnings

No it should be typing and in default python I pushed a fix.

@ssolson ssolson merged commit 79f69ca into MHKiT-Software:develop Nov 27, 2024
43 checks passed
@ssolson ssolson mentioned this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Up Improve code consistency and readability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error from api.clean.find_surface_from_P(ds, salinity=XX)
3 participants