AAOmega (at Anglo-Australian Observatory) observations can be reduced with 2dfdrv4 tool pretty much very easilly. But the reduction ‘s final output is a combined fits image which includes all spectra from the 400 fibers. So, the user has to extra by himself/herself the spectra individually and this has been frustrating (at least for me…).
1. One solution to this (thanks to Rob S. from Anglo-Australian Telescope) is to use IRAF ‘s command imcopy as :
> imcopy input.fits[0][*,#] output.fits
This command copies the zeroth table of the fits file ([0] which includes the data array) to a new file. The “*” copies all content and the “#” is the number of fiber to be extracted. But in order to keep the errors we have to extract the [1] table also (which includes the variance) and append this array to the new file. This is done by using again the same command :
> imcopy input.fits[1][*,#] output.fits[1,append]
which adds all the content of the [1] array of the input image to the [1] array of the output image. So, if we want to extract the 13th fiber we will write:
> imcopy combined.fits[0][*,13] fiber13.fits
> imcopy combined.fits[1][*,13] fiber13.fits[1,append]
2. An alternative, is to use the command extract from the FIGARO package of Starlink :
> extract input ystart yend output
where ystart / yend is the starting and ending y pixel of the image. In the final combined image the y dimension is 400 pixels equal to the number of fibers. So, each pixel corresponds actually to a fiber and to get a specific spectrum only the number of fiber is needed to be given as ystart and yend and the extraction of the 13th fiber will be (no extensions needed) :
> extract combined 13 13 fiber13
This command keeps the error propagation.
Finally, there are small (but not really serious) diferences between the two solutions and the user selects which one fits more his/her needs: IRAF’s command is ready to use the fits file from the beginning but errors have to be added manually in contrast to the FIGARO’s command where the errors are kept automatically but the initial image has to be in sdf format.