1
/* @(#)fitsdkw.h 19.2 (ESO-IPG) 05/05/03 08:56:09 */
2
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3
.COPYRIGHT (c) 1992 European Southern Observatory
6
.AUTHOR P.Grosbol ESO/IPG
7
.KEYWORDS FITS, keywords, MIDAS descriptors
8
.PURPOSE define mapping between MIDAS descriptors and
9
FITS keywords when writting a FITS header
10
.VERSION 1.0 1988-Nov-23 : Creation, PJG
11
.VERSION 1.1 1989-Jun-13 : Add ROTA keyword, PJG
12
.VERSION 1.2 1990-Feb-02 : Modify for hierachical keyword, PJG
13
.VERSION 1.3 1990-Nov-07 : Include more basic keywords, PJG
14
.VERSION 1.4 1991-Feb-18 : Add FILENAME and DATANULL, PJG
15
.VERSION 1.5 1991-Mar-24 : Add TBLOFFST + ESO_LOG, PJG
16
.VERSION 1.6 1992-Jun-05 : Map also O_POS+O_TIME etc., PJG
17
.VERSION 1.7 1992-Sep-10 : Map also O_AIRM+AIRMASS, PJG
21
--------------------------------------------------------------------*/
23
#define NCTL 0 /* no mapping action */
24
#define LCTL 1 /* line feed control */
25
#define CCTL 2 /* Comment/history control */
26
#define SCTL 3 /* skip trailing space control */
27
#define HCTL 4 /* hierarchical keyword control */
28
#define DCTL 5 /* Date keyword control */
29
#define ZCTL 6 /* Zero control */
30
#define TCTL 7 /* Time control - hour->sec */
32
typedef struct { /* keyword name for descriptor */
33
int no; /* element no. in descriptor */
34
char *kw; /* prime level keyword name */
35
int ctl; /* store control type */
38
typedef struct { /* descriptor to keyword map */
39
char *desc; /* MIDAS descriotor name */
40
DTOKW *dtk; /* pointer to keyword name */
43
static DTOKW idtkw[] = { {-1,"OBJECT" , SCTL}, { 0,"", NCTL} };
44
static DTOKW hiskw[] = { {-1,"HISTORY", CCTL}, { 0,"", NCTL} };
45
static DTOKW comkw[] = { {-1,"COMMENT", CCTL}, { 0,"", NCTL} };
46
static DTOKW esokw[] = { {-1,"ESO-LOG", CCTL}, { 0,"", NCTL} };
47
static DTOKW hiekw[] = { {-1,"HIERARCH",CCTL}, { 0,"", NCTL} };
48
static DTOKW inskw[] = { {-1,"INSTRUME",SCTL}, { 0,"", NCTL} };
49
static DTOKW telkw[] = { {-1,"TELESCOP",SCTL}, { 0,"", NCTL} };
50
static DTOKW autkw[] = { {-1,"AUTHOR", SCTL}, { 0,"", NCTL} };
51
static DTOKW refkw[] = { {-1,"REFERENC",SCTL}, { 0,"", NCTL} };
52
static DTOKW radkw[] = { {-1,"RADECSYS",SCTL}, { 0,"", NCTL} };
53
static DTOKW obskw[] = { {-1,"OBSERVER",SCTL}, { 0,"", NCTL} };
54
static DTOKW airkw[] = { { 1,"AIRMASS", ZCTL}, { 0,"", NCTL} };
55
static DTOKW expkw[] = { { 1,"EXPTIME", NCTL}, { 0,"", NCTL} };
56
static DTOKW rakw[] = { { 1,"RA", NCTL}, { 0,"", NCTL} };
57
static DTOKW deckw[] = { { 1,"DEC", NCTL}, { 0,"", NCTL} };
58
static DTOKW equkw[] = { { 1,"EQUINOX", ZCTL}, { 0,"", NCTL} };
59
static DTOKW poskw[] = { { 1,"RA", NCTL}, { 2,"DEC", NCTL},
60
{ 3,"EQUINOX", ZCTL}, { 0,"", NCTL} };
61
static DTOKW timkw[] = { { 1,"DATE-OBS",DCTL}, { 4,"MJD-OBS", ZCTL},
62
{ 5,"TM-START",TCTL}, { 7,"EXPTIME", NCTL},
64
static DTOKW oamkw[] = { { 1,"AIRMASS", ZCTL}, { 0,"", NCTL} };
66
static DKMAP dkm[] = {
86
{"NPIX" , (DTOKW *) 0},
87
{"NAXIS" , (DTOKW *) 0},
88
{"CUNIT" , (DTOKW *) 0},
89
{"CRVAL" , (DTOKW *) 0},
90
{"REFPIX" , (DTOKW *) 0},
91
{"ROTA" , (DTOKW *) 0},
92
{"STEP" , (DTOKW *) 0},
93
{"START" , (DTOKW *) 0},
94
{"FILENAME", (DTOKW *) 0},
95
{"DATE" , (DTOKW *) 0},
96
{"ORIGIN" , (DTOKW *) 0},
97
{"DATANULL", (DTOKW *) 0},
98
{"TBLENGTH", (DTOKW *) 0},
99
{"TBLCONTR", (DTOKW *) 0},
100
{"TSELTABL", (DTOKW *) 0},
101
{"TBLOFFST", (DTOKW *) 0},
102
{(char *) 0,(DTOKW *) 0} };