ChandraCXC / iris-dev

repository for tracking Iris development tasks
0 stars 0 forks source link

Oracle for Units Conversion #102

Open eholum opened 8 years ago

eholum commented 8 years ago

Need a framework or suite of tests that we know* correctly converts units (incl. errors)

jbudynk commented 8 years ago

I've got a Python units package you can clone at

https://github.com/jbudynk/unitoracle

Just run the usual python setup.py <develop|install> to work with it.

Check unitoracle/units-conversion-script.py to see how you can use the package. You'll need astropy and numpy. There are doc strings with each function, too. I mainly addressed converting between fluxes and magnitudes, but there's also a general converter for converting between all types of fluxes.

Note: I haven't yet tested velocity or wavenumber units, nor that Rayleigh/Angstrom unit, or the flux units.