-- Editing and Modifying Headers with ASTHEDIT

Editing and Modifying Headers with ASTHEDIT

A new task asthedit has been added to noao.astutil in V2.10.3BETA and later versions of IRAF. The new task is specially tailored for editing the headers of astronomical images. One of the uses for this task is to fix up or translate image headers from various observatories, or the very minimal headers from commercial CCD systems, for use with the NOAO or other astronomical packages which require certain keywords. It takes commands from a text file so that one such command file may be created for a certain type of data.

The commands consist of a keyword to be modified, created, or deleted and an expression containing references to other keywords, columns from a text table with lines corresponding to each image, string and numeric constants, functions, and algebraic and boolean operators. Because it is oriented to astronomical images it has a number of special astronomical functions such as sidereal time computations and sexagesimal string formatting.

Below is an example of adding keywords to a minimal ESO / IHAP image. This example is shown since it provides great contrast between the keywords recorded and those used in NOAO tasks. It illustrates use of the astronomical functions (for example, mst for mean sidereal time), arithmetic time computations recorded as sexagesimal strings (the sexstr function), access to the observatory database (the obsdb function), and reference to columns from a text file (the $imagetyp and $filter). In the latter the columns are identified with a task parameter.

The command file:
	cl> type eso.dat
	observat  "eso"
	ut        sexstr ((@'tm-start'+0.1) / 3600.)
	utend     sexstr ((@'tm-end'+0.1) / 3600.)
	epoch     epoch (@'date-obs', ut)
	st        mst (@'date-obs', ut, obsdb (observat, "longitude"))
	exptime   (utend>ut)?(utend-ut)*3600.:(utend+24-ut)*3600.
	ra        sexstr (@'postn-ra' / 15)
	dec       sexstr (@'postn-dec')
	airmass   airmass (ra, dec, st, obsdb (observat, "latitude"))
	imagetyp  $imagetyp
	filter    $filter
	cl> type table.dat
	object	V

An initial image header:
	as> imhead eso
	....
	DATE-OBS= '12/12/92'            / Date this data created dd/mm/yy
	TM-START=             84854.    / '23:34:14' measurement start time
	TM-END  =             84974.    / '23:36:14' measurement end time (U
	TIME-SID=                 1.    / '00:00:01' sidereal start time
	POSTN-RA=           354.0709    / '23:36:17' tel. position right-asc
	POSTN-DE=           6.556945    /'+06:33:25' tel. position declinati
	....

Edit the header with asthedit:
	as> asthedit eso eso.dat table=table.dat col="imagetyp filter"

The final header:
	as> imhead eso
	...
	OBSERVAT= 'eso     '
	UT      = '23:34:14'
	UTEND   = '23:36:14'
	EPOCH   =            1992.95
	ST      = '0:18:56.76'
	EXPTIME =            120.005
	RA      = '23:36:17'
	DEC     = '6:33:25 '
	AIRMASS =           1.255875
	IMAGETYP= 'object  '
	FILTER  = 'V       '
	...
Frank Valdes


This document was translated by ms2html v1.8 on 21Jan95.