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

modify to add capability to read both Ginan and Bernese troposphere .… #34

Merged
merged 4 commits into from
Jul 29, 2024

Conversation

umma-zannat
Copy link
Collaborator

to support both Ginan and Bernese tropospheric files (.tro files)

Copy link
Collaborator

@ronaldmaj ronaldmaj left a comment

Choose a reason for hiding this comment

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

Looks like some good changes coming in here to expand .tro reading

  • Do you have example .tro files we can test the new function on?

@umma-zannat
Copy link
Collaborator Author

The other format for troposhere is cost file. .tro file is basically a sinex formatted file.

Copy link
Collaborator

@ronaldmaj ronaldmaj left a comment

Choose a reason for hiding this comment

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

Again, looks good, couple docstrings that need to be finished off, but I think once you've got the unittests that Seb suggested in, this should be good to go

@@ -9,41 +9,70 @@
from .. import gn_io as _gn_io


def _read_tro_solution(path: str, recenter: bool = True) -> _pd.DataFrame:
def _read_tro_solution(path: str, recenter: bool = True, trop_mode="Ginan") -> _pd.DataFrame:
"""For backwards compatibility"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

Docstring should be one-line sphinx (missing the description of input parameters, errors raise, what's returned, etc.: :param :return)
https://github.com/NilsJPWerner/autoDocstring/blob/master/docs/one-line-sphinx.md

Copy link
Collaborator

Choose a reason for hiding this comment

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

This function is up for deletion if no one uses it (as there is the read_tro_solution function below this

return read_tro_solution(path, recenter=recenter, trop_mode=trop_mode)


def read_tro_solution(path: str, recenter: bool = True, trop_mode="Ginan") -> _pd.DataFrame:
"""Parses tro snx file into a dataframe.
Copy link
Collaborator

Choose a reason for hiding this comment

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

One-line sphinx docstring (missing the description of input parameters, errors raise, what's returned, etc.: :param :return)

Copy link
Collaborator

@ronaldmaj ronaldmaj left a comment

Choose a reason for hiding this comment

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

Thanks heaps for putting through the docstring additions 🙏

I've noticed you now have two read_tro_solution functions - is this intentional?
There is _read_tro_solution and read_tro_solution

@umma-zannat
Copy link
Collaborator Author

If no one uses the function with underscore I can delete it. I personally prefer not to use underscore.

Copy link
Collaborator

@ronaldmaj ronaldmaj left a comment

Choose a reason for hiding this comment

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

Unit tests are a great addition - can use that instead of testing manually. Happy for this to go in 👍

@ronaldmaj ronaldmaj merged commit 6d54062 into main Jul 29, 2024
1 check passed
@ronaldmaj ronaldmaj deleted the jami/trop branch July 29, 2024 02:26
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.

3 participants