Support `MagUnits`
WilliamJamieson opened this issue · 1 comments
Support for MagUnit
style units has been requested for the Roman Space Telescope output files. I think this is a reasonable request given we are working to resolve #144 (non-VOunits).
This should be relatively straight forward as we all MagUnit
units essentially wrap a "physical unit" which we should be able to serialize already (for VOunits, and non-VOunits if #142 is merged). The heart of a schema for this would be:
type: object
properties:
unit:
oneOf:
- tag: "tag:stsci.edu:asdf/unit/unit-1.0.0"
- tag: "tag:astropy.org:astropy/units/unit-1.0.0"
Once the schema is setup it should be relatively straightforward to get the Converter
integrated and working.
@mhvk or @nstarman as astropy.units
maintainers do I need to do anything besides wrapping the physical unit inside the MagUnit
?
If you want to be complete, I'd also wrap the function_unit
-- it principle it can be something like 2 mag
(not that I hope that would ever happen). More helpfully, it means you can automatically also wrap DexUnit
, DecibelUnit
, and the more general LogUnit
.