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

better units argument converter #17

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

nstarman
Copy link
Contributor

@nstarman nstarman commented Dec 8, 2023

Using a singledispatch we can easily support any reasonable argument to the units field of a Potential. I built in UnitSystem, None, and the pre-defined unit-system names. But we could add Enums (for the pre-defined), a dictionary -> UnitSystem with full registration. Pretty much anything.

Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
@nstarman nstarman merged commit 283e530 into GalacticDynamics:main Dec 8, 2023
8 checks passed
@nstarman nstarman deleted the usys_converter branch December 8, 2023 16:16
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.

1 participant