aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/photcal/doc/mkconfig.hlp
blob: ff4e2cf2196ce04397b9ba5a1672de162a778958 (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
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
.help mkconfig Aug91 noao.digiphot.photcal
.ih
NAME
mkconfig -- create a new configuration file 
.ih
USAGE
mkconfig config 
.ih
PARAMETERS
.ls config
The name of the new configuration file.
.le
.ls catalog
The source of the standard star catalog format description.
\fICatalog\fR may be one of the supported standard star
catalogs maintained
in the directory "photcal$catalogs/", a catalog created with
MKCATALOG, the standard input "STDIN",
or a file created by the user containing the catalog
format description.
\fICatalog\fR is not prompted for if \fItemplate\fR is "".
.le
.ls observations
The source of the observations file format description.
\fIObservations\fR may be a catalog created by MKNOBSFILE,
MKOBSFILE, OBSFILE, or MKCATALOG, the standard input "STDIN",
or a file created by the user containing the observations file format
description. \fIObservations\fR is not prompted for if \fItemplate\fR is "".
.le
.ls transform 
The source of the transformation equations definition.
\fITransform\fR may be the name of one of the supported standard star
catalogs maintained in the directory "photcal$catalogs/",
the standard input "STDIN", or a file created by the user
containing the transformation equations definition.
\fITransform\fR is not prompted for if \fItemplate\fR is "".
.le
.ls template = ""
The name of an existing configuration file that can be used as a template
for the new configuration file.
If \fItemplate\fR is the null string "", then MKCONFIG
prompts the user for the source of the standard star catalog 
and observations file format descriptions
\fIcatalog\fR and \fIobservations\fR, and the source of the transformation
equation definitions \fItransform\fR.
If \fItemplate\fR exists,
MKCONFIG copies \fItemplate\fR into \fIconfig\fR and enters the editor
if \fIedit\fR is "yes".
.le
.ls catdir = ")_.catdir"
The directory containing the supported standard star catalogs.
The default parameter value  redirects \fIcatdir\fR
to a package parameter of the same name. A list of standard
catalogs may be obtained by printing the file "photcal$catalogs/README".
Alternatively the user may create their own standard star catalogs 
and standard star catalog directory.
.le
.ls verify = no
Verify each new entry in the configuration file as it is entered?
.le
.ls edit = yes
Enter the editor and review the new configuration file?
.le
.ls check = yes
Check the new configuration file for semantic and syntax errors?
.le
.ls verbose = no
Print detailed information about the results of the check step instead
of only a short summary?
.le

.ih
DESCRIPTION

MKCONFIG is a script task which creates and/or edits the configuration
file \fIconfig\fR. If the configuration file already
exists MKCONFIG, quits with a warning message. If the configuration file is
a new file, MKCONFIG either prompts the
user for input if \fItemplate\fR = "", or copies the existing configuration
file \fItemplate\fR into \fIconfig\fR.

If \fItemplate\fR  is "", MKCONFIG prompts the user for:
1) the source of the standard star catalog format description
\fIcatalog\fR, which assigns names to the columns of the standard star
catalog,
2) the source of the observations file format description
\fIobservations\fR, which assigns names to the columns of the observations file,
3) and the source of the transformation equations \fItransform\fR, which
defines the form of the transformation equations from the
instrumental to the standard system.

If \fIcatalog\fR, \fIobservations\fR, or \fItransform\fR
are set to the standard input "STDIN", MKCONFIG prompts for input from
the terminal, verifying the input as it is entered if \fIverify\fR is "yes". 

If \fIcatalog\fR is a standard star catalog name or a file name,
MKCONFIG searches 1) the current directory for the associated format
description file "fcatalog.dat", 2) the directory
\fIcatdir\fR for the format description file "fcatalog.dat",
and 3) the current directory for a file called "catalog", in that order.
\fICatalog\fR is usually one of the supported standard star catalogs or
a standard star catalog created by the user with MKCATALOG. 

If \fIobservations\fR is an observations file name or a file name,
MKCONFIG searches 1) the current directory for the format
description file "fobservations.dat", and 2)
the current directory for a file called "observations", in that order.
\fIObservations\fR is usually created by the user with MKNOBSFILE or MKOBSFILE.

If \fItransform\fR is assigned a standard star catalog name or a file name,
MKCONFIG searches 1) the directory
\fIcatdir\fR for the transformation equations definition file
"ttransform.dat", and 2)
the current directory for a file called "transform", in that order.
\fITransform\fR is usually one of the supported standard star catalogs or
"STDIN".

The default photometric standards directory is "photcal$catalogs/".
A list of supported catalogs is shown below.
The standard catalog format description files may be listed or
printed with the commands
"dir photcal$catalogs/f*.dat" or "lprint photcal$catalogs/f*.dat" respectively.
The standard transformation equation definition files may be listed or
printed with
the commands "dir photcal$catalogs/t*.dat" or "lprint photcal$catalogs/t*.dat"
respectively.

After data entry, and if \fIedit\fR is "yes",
MKCONFIG enters the default text editor defined by the
IRAF environment variable \fIeditor\fR.  Small
corrections to the configuration file may be made at this point.
Next the configuration file is checked for semantic and syntax errors
if \fIcheck\fR is "yes" and the results are written on the terminal. 

.ih
STANDARD CATALOG FORMAT AND TRANSFORM FILES

The list of standard star catalog files, catalog format description files
and transformation equation definitions files is presented below.

.nf
	# catalogs	# formats		# transformations

	landolt.dat	flandolt.dat		tlandolt.dat
.fi

.ih
THE CONFIGURATION FILE

The \fIconfiguration file\fR is a text file which describes how the input data
is organized in the input files, and defines the form of the transformation
equations required to convert from the instrumental to the standard system.

The input data is assumed to come from two sources,
standard star catalogs known as \fIcatalogs\fR
and \fIobservations\fR files.
The \fIcatalog\fR files contain the standard indices of a set of standard
stars, referenced in the catalog by a name called the
matching name.
The \fIobservations\fR files contain the instrumental magnitudes or colors of
a subset of the standard stars and/or program stars, also referenced by a
matching name.
The names of the observed standard stars must match the names in the
standard star catalog.  The matching names must be stored in column 1
in both the catalog and observations files.

The configuration file is divided up into three sections: the \fIcatalog
section\fR which describes the format of the catalog files, the
\fIobservations section\fR which describes the format of the observation 
files, and the \fItransformation section\fR which defines the
transformation equations. The catalog section must always appear before the
observation section, and the observation section must always appear before the
transformation section.

The \fIcatalog and observations sections\fR are used to assign
names to the columns in the input catalog and observations files. 
These columns may later be referenced by name and the names used
as variables in the transformation equations.

The \fItransformation section\fR is used to define the
transformation equations,
to specify which parameters are to be varied and which are to be held constant
during the fitting process,
and to assign initial values to all the parameters.
Any number of transformation equations may be defined in
the transformation section.

The transformation section may also be used to, OPTIONALLY,
define temporary variables (the set equations), define explicitly
the derivatives of the transformation equations to be fit with respect
to the parameters (derivative equations
and delta declarations), define expressions for the weights and
errors (weight and error equations), and define an expression to be
plotted (the plot equation).

For a detailed description
of the grammar and syntax of the configuration file type \fI"help config"\fR.

The following examples show typical configuration files for two different types
of photometric calibrations.


\fIExample 1\fR. A sample configuration file for reducing UBV photoelectric
photometry. Note that the instrumental magnitudes are all on the right-hand
side of the transformation equation and that the standard magnitudes and colors
are all
on the left-hand side. Once the values of the transformation equation
parameters are computed by FITPARAMS using observations of the standard stars,
standard magnitudes and colors for the program stars can be computed simply by
evaluating the right-hand side of the transformation equation using
the task EVALFIT. In this type of setup the equations are fit separately
and evaluated separately. Note also the use of the error column declarations
in the observation section, and the use of the const statement to fix the
values of some parameters.

.nf
# Configuration file for reducing UBV photoelectric photometry.

catalog

V	2		# V magnitude
BV	3		# B - V color
UB	4		# U - B color

observation

v		2		# v instrumental magnitude
b 		3		# b instrumental magnitude
u 		4		# u instrumental magnitude
error(v)	5		# error in v instrumental magnitude
error(b) 	6		# error in b instrumental magnitude
error(u) 	7		# error in u instrumental magnitude
X		8		# airmass		

transformation

fit	v1 = 0.0, v2=0.16, v3=-0.043
const	v4 = 0.0
VFIT:   V = v1 + v - v2 * X + v3 * (b - v) + v4 * X * (b - v)

fit	b1 = 0.0, b2=0.09, b3=1.266
const	b4 = 0.0
BVFIT:  BV = b1 - b2 * X + b3 * (b - v) + b4 * X * (b - v)

fit	u1 = 0.0, u2=0.300, u3=0.861
const	u4 = 0.0
UBFIT:  UB = u1 - u2 * X + u3 * (u - b) + u4 * X * (u - b)
.fi


\fIExample 2\fR. A sample configuration file for reducing UBV CCD photometry.
Note that the instrumental magnitudes are all on the left-hand side of the
transformation equations and the standard star magnitudes and colors
are all on the right-hand
side. Once the values of the transformation equation parameters have been
computed by FITPARAMS using observations of the standard stars, the
standard magnitudes and colors of the program stars
can be computed by inverting the system of equations using the task
INVERTFIT.
In this type of setup the equations are fit independently, but evaluated
as a system.
Note also that the telescope filter slots 1, 2 and 3 were assigned to
filters v, b and u respectively which is why MKNOBSFILE assigned the names
m1, m2, m3 to v, b, and u respectively. The user can change these if desired.
Note also the use of the error declaration statements in both the catalog
and the observations section.

.nf
catalog

V		2	# V magnitude
BV		3	# B - V color
UB		4	# U - B color
error(V)	5	# error in V magnitude
error(BV)	6	# error in B-V color
error(UB)	7	# error in U-B color

observation

ut1		3	# ut time of filter 1 observation
X1		4	# airmass of filter 1 observation
m1		7	# filter 1 instrumental magnitude
error(m1)	8	# error in filter 1 instrumental magnitude
ut2		10	# ut time of filter 2 observation
X2		11	# airmass of filter 2 observation
m2	 	14	# filter 2 instrumental magnitude
error(m2) 	15	# error in filter 2 instrumental magnitude
ut3		17	# ut time of filter 3 observation
X3	        18	# airmass of filter 3 observation		
m3	 	19	# filter 3 instrumental magnitude
error(m3) 	20	# error in filter 3 instrumental magnitude


transformation

fit   u1 = 0.0, u2=0.68, u3=0.060
UFIT: m3 = u1 + V + BV + UB + u2 * X3 + u3 * UB

fit   b1 = 0.0, b2=0.30, b3=0.010
BFIT: m2 = b1 + V + BV + b2 * X2 + b3 * BV

fit   v1 = 0.0, v2=0.15, v3=0.000
VFIT: m3 = v1 + V + v2 * X3 + v3 * BV
.fi

.ih
EXAMPLES

1. Type in from scratch a new configuration file to reduce some UBV
photoelectric photometry. The catalog and observations file are simple
text files written with the user's own data acquisition software, whose
format is known by the user.

.nf
    ph> mkconfig ubv.cfg

        ... answer "STDIN" in response to the query for the catalog
	    parameter, and enter the standard star catalog format
	    description as prompted

	... a sample input session is shown below, note that in this
	    examine <EOF> is implemented as ^Z

    ENTER THE STANDARD STAR CATALOG FORMAT DESCRIPTION
 
    Enter column definition (name number, ?=help, <EOF>=quit entry): V 2
    Enter column definition (name number, ?=help, <EOF>=quit entry): BV 3
    Enter column definition (name number, ?=help, <EOF>=quit entry): UB 4
    Enter column definition (name number, ?=help, <EOF>=quit entry): ^Z
  
	... answer "STDIN" in response to the query for the
	    observations parameter, and enter the observations file
	    format description as prompted

	... a sample input session is shown below, note that in this
	    example <EOF> is implemented as ^Z

    ENTER THE OBSERVATIONS FILE FORMAT DESCRIPTION

    Enter column definition (name number, ?=help, <EOF>=quit entry): v 2
    Enter column definition (name number, ?=help, <EOF>=quit entry): b 3
    Enter column definition (name number, ?=help, <EOF>=quit entry): u 4
    Enter column definition (name number, ?=help, <EOF>=quit entry): X 5
    Enter column definition (name number, ?=help, <EOF>=quit entry): ^Z

	... answer "STDIN" in response to the query for the
	    transform parameter, and enter the transformation
	    equations as prompted

	... a sample input session is shown below for a single equation is
	    shown below, note that in this example <EOF> is implemented as
	    ^Z

    ENTER THE TRANSFORMATION EQUATIONS

    Enter the label and functional form for EQUATION 1

    Enter label (e.g. VFIT) (label, ?=help, <EOF>=quit entry): VFIT
    Enter equation (equation, equation\=continue, ?=help, <EOF>=quit entry):
    V = v + v1 + v2 * X + v3 * (b - v)

    Enter initial values for the parameters to be fit in EQUATION 1

    Enter parameter 1 (name value, ?=help, <EOF>=quit entry):v1 25.
    Enter parameter 2 (name value, ?=help, <EOF>=quit entry):v2 -.15
    Enter parameter 3 (name value, ?=help, <EOF>=quit entry):v3 1.06
    Enter parameter 4 (name value, ?=help, <EOF>=quit entry):^Z
    
    Enter initial values for the parameters to be held constant in
    EQUATION 1

    Enter parameter1 and value (name value, ?=help, <EOF>=quit entry):^Z
     
    Enter the label and functional form for EQUATION 2

    Enter label (e.g. VFIT) (label, ?=help, <EOF>=quit entry): BFIT 

	... after the program enters the editor make any small changes
	    required

	... examine the final output for errors

    ph> edit ubv.cfg

	... correct any errors with the editor

    ph> chkconfig ubv.cfg

	... check the newly edited file for errors

.fi

2. Create a configuration file to reduce some JHK photometry. In this
example the user has created a JHK standard star catalog called jhkcat
using the task MKCATALOG, an observations file called jhkobs
using the task MKNOBSFILE, and has decided to type in the transformation
equations by hand using the default editor.

.nf
	ph> mkconfig jhk.cfg jhkcat jhkobs

	    ... answer "STDIN" in response to the query for the
	        transform parameter, followed by <EOF>, usually ^Z
		to terminate prompting for the transformation equations

	    ... use the editor to enter the transformation equations

	    ... check the result for errors

	ph> edit jhk.cfg

	    ... correct errors found in previous run using the editor

	ph> chkconfig jhk.cfg

	    ... check the edited file for errors
.fi

3. Create a new configuration file for reducing some UBVR photometry, using 
the UBVR standards in the landolt UBVRI standard star catalog. The standard
star observations file "stdobs" was created with the task MKNOBSFILE.

.nf
	ph> mkconfig ubvr.cfg landolt stdobs landolt

	    ... read in the catalog format description for the
	        landolt UBVRI standards catalog

	    ... read in the observations file format description
	        created by a previous run of mknobsfile

	    ... read in the sample transformation description file for the
		landolt UBVRI system

	    ... use the editor to delete any references to catalog
	        variables that are not going to be used in the
		transformation equations, and to edit the transformation
		equations as desired

	    ... check the result for errors

.fi

.ih
TIME REQUIREMENTS
.ih
BUGS
.ih
SEE ALSO
edit,chkconfig,mknobsfile,mkobsfile
.endhelp