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

Use and enforce Astropy compliant units #59

Merged
merged 2 commits into from May 10, 2016
Merged

Use and enforce Astropy compliant units #59

merged 2 commits into from May 10, 2016

Conversation

pschella
Copy link

@pschella pschella commented May 5, 2016

No description provided.

@pschella pschella changed the title Tickets/dm 5642 Tickets/dm 5642 use and enforce AstroPy-compliant strings for units in afw.table May 5, 2016
"saturation value, in ADU",
"ADU");
"saturation value",
"adu");
Copy link
Member

Choose a reason for hiding this comment

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

As I just posted on the RFC, I don't think we want to use adu in some places and count in others, since they mean the same thing. But I'm not sure which is preferred.

(I'm aware this was a preexisting inconsistency, but I'd like to address it on this issue).

@pschella pschella changed the title Tickets/dm 5642 use and enforce AstroPy-compliant strings for units in afw.table Use and enforce Astropy compliant units May 9, 2016
Pim Schellart added 2 commits May 10, 2016 17:05
The Schema.addField method now first attempts to construct
an astropy.units.Unit object from the provided unit string.
This will raise a ValueError if the string is non-compliant.
The optional keyword argument parse_strict from
astropy.units.Unit is also added to addField.
It has three levels: 'raise' (default), 'warn' and 'silent'.
The latter causes any unit string to be accepted.
Also add Schema.checkUnits to allow a full Shema to be validated.
@pschella pschella merged commit 7c15dd3 into master May 10, 2016
@ktlim ktlim deleted the tickets/DM-5642 branch August 25, 2018 06:44
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.

None yet

2 participants