1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
include <mach.h>
include "rcamera.h"
define LEN_KEYWORD 8
# CAM_LONG_HEADER -- Print CAMERA longheader on the standard output.
procedure cam_long_header (parameters, text)
short parameters[ARB] # Pointer to program data structure
char text[ARB] # ID string
real value
errchk cam_sicard, cam_rcard, cam_hmscard, cam_ymdcard, cam_obscard
begin
# FITS keyword are formatted and appended to the image user area.
call cam_ccard (STDOUT, "OBJECT", text, LEN_CAM_TEXT,
"TITLE OF IMAGE")
call cam_sicard (STDOUT, "NAXIS1", NAXIS1(parameters),
"NUMBER OF IMAGE COLUMNS")
call cam_sicard (STDOUT, "NAXIS2", NAXIS2(parameters),
"NUMBER OF IMAGE ROWS")
call cam_sicard (STDOUT, "RECLEN", REC_LEN(parameters),
"RCAMERA RECORD LENGTH")
call cam_sicard (STDOUT, "CCDPICNO", CCD_PICNO(parameters),
"ORIGINAL CCD PICTURE NUMBER")
if (IMAGE_TYPE(parameters) < BEG_IRDATA) {
call cam_sicard (STDOUT, "EXPTIME", ITIME(parameters),
"ACTUAL INTEGRATION TIME (SECONDS)")
call cam_sicard (STDOUT, "DARKTIME", TTIME(parameters),
"TOTAL ELAPSED TIME (SECONDS)")
call cam_sicard (STDOUT, "OTIME", OTIME(parameters),
"ACTUAL INTEGRATION TIME (SECS)")
} else if (IMAGE_TYPE(parameters) >= BEG_IRDATA &&
IMAGE_TYPE(parameters) <= END_IRDATA) {
value = TTIME(parameters) / 1000. + OTIME(parameters)
call cam_rcard (STDOUT, "EXPTIME", value,
"ACTUAL INTEGRATION TIME (SECONDS)", 3)
}
# Observation date, time and position cards
call cam_obscard (STDOUT, "IMAGETYP", IMAGE_TYPE(parameters),
"OBJECT,DARK,BIAS,ETC.")
if (PIC_IRBSCALE(parameters) > 0) {
value = 1.0 / PIC_IRBSCALE(parameters)
call cam_rcard (STDOUT, "IRBSCALE", value, "PICTURE SCALING FACTOR",
3)
}
call cam_ymdcard (STDOUT, "DATE-OBS", OBS_YR(parameters),
OBS_MON(parameters), OBS_DAY(parameters), "DATE DD/MM/YY")
call cam_hmscard (STDOUT, "RA", RA_HR(parameters), RA_MIN(parameters),
RA_SEC(parameters), "RIGHT ASCENSION (TELESCOPE)")
call cam_hmscard (STDOUT, "DEC", DEC_DEG(parameters),
DEC_MIN(parameters), DEC_SEC(parameters),
"DECLINATION (TELESCOPE)")
value = EPOCH(parameters) / 10.
call cam_rcard (STDOUT, "EPOCH", value, "EPOCH OF RA AND DEC", 2)
call cam_hmscard (STDOUT, "ZD", ZD_DEG(parameters), ZD_MIN(parameters),
ZD_SEC(parameters), "ZENITH DISTANCE")
call cam_hmscard (STDOUT, "UT", UT_HR(parameters), UT_MIN(parameters),
UT_SEC(parameters), "UNIVERSAL TIME")
call cam_hmscard (STDOUT, "ST", ST_HR(parameters), ST_MIN(parameters),
ST_SEC(parameters), "SIDEREAL TIME")
if (AIR_MASS(parameters) != 0) {
value = AIR_MASS(parameters) / 100.
call cam_rcard (STDOUT, "AIRMASS", value, "AIR MASS", 3)
}
# Observation instrumentation cards
call cam_detcard (STDOUT, "DETECTOR", CAM_HEAD(parameters),
"DETECTOR (CCD TYPE, PHOTON COUNTER, ETC)")
if (GAIN(parameters) != 0) {
value = GAIN(parameters) / 100.
call cam_rcard (STDOUT, "GAIN", value, "GAIN (ELECTRONS/ADU)", 2)
}
if (RDNOISE(parameters) != 0) {
value = RDNOISE(parameters) / 100.
call cam_rcard (STDOUT, "RDNOISE", value,
"READOUT NOISE (ELECTRONS)", 1)
}
if (PREFLASH(parameters) != 0) {
call cam_sicard (STDOUT, "PREFLASH", PREFLASH(parameters),
"PREFLASH TIME (SECONDS)")
}
value = CAM_TEMP(parameters) / 100.
call cam_rcard (STDOUT, "CAMTEMP", value, "CAMERA TEMPERATURE, DEG C",
2)
value = DEW_TEMP(parameters) / 100.
call cam_rcard (STDOUT, "DEWTEMP", value, "DEWAR TEMPRATURE, DEG C", 2)
if (PFLEVEL(parameters) != 0) {
call cam_sicard (STDOUT, "PFLEVEL", PFLEVEL(parameters),
"PREFLASH LEVEL")
}
call cam_2sintcard (STDOUT, "FILTERS", F1POS(parameters), F2POS(parameters),
"FILTER BOLT POSITIONS")
call cam_sicard (STDOUT, "TVFILT", TV_FILTER(parameters), "TV FILTER")
call cam_sicard (STDOUT, "COMPLAMP", COMP_LAMP(parameters),
"COMPARISON LAMP")
if (TILT_POS(parameters) != 0) {
call cam_sicard (STDOUT, "TILTPOS", TILT_POS(parameters),
"TILT POSITION")
}
if (PED_POS(parameters) != 0) {
call cam_sicard (STDOUT, "TELEFOCUS", PED_POS(parameters),
"TELESCOPE FOCUS")
}
# Reduction flags
if (BIAS_PIX(parameters) != 0) {
call cam_sicard (STDOUT, "BIASPIX", BIAS_PIX(parameters), "")
}
if (BT_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "OVERSCAN", BT_FLAG(parameters),
"OVERSCAN SUBTRACTED")
call cam_sicard (STDOUT, "TRIM", short (1), "TRIMMED IMAGE")
}
if (BI_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "ZEROCOR", BI_FLAG(parameters),
"ZERO LEVEL SUBTRACTED (PREFLASH, BIAS)")
}
if (BP_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "FIXPIX", BP_FLAG(parameters),
"BAD PIXEL CORRECTION")
}
if (CR_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "CRFLAG", CR_FLAG(parameters),
"COSMIC RAYS REMOVED")
}
if (DK_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "DARKCOR", DK_FLAG(parameters),
"DARK SUBTRACTED")
}
if (FF_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "FLATCOR", FF_FLAG(parameters),
"FLAT FIELD CORRECTION")
}
if (FR_FLAG(parameters) != 0) {
call cam_sicard (STDOUT, "FRINGCOR", FR_FLAG(parameters),
"FRINGING SUBTRACTED")
}
if (FR_SC100(parameters) != 0) {
call bitpak (int (FR_SC100(parameters)), value, 1, 32)
call cam_rcard (STDOUT, "FRINGSCL", value, "FRINGE SCALING", 2)
}
call cam_section (STDOUT, parameters)
if (PIC_XSUM(parameters) != 0 && PIC_YSUM(parameters) != 0) {
call cam_2sintcard (STDOUT, "CCDSUM", PIC_XSUM(parameters),
PIC_YSUM(parameters), "ON CHIP SUMMATION (X,Y)")
}
end
|