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

caom2 objects should use Quantities #114

Open
ijiraq opened this issue Oct 12, 2019 · 0 comments
Open

caom2 objects should use Quantities #114

ijiraq opened this issue Oct 12, 2019 · 0 comments

Comments

@ijiraq
Copy link
Collaborator

ijiraq commented Oct 12, 2019

Making use of astropy.units would add tremendous power to caom2

this extra power is worth the burden of astropy as a dependency (it already is anyhow, implicitly)

caom2.plane.Energy(bounds=[lower_frequencyunits.GHz, upper_frequencyunits.GHz])

and then Energy uses those values as lower_frequency.to(units.m).value when sending to the service.

If a value (rather than a Quantity) is sent to Energy (ie no units) then Energy can assume they are in m or through an error, but for backwards friendly it should accept this as unit.m by default and cast the value to a unit.m Quantity

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

No branches or pull requests

1 participant