GNU Astronomy Utilities



2.5.7 Cubes with logarithmic third dimension

In Extracting a single spectrum and plotting it, a single object’s spectrum was extracted from the catalog and plotted. Extracting the wavelength of each slice was easy there because MUSE data cubes provide a linear third dimension. However, it can happen that the third axis of a cube is logarithmic not linear (as in the MUSE cube used in this tutorial). An example in the optical regime is the data cubes of the MaNGA survey76. To identify if an axis is logarithmic or linear, the FITS WCS standard (Section 3.2) says that you should look at the CTYPE keywords and check if any have a -LOG suffix. For example, here is the output on a MaNGA data cube:

$ astfits manga.fits -h1 | grep CTYPE
CTYPE1  = 'RA---TAN'
CTYPE2  = 'DEC--TAN'
CTYPE3  = 'WAVE-LOG'

In the same section, the FITS standard describes how the “world coordinate” (wavelength in this case) can be calculated in such cases. The column arithmetic command to add the wavelength to each slice’s measurement looks is shown below (just for the first object in the catalog; replace --head=1 as you wish). For the d, lr and sr shell variables that are used in this command, see Extracting a single spectrum and plotting it.

$ asttable cat.fits --head=1 -csum-in-slice --transpose \
           | asttable -c'arith $1 index '$d' x '$lr' / set-p set-s \
                               e p pow '$lr' x s'

Footnotes

(76)

An example data cube from the MaNGA survey can be downloaded from here: https://data.sdss.org/sas/dr17/manga/spectro/redux/v3_1_1/7443/stack/manga-7443-12703-LOGCUBE.fits.gz