[fitsbits] [mhvk at astro.utoronto.ca: Question about FITS format for logarithmic units]
Marten van Kerkwijk
mhvk at astro.utoronto.ca
Tue Dec 10 09:01:35 EST 2013
Dear Rob,
Thanks for your thoughts. The background to this request actually is
not directly related to FITS, but rather to an attempt to introduce
functional units in astropy (there is already a units package, which
takes care of proper propagation of units [1]; it is an incredible joy
to work with!). With functional units, we wish to generally support
cases like:
[Fe/H] = -1 dex
logg = 4.5 dex(cm/s^2)
minst = -10.5 mag(DN/s)
mAB = = 20.1 mag(AB) <-- where AB≡10^(-0.4*48.6) mW/(m2*Hz)
cableloss = 10 dB/m
power = 20 db(mW) <-- if one thought magnitudes were bad
(That is, at present we are not concerned with how to calibrate
magnitudes or the major difficulties associated with magnitude systems.)
I hope this background clarifies the rationale behind my questions
(repeated below for convenience). The first two in particular are
directly related to a first addition I am trying to make to astropy,
which just introduces the dimensionless versions [2], where I would like
to know how to represent dB and dex in particular. The later ones
concern magnitudes with a unit; for (4), I should add that I very much
agree that "mag(AB)" would be far clearer than what I give there, but
obviously no current FITS reader would understand it (I do prefer it
greatly over "AB mag" which should really be the multiplication of some
number with a magnitude, while in "mag(AB)", AB can have an easily
understood physical meaning). In any case, guidance on what might work
and what we are allowed to define would be most welcome.
With all best wishes,
Marten
(1) How would I indicate a dimensionless but logarithmic quantity such
as dex? If I understood the standard correctly, log(surface gravity)
might have the unit "log(cm/s2)", but how about a dimensionless one
(like metallicity). Would it be "log()", or, by analogy with
magnitude, just "log"?
(2) If I wanted to represent decibels, would "10*log(unit)" be
recommended? Or "10^-1 log(unit)" to be more like the "deci" prefix
(but which I think would be more confusing).
(3) If I wanted to represent magnitudes *with* a unit, such as AB
magnitudes, what would be the recommended format? I only noticed
"mag" without units, but is "mag(unit)" allowed? Or would one use
"-2.5*log(unit)"? (Though this would seem to break the rule that
scales can only be powers of 10).
(4) As a particularly gruelling example of the above, how would one
represent AB magnitudes? In principle, an inelegant but correct way
might be "-2.5*log(10^(-0.4*48.6) mW/(m2*Hz))". Would you have a
recommendation?
[1] http://docs.astropy.org/en/latest/units/quantity.html
[2] https://github.com/astropy/astropy/pull/1628
More information about the fitsbits
mailing list