[fitsbits] [mhvk at astro.utoronto.ca: Question about FITS format for logarithmic units]
Rob Seaman
seaman at noao.edu
Tue Dec 10 08:11:20 EST 2013
Hello Marten,
I look forward to reading others' comments on your specific questions. You mention an A&A article, but don't say which one of several. I wonder if you are aware of a couple of general references? First the current FITS standard is at:
http://fits.gsfc.nasa.gov/fits_standard.html
(It is possible you are referring to the published version of this.)
And copious other FITS documentation is available from:
http://fits.gsfc.nasa.gov/fits_documentation.html
But one reason units are not discussed more extensively in the FITS standard is that the issue is broader than FITS usage. The IVOA (an activity of the IAU) is working on the problem of expressing units:
http://wiki.ivoa.net/internal/IVOA/Dec2013VOUnitsRFC/PR-VOUnits-1.0-20131025.pdf
(Note this is a draft standard.)
All that said, my own suggestion for denoting AB magnitudes would be "AB mag" (or perhaps mag(AB), etc). The construction of such a quantity is quite complex and involves recipes for calibrating the data onto an even per-frequency scale, as well as applying filter curves, before the question of the logarithm (with scale factor and offset) ever comes up.
You don't say, but it may also matter whether you are discussing populating a (binary) pixel array with such quantities versus expressing an (ASCII) header keyword or (ASCII or binary) table entry. To some extent all pixel arrays contain just "data numbers" and the units are DN. Converting from these to calibrated units isn't just a recipe, it's an entire cookbook. For instance, a synonym for DN is often ADU (for "analog to digital units"). Implicit in that is a non-parametric quantization process. Not to mention whether the binary quantities are 2's complement ints versus IEEE floats or other more boutique representations.
The logarithm is only one possible such function, of course. For instance, "square-rooting":
http://arxiv.org/pdf/0910.3733.pdf
Which introduces issues of the proper representation of noise and variance, not just of signal.
The existence of all this complexity raises the question of the actual science use cases implicit in "ensur[ing] that units can be read from and written to fits format correctly in the astropy package". Which is to say that I think most astronomers would find "AB mag" to be most expressive if receiving such a file, whether FITS or not.
I haven't checked the dimensional analysis of your "-2.5*log(10^(-0.4*48.6) mW/(m2*Hz))", but the fundamental question is whether such an expression conveys the concept more usefully and permanently than "AB mag" would, either to human practitioners, or to downstream computer services or libraries which might have to parse that string.
Rob Seaman
National Optical Astronomy Observatory
Tucson, AZ
--
On Dec 9, 2013, at 7:35 AM, Marten van Kerkwijk <mhvk at astro.utoronto.ca> wrote:
> Dear Colleagues,
>
> At the suggestion of Lucio, I'm forwarding my query regarding the use of
> logarithmic units in FITS here. Any answers most appreciated!
>
> With all best wishes,
>
> Marten van Kerkwijk
>
> --
> Prof. M. H. van Kerkwijk
> Dept. of Astronomy & Astroph., 50 St George St., Toronto, ON, M5S 3H4, Canada
> McLennan Labs, room 1203B, tel: +1(416)9467288, fax: +1(416)9467287
> mhvk at astro.utoronto.ca, http://www.astro.utoronto.ca/~mhvk
>
>
> From: Marten van Kerkwijk <mhvk at astro.utoronto.ca>
> To: lucio at lambrate.inaf.it
> Subject: Question about FITS format for logarithmic units
> CC: perry at stsci.edu, mdboom at gmail.com
> Date: Sun, 08 Dec 2013 21:15:16 -0500
> Message-ID: <87a9ga22iz.fsf at dolphin.astro.utoronto.ca>
>
> Dear Dr Chiappetti,
>
> I am helping to ensure that units can be read from and written to fits
> format correctly in the astropy package [1] (CC Michael Droettboom,
> STScI, primary maintainer, and Perry Greenfield, STScI representative on
> the IAUFWG), and I have a few questions about the use of logarithmic
> units such as magnitudes, to which I could not find a clear answer in
> the (otherwise very nice) A&A article on the FITS standard. If hope
> you can answer these, or could point me to someone who can.
>
> My specific questions are:
>
> (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?
>
> With all best regards,
>
> Marten van Kerkwijk
>
> p.s. I earlier wrote Dr Pence with this question, but did not receive a
> reply. Please let me know if I should be contacting someone else
> with these questions.
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.cv.nrao.edu
> http://listmgr.cv.nrao.edu/mailman/listinfo/fitsbits
More information about the fitsbits
mailing list