Skip to content

caom2 objects should use Quantities  #114

Description

@ijiraq

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions