-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add WCS.preserve_units property #18465
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
base: main
Are you sure you want to change the base?
Conversation
… is preserving the original units from the header or set programmatically, or whether some units may have been converted to SI or degrees
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
Do you want to at least amend the original change log to mention this new property? |
If `True`, units are always kept as specified, whereas is `False`, some | ||
units may in some cases be converted to SI or degrees. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't commit suggested change - it is for illustration only but I would prefer a little bit mode details (for the users) on what this does.
If `True`, units are always kept as specified, whereas is `False`, some | |
units may in some cases be converted to SI or degrees. | |
If `True`, units are always kept as specified in/by header's CUNIT keywords, whereas is `False`, some | |
units may in some cases (excluding -TAB axes type) be converted to SI or degrees. |
"some units in some cases" sounds vague.
@@ -424,10 +424,12 @@ def __init__( | |||
fix=True, | |||
translate_units="", | |||
_do_set=True, | |||
preserve_units=False, | |||
preserve_units=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why None
?
This indicates whether the WCS class is preserving the original units from the header or set programmatically, or whether some units may have been converted to SI or degrees. Not adding a changelog entry since this just affects a feature added in dev.