Tag Archive


amateur astronomy awk bash be b[e] supergiant cartoon conference convert evolved star exoplanet fedora figaro fits fun galaxy history iraf jupiter latex linux lmc machine learning massive star matplotlib meteor mypaper paper peblo photometry planet pro-am pyraf python scisoft skinakas observatory small magellanic cloud smc spectroscopy starlink talk theli ubuntu university of crete video x-ray

Extracting spectra from AAOmega observations

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.

Installing AAOmega’s data reduction program – 2dfdr

The AAOmega spectrograph of Anglo-Australian Observatory uses the 2dfdr v4 data redution package (version 4 removes most dependencies on STARLINK packages, earlier version will need also the STARLINK to be installed, so it is not recommended).

After downloading the necessary file (ftp and get 2dfdr-linux_x86_RH_5_3-4.0.tgz) you just need to set an environment variable and run the setup script (see also the CookBook):

tcsh
setenv DRCONTROL_DIR /home/pathtoprogram/2dfdr-linux_x86_RH_5_3
source $DRCONTROL_DIR/2dfdr_setup

[or else edit the ~/.tcshrc file with the above commands in order to have available the program each time you invoke the shell].

So, to start the processing you just have to get to your working directory where there is a set of observations with a particular field plate and type

drcontrol aaomega.idx &

which selects defaults for AAOmega (for more options see CookBook and the v4’s page).

CAUTION!
Some times (if not all the times) an extra library is needed: libg2c0, a library needed for GNU Fortran 77 applications linked against the shared library.

In the case of the 32bit machine you just find the the appropriate package containing the library and install it (through any covenient terminal or graphical way).

In the case of 64bit machine the same library has to be downloaded and used, as 2dfdr is a 32bit program. Download the i386 package but this time extract (NOT install) the files (details on extraction from .deb or .rpg files here). Copy (or move) the extracted files to /usr/lib32 directory and you are done! Installing a 64bit version of the library will not solve the problem.

Happy data processing !