Header fixing perl script

fixhead gathers headers items into a standardised format and is required before running pamela and for final input into molly. You should use it before running the automatic reduce script. It is an attempt to place all the header dependent stuff into a single location. The automated reduce script for example will look for the object position, time and slit angle in order to decide whether to associate an arc with an object. It will look for these in the .more.pamela structure created by this script. Items not found are not created.

Invocation

fixhead.pl night format file1 file2 @list1 @list2

Arguments

night---is an integer saying number of night of run.
format---is an integer to say which format the data has (see below for supported formats).
file1, file2---are individual files.
list1, list2---are ascii lists of files (flagged by @).

Suppoerted Formats

Here are the supported formats. Try to choose the one nearest in time to your data on the same instrument.
1)July 1998 WHT, normal and LSD
2)December 1998 AAT
3)January 2000 WHT
4)March 2001 INT
5)VLT UVES pipeline.
6)March 2002 SAAO
7)INT April 2003, 2009
8)VLT FORS1 PMOS circular.
9)VLT FORS2.
10)Magellan LDSS3.
11)Magellan IMACS.
12)SAAO Oct 2008

OK, so you have tried all available formats but none of them work: you need to add your own. You will need to know perl to do so, and in particular be happy with regular expressions.

To add a new format, look below for every place where the variable $format occurs. You need to add a line describing the format and change the range check on $format. Then you may need to change the way the headers are listed. To do this you need to play with 'hdstrace' to see how you can list your headers in such a way as to make it easy to grab the necessary items (see below for what items are required).

An example is:

hdstrace $file.more.fits nlines=all eachline

which lists all the fits headers line by line.

Next you need to add a series of statements to get hold of the particular header items from the list produced by the header listing. This is best done using Perl regular expression matches. The main thing to watch for is that the matches are unique. e.g. there may be an item called RA and one called CAT-RA and if you match to RA you could get either depending which comes second.

Places to edit are delimited by START EDITING! and END EDITING!

Files produced

The script will generate files called 'zzz_fixhead' and 'zzz_fixhead.log'

Author: T.R.Marsh
Created: 14 January 2001
Revised: 08 December 2005


Page generated Fri Nov 20 09:23:37 2009