When analysing data from an AAOmega run, one needs to be able to map the combined spectra returned from the reduction task back to
individual objects from the input catalogue. All the relevant information is contained within the combined output file(s). The page that follows attempts to describe how to recover this information. The process is simple, once one follows the logic. However, it can seem rather convoluted at first sight. Please send any questions, comments and suggestion you may have on how to make this information more digestible, to Rob
Sharp (rgs@aao.gov.au).
The table below gives a summary of the 2dfdr output file content, for either the individual frame ....red.fits files or a combined_frames.fits file. The file is a standard Multi-Extension FITS file (FITS MEF).
WxN image containing the spectrum (W pixels long) for each fibre of the N spectra
First Extension
.fits[1]
WxN image containing the Variance array for the data
Second Extension
.fits[2]
FITS binary table, with N rows, one for each fibre. Each Row contains information for each object such as RA, Dec, 2dF Pivot number and more
...
...
Details to be added
Seventh Extension
.fits[7]
Sky spectrum Stored as a FITS binary table, with W rows. Each row contains the one element of the 'typical' sky spectrum used in the data reduction ('typical' because for a combined frame it is not obvious how the final sky spectrum for each fibre should be represented here). Note: The variance information is correctly propagated, the sky spectrum is not presented here for this purpose.
The extension can be accessed in a number of ways. A number of examples are provided below.
The primary image in the MEF FITS file is a WxN image where N is the number of spectra which are represented. This is 400 for AAOmega data, 392 science fibres and 8 guide fibres. Unused science fibres and Sky spectra, are included in the output file along with the guide fibres spectra, even though the spectra contain no information, as this is seen to simplify book keeping, and is a small disc space overhead. In the case where multiple sets of AAOmega datasets, which contained a subset of common objects, have been combined, the format is a little more complex, and is explained separately below.
An Important Note on 2dF Fibre-Pivot Number and 2dfdr Fibre Number
There are two very important, and very different, number which one must understand in order to recover the information on which object each
fibres was allocated to. Fibre slit position AND 2dF Fibre-Pivot position. For the most part there is a one-to-one correspondence between
these number. Usually the fibre at AAOmega slit position 1 (bottom of the CCD image) will map directly to 2dF Pivot position 1, and 400 will map to 400 (note, 400 is a guide fibre and so maps to a blank space at the top of the CCD image). However, during manufacture or repair of each of the AAOmega slit units, it is some times possible for the order of fibres in each of the AAOmega slits to fall out of synchronization with the 2dF Pivot numbering (2 slit block on each plate currently (April 2007) are like this). It is not practical to mechanically alter either position so each
of the two fibre numbers (slit position and Pivot position) are propagated in the binary table extension.
In the primary image (and also the variance array, stored in the first) the fibre at the bottom of the image, which is the fibre at slit position, corresponds to the first row in the binary table extension (the second FITS). The table contains a column entry, PIVOT, which gives the 2dF pivot position for this fibre. This is the fibre number seen be the Configure software. The very top fibre in a CCD image corresponds to the very last entry in the binary table (which will be an AAOmega guide fibre in the case of a single AAOmega data set). There is ALWAYS a one-to-one correspondence between each spectrum position in the image and the binary table. There is typically a one-to-one correspondence between slit position and 2dF pivot position but with a number of known mismatches and discontinuities which are tracked via the PIVOT column of the binary table.
Combining multiple AAOmega data sets which contain a common subset of targets
For cross beam switched data, the paired fibre is indicated (fibre slit position number)
17
Wlen
???
Examples Accessing the FITS Binary Table Information
This list is not exhaustive. If your favorite option is missing, send an e-mail to Rob Sharp (rgs@aao.gov.au) and we'll add it to the list.
With Configure
One can save a list file (file menu -> ..list) which contains the allocated 2dF Fibre-Pivot number for each allocated fibre. Note, this is the Pivot number for 2dF NOT the fibre number in the reduced 2D spectra file.
Within 2dfdr
To be added
2dfinfo
The 2dfinfo program comes packaged with 2dfdr. It can be used to recover information on the fibre from either a .fits or .sdf file. The syntax for the command is :
2dfinfo file.fits
If the option is omitted then the list of options is given. To recover the fibre table information one would use:
2dfinfo file.fits fibres
IRAF
The <span style IRAF/STSDAS package TABLES has a number of routines designed, unsurprisingly, for manipulating tables. A simple example might be:
IRAF> tdump combined_frame.fits[2] >; output.txt
This would create a complete, if rather inelegant, listing of the fibre info binary table and pipe it to a ascii text file. Formating the output can be achieved with:
IRAF> tprint combined_frame.fits[2] columns="NAME,RA,DEC" > output.txt
IDL
For users of IDL, the NASA IDL astronomy library has some excellent fits data access routines.
Starting from a combined fits frame, combined_frame.fits, one might use the following code extracts to manipulate AAOmega data.
Notes, there are much cleverer (and quicker) ways to perform the operations below with the NASA astrolib tasks, the code here is given
as a set of simple examples.
file='combined_frame.fits'
;; Read in the spectral image, store the header information
spec=mrdfits(dir+file_comb,0,header0)
;; And the variance array
spec_var=mrdfits(dir+file_comb,1)
;; Make a wavelength vector, note the use of CRPIX1, which is often not expected by many users.
;; If missed, the wavelength solution will tend to be wrong by half a CCD width
crpix=fxpar(header0,'crpix1')
crval=fxpar(header0,'crval1')
cdelt=fxpar(header0,'cdelt1')
wave=((findgen(n_elements(spec[*,0]))-crpix)*cdelt)+crval
;; Read in the object identification information
fxbopen,unit,file,2
fxbreadm,unit $
,['name','ra','dec','x','y','xerr','yerr','theta','type','pivot','magnitude'] $
,id,ra,dec,x,y,xerr,yerr,theta,type,pivot,mag
fxbclose,unit
;; And read a copy of the sky spectrum subtracted from the data.
;; Note, for a combined frame, this is the sky spectrum from the first file in the list of combined frames.
;; It is a good representative sky spectrum, but should be used with caution for the combined spectral data.
fxbopen,unit,file,7
fxbreadm,unit,['SKY'],sky
fxbclose,unit