Open jianyangli opened 5 years ago
I think I've mostly addressed this with #275. However, I was not aware of astropy's PhysicalTime and locally implemented a similar solution. So, I would prefer using astropy machinery over our own, so I would like to do that. Thanks for pointing this out.
This is a request for
The requested changes will be implemented by
High-level concept [Provide a short description of the scientific or technical problem that your new feature would address.]
As suggested by @mkelley in PR #218:
astropy.units
.sbpy.data
.Explain the relevance to sbpy [Why is this relevant to sbpy but not to any other astropy affiliated or other package?]
Simplify dimension check in all sbpy code that uses
DataClass
.Proposal details [Provide details technical and scientific details on your request. Is there a publication that uses the same method as requested here? If you plan to implement this feature yourself: How will you implement the code? ]
The standardized dimension string should be either valid 'physical type' as defined in
astropy.units
, or a base unit that can be converted to a valid astropy unit by aastropy.unit.Unit()
call. Exceptions can exist, such as when the field is aastropy.time.Time
instance. Standard logarithmic unit andastropy.units.MagUnit
are also exceptions due their flexible physical bases.Example (pseudo-)code [Only required if you plan to implement this feature yourself: Provide a short example demonstrating the expected API]