astropy/astropy — pull request #1628 by mhvk (2013-10-22 02:08:53+00:00)
Title: Add dex, dB units

Beyond magnitude, there are two other logarithmic units commonly used in astronomy: `dex` (e.g., metallicity [Fe/H], surface gravity `logg`) and `dB` (radio astronomy, cable losses, etc.) This PR adds them, writing `mag` and `dB` as derived units of `dex`. The latter causes a small problem for the `cds` and `vounit` formats, since these know `mag` and, in the case of vounit, `dB`, but do not know `dex`. Hence, `mag.decompose().to_string('vounit')` fails. This PR simply skips the corresponding tests, as is done for the whole decompose test in FITS; better suggestions welcome.