aboutsummaryrefslogtreecommitdiff
path: root/noao/imred/ccdred/doc/ccdinst.hlp
blob: ea90f4a75a9e4474bd6caccac0c3fa2992c024d4 (plain) (blame)
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
.help ccdinstrument Dec93 noao.imred.ccdred
.ih
NAME
ccdinstrument -- Setup and verify CCD instrument translation files
.ih
USAGE	
ccdinstrument images
.ih
PARAMETERS
.ls images
List of images to be verified or used to setup a CCD instrument translation
file.
.le
.ls instrument = ")_.instrument"
CCD instrument translation file.  The default is to use the translation
file defined in the \fBccdred\fR package parameters.  Note that one would
need write permission to update this file though the task has a write
command to save any changes to a different file.
.le
.ls ssfile = ")_.ssfile"
Subset translation file.  The default is to use the file defined in
the \fBccdred\fR package parameters.
.le
.ls edit = yes
Edit the instrument translation file?  If "yes" an interactive
mode is entered allowing translation parameters to be modified while if
"no" the task is simply used to verify the translations noninteractively.
.le
.ls parameters = "basic"
Parameters to be displayed.  The choices are "basic" to display only the
most basic parameters (those needed for the simplest automation of
\fBccdred\fR tasks),  "common" to display the common parameters used
by the package (most of these are keywords to be written to the image
rather than translated), and "all" to display all the parameters
referenced by the package including the most obscure.  For most uses
the "basic" set is all that is important and the other options are
included for completeness.
.le
.ih
DESCRIPTION
The purpose of this task is to provide an interface to simplify setting
up CCD instrument translation files and to verify the translations
for a set of images.  Before this task was written users who needed to
set up translation files for new instruments and observatories had
to directly create the files with an editor.  Many people encountered
difficulties and were prone to errors.  Also there was no task that
directly verified the translations though \fBccdlist\fR provided some
clues.

The \fBccdred\fR package was designed to make intelligent use of
information in image headers for determining things such as image
calibration or object type and exposure times.  While the package may
be used without this capability it is much more convenient to be
able to use information from the image.  The package was also intended
to be used with many different instruments, detectors, and observatories.
The key to providing image header access across different observatories
is the ability to translate the needs of the package to the appropriate
keywords in the image header.  This is done through a file called
an "instrument translation file".  For a complete description of
this file and other instrument setup features of the package see
\fBccdred.instruments\fR.

The instrument translation file translates the parameter names used by
the \fBccdred\fR package into image specific parameters and also
supplies default values for parameters.  The translation proceeds as
follows.  When a package task needs a parameter for an image, for
example "imagetyp", it looks in the instrument translation file.  If
the file is not found or none is specified then the image header
keyword that is requested is assumed to have the same name.  If an
instrument translation file is defined then the requested parameter is
translated to an image header keyword, provided a translation entry is
given.  If no translation is given the package name is used.  For
example the package parameter "imagetyp" might be translated to
"data-typ" (the old NOAO CCD keyword).  If the parameter is not found
then the default value specified in the translation file, if present,
is returned.

For recording parameter information in the header, such
as processing flags, translation is also used.  For example, if the
flag specifying that the image has been corrected by a flat field is to
be set then the package parameter name "flatcor" might be translated to
"ff-flag".  If no translation is given then the new image header
parameter is entered as "flatcor".

The CCD image type requires a second level of translation also defined
in the translation file.  Once the image keyword which identifies the
type of CCD image, for example a flat field or object, is translated
to an imahe keyword the specific
string value must be translated to one of the CCD image types used
by the package.  The translation works in the same way, the specific
string found is translated to the \fBccdred\fR type and returned to
the task.  This translation is tricky in that the exact string
including all spaces and capitalizations must be correctly defined
in the translation file.  The \fBccdinstrument\fR allows doing
this automatically thus minimizing typing errors.

The basic display format of the task is a table of five columns
giving the parameter name used by the package, the image keyword
to which it is translated, the default value (if any), the value
the task will receive for the current image after translation,
and the actual keyword value in the image.  A "?" is printed if
a value cannot be determined.  The idea of the task is to make sure
that the value a \fBccdred\fR task sees is the correct one and if not
to modify the translation appropriately.  In verify mode when the
\fBedit\fR parameter is not set the translation table is simply
printed for each input image.

In edit mode the user interactively gives commands at the ccdinstrument
prompt to display or modify keywords.  The modifications can then be
written to the instrument file or saved in a private copy.  The
list of commands is shown below and may be printed using ? or help.

.in 4
.nf
			CCDINSTRUMENT COMMANDS

?	    Print command summary
help	    Print command summary
imheader    Page image header
instrument  Print current instrument translation file
next	    Next image
newimage    Select a new image
quit	    Quit
read	    Read instrument translation file
show	    Show current translations
write	    Write instrument translation file

translate   Translate image string selected by the imagetyp
	    parameter to one of the CCDRED types given as an
	    argument or queried:
	    object, zero, dark, flat, comp, illum, fringe, other

.fi
The following are CCDRED parameters which may be translated.  You are
queried for the image keyword to use or it may be typed after the command.
An optional default value (returned if the image does not contain the
keyword) may be typed as the second argument of the command.
.nf

	BASIC PARAMETERS
imagetyp	Image type parameter (see also translate)
subset		Subset or filter parameter
exptime		Exposure time
darktime	Dark time (may be same as the exposure time)
.fi
.in -4

The commands may be followed by values such as file names for some of
the general commands or the keyword and default value for the parameters
to be translated.  Note this is the only way to specify a default value.
If no arguments are given the user is prompted with the current value
which may then be changed.

The set of parameters shown above are only those considered "basic".
In order to avoid confusion the task can limit the set of parameters
displayed.  Without going into great detail, it is only the basic
parameters which are generally required to have valid translations to
allow the package to work well.  However, for completeness, and if someone
wants to go wild with translations, further parameters may be displayed
and changed.  The parameters displayed is controlled by the \fIparameters\fR
keyword.  The additional parameters not shown above are:

.in 4
.nf
	USEFUL DEFAULT GEOMETRY PARAMETERS
biassec		Bias section (often has a default value)
trimsec		Trim section (often has a default value)

	COMMON PROCESSING FLAGS
fixpix		Bad pixel replacement flag
overscan	Overscan correction flag
trim		Trim flag
zerocor		Zero level correction flag
darkcor		Dark count correction flag
flatcor		Flat field correction flag

	RARELY TRANSLATED PARAMETERS
ccdsec		CCD section
datasec		Data section
fixfile		Bad pixel file

fringcor	Fringe correction flag
illumcor	Ilumination correction flag
readcor		One dimensional zero level read out correction
scancor		Scan mode correction flag
nscanrow	Number of scan rows

illumflt	Ilumination flat image
mkfringe	Fringe image
mkillum		Iillumination image
skyflat		Sky flat image

ccdmean		Mean value
ccdmeant	Mean value compute time
fringscl	Fringe scale factor
ncombine	Number of images combined
date-obs	Date of observations
dec		Declination
ra		Right Ascension
title		Image title
.fi
.in -4
.ih
EXAMPLES
1. To verify the translations for a set of images using the default
translation file:

.nf
	cl> setinst "" review-
	cl> ccdinst dev$pix edit-
	Image: dev$pix
	Instrument file: 
	Subset file: subsets

	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	--------------------------------
	imagetyp  imagetyp            none      ?
	subset    subset                        ?
	exptime   exptime             ?         ?
	darktime  darktime            ?         ?

	cl> setinst "" site=kpno dir=ccddb$ review-
	cl> ccdinst dev$pix edit-
	Image: dev$pix

	Instrument file: ccddb$kpno/camera.dat
	Subset file: subsets

	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	--------------------------------
	imagetyp  data-typ            object    OBJECT (0)
	subset    f1pos               2         2
	exptime   otime               600       600
	darktime  ttime               600       600
.fi

2.  Set up an  instrument translation file from scratch.

.nf
	ccdinst ech???.imh instr=myccd edit+
	Warning: OPEN: File does not exist (myccd)
	Image: ech001.imh
	Instrument file: myccd
	Subset file: subsets
	
	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	------------------------------------------------------
	imagetyp  imagetyp            none      ?
	subset    subset                        ?
	exptime   exptime             ?         ?
	darktime  darktime            ?         ?
	
	ccdinstrument> imagetyp
	Image keyword for image type (imagetyp): ccdtype
	imagetyp  ccdtype             unknown   BIAS
	ccdinstrument> translate
	CCDRED image type for 'BIAS' (unknown): zero
	imagetyp  ccdtype             zero      BIAS
	ccdinstrument> subset
	Image keyword for subset parameter (subset): filters
	subset    filters             1         1 0
	ccdinstrument> exptime integ
	exptime   integ               0.        0.
	ccdinstrument> darktime integ
	darktime  integ               0.        0.
	ccdinstrument> show
	Image: ech001.imh
	Instrument file: myccd
	Subset file: subsets
	
	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	------------------------------------------------------
	imagetyp  ccdtype             zero      BIAS
	subset    filters             1         1 0
	exptime   integ               0.        0.
	darktime  integ               0.        0.
	
	ccdinstrument> next
	Image: ech002.imh
	Instrument file: myccd
	Subset file: subsets
	
	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	------------------------------------------------------
	imagetyp  ccdtype             unknown   PROJECTOR FLAT
	subset    filters             1         1 0
	exptime   integ               20.       20.
	darktime  integ               20.       20.
	
	ccdinstrument> trans
	CCDRED image type for 'PROJECTOR FLAT' (unknown): flat
	imagetyp  ccdtype             flat      PROJECTOR FLAT
	ccdinstrument> next
	Image: ech003.imh
	Instrument file: myccd
	Subset file: subsets
	
	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	------------------------------------------------------
	imagetyp  ccdtype             unknown   COMPARISON
	subset    filters             1         1 0
	exptime   integ               300       300
	darktime  integ               300       300
	
	ccdinstrument> translate comp
	imagetyp  ccdtype             comp      COMPARISON
	ccdinstrument> next
	Image: ech004.imh
	Instrument file: myccd
	Subset file: subsets
	
	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	------------------------------------------------------
	imagetyp  ccdtype             unknown   OBJECT
	subset    filters             1         1 0
	exptime   integ               3600      3600
	darktime  integ               3600      3600
	
	ccdinstrument> translate object
	imagetyp  ccdtype             object    OBJECT
	ccdinstrument> inst
	imagetyp                      ccdtype 
	BIAS                          zero    
	subset                        filters 
	exptime                       integ   
	darktime                      integ   
	'PROJECTOR FLAT'              flat    
	COMPARISON                    comp    
	OBJECT                        object  

	ccdinstrument> next
	Update instrument file myccd (yes)? 
.fi

3.  Set default geometry parameters.  Note that to set a default the
arguments must be on the command line.

.nf
	cc> ccdinst ech001 instr=myccd param=common edit+
	Image: ech001
	Instrument file: myccd
	Subset file: subsets
	
	CCDRED    IMAGE     DEFAULT   CCDRED    IMAGE   
	PARAM     KEYWORD   VALUE     VALUE     VALUE   
	------------------------------------------------------
	imagetyp  ccdtype             zero      BIAS
	subset    filters             1         1 0
	exptime   integ               0.        0.
	darktime  integ               0.        0.
	
	biassec   biassec             ?         ?
	trimsec   trimsec             ?         ?
	
	fixpix    fixpix              no        ?
	overscan  overscan            no        ?
	trim      trim                no        ?
	zerocor   zerocor             no        ?
	darkcor   darkcor             no        ?
	flatcor   flatcor             no        ?
	
	ccdinstrument> biassec biassec [803:830,*]
	biassec   biassec   [803:830,*]  [803:830,*]  ?
	ccdinstrument> trimsec trimsec [2:798,2:798]
	trimsec   trimsec   [2:798,2:798]  [2:798,2:798]  ?
	ccdinstrument> instr
	trimsec                       trimsec  [2:798,2:798]
	biassec                       biassec  [803:830,*]
	imagetyp                      ccdtype 
	BIAS                          zero    
	subset                        filters 
	exptime                       integ   
	darktime                      integ   
	'PROJECTOR FLAT'              flat    
	COMPARISON                    comp    
	OBJECT                        object  
	
	ccdinstrument> q
	Update instrument file myccd (yes)? 
.fi
.ih
SEE ALSO
instruments, setinstrument
.endhelp