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 checks for ellipsoid parameters #45

Merged
merged 6 commits into from
Oct 7, 2020
Merged

Add checks for ellipsoid parameters #45

merged 6 commits into from
Oct 7, 2020

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Jul 28, 2020

Add methods for validating ellipsoid parameters. Raise error if flattening is
equal to zero, but raise warning if it's lower than 1e-7. Raise error if
flattening is negative or greater than 1. Raise error if semimajor axis is not
positive. Raise warning if GM constant is negative. Add tests functions for new
features.

Fixes #43

Reminders:

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst and the base __init__.py file for the package.
  • Write detailed docstrings for all functions/classes/methods. It often helps to design better code if you write the docstrings first.
  • If adding new functionality, add an example to the docstring, gallery, and/or tutorials.
  • Add your full name, affiliation, and ORCID (optional) to the AUTHORS.md file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.

@santisoler santisoler requested a review from leouieda July 28, 2020 15:44
@santisoler santisoler mentioned this pull request Jul 28, 2020
6 tasks
@santisoler
Copy link
Member Author

As discussed on #42 , we should decide if we should raise an error when passing a zero flattening or not.
We agreed that if flattening is tiny we should not raise an error, but a warning instead.

@santisoler
Copy link
Member Author

We have agreed to raise an error if flattening == 0, but only warn if flattening < 1e-7.

@santisoler santisoler merged commit cb765c8 into master Oct 7, 2020
@santisoler santisoler deleted the check-params branch October 7, 2020 17:55
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.

Check if Ellipsoid parameters are valid
1 participant