View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

mkconfig problem in photcal

Chrissyo wrote on Sep 08, 2010

Hi guys,

I'm having some trouble getting mkconfig to work in photcal. I'm getting the following error:

** Beginning of compilation **

** Warning near line 2:
The observation section is undefined
syntax error
** Error near line 2:
'annot continue parsing at '

** End of compilation **

Near as I can tell, my catalog, observations and transformation files are all of the correct format, have appropriate column names and are in the right locations. I've compared what I've got with the "config" help file and examples given in "A Users Guide to Stellar CCD Photometry with IRAF" by Massey and Davis, and they seem fine.

Furthermore, even though running mkconfig gives the above error, it still spits out a file that seems perfectly in line with what I'd expect - again based on the "config" help file and the Massey/Davis pdf. I tried just using this file in fitparams, but it gives the same error.

Any suggestions on possible fixes for this, or mistakes I might have made? I've been playing around the files for the better part of today now, and I'm out of ideas. I'm sure I've just made a silly rookie mistake somewhere ... but I just can't pick it out!

I can post the catalog, observations, transformations and/or output config files if that will be of help.

Thanks

Mike Fitzpatrick wrote on Sep 08, 2010

Please post the config file you used,

Chrissyo wrote on Sep 08, 2010

The config file that mkconfig produces? Here it is:


# E2 region standard stars catalog format

catalog

B			2	# B Colour
error(B)	3	# B Colour Error
V			4	# V Colour
error(V)	5	# V Colour Error
R			6	# R Colour
error(R)	7	# R Colour Error
I			8	# I Colour
error(I)	9	# I Colour Error
BV			10	# (B-V) Colour
error(BV)	11	# (B-V) Colour Error
VR			12	# (V-R) Colour
error(VR)	13	# (V-R) Colour Error
RI			14	# (R-I) Colour
error(RI)	15	# (R-I) Colour Error
VI			16	# (V-I) Colour
error(VI)	17	# (V-I) Colour Error
# Declare the observations file variables

observations

TB            3              # time of observation in filter B
XB            4              # airmass in filter B
xB            5              # x coordinate in filter B
yB            6              # y coordinate in filter B
mB            7              # instrumental magnitude in filter B
error(mB)     8              # magnitude error in filter B

TV            10             # time of observation in filter V
XV            11             # airmass in filter V
xV            12             # x coordinate in filter V
yV            13             # y coordinate in filter V
mV            14             # instrumental magnitude in filter V
error(mV)     15             # magnitude error in filter V

TR            17             # time of observation in filter R
XR            18             # airmass in filter R
xR            19             # x coordinate in filter R
yR            20             # y coordinate in filter R
mR            21             # instrumental magnitude in filter R
error(mR)     22             # magnitude error in filter R

TI            24             # time of observation in filter I
XI            25             # airmass in filter I
xI            26             # x coordinate in filter I
yI            27             # y coordinate in filter I
mI            28             # instrumental magnitude in filter I
error(mI)     29             # magnitude error in filter I

# Sample transformation section for the E2 region Landolt BVRI system

transformation

fit   b1=0.0, b2=0.35, b3=0.000
const b4=0.0
BFIT : mB = (BV + V) + b1 + b2 * XB + b3 * BV + b4 * BV * XB

fit   v1=0.0, v2=0.17, v3=0.000
const v4=0.0
VFIT : mV = V + v1 + v2 * XV + v3 * BV + v4 * BV * XV

fit   r1=0.0, r2=0.08, r3=0.000
const r4=0.0
RFIT : mR = (V - VR)  + r1 + r2 * XR + r3 * VR + r4 * VR * XR

fit   i1=0.0, i2=0.03, i3=0.000
const i4=0.0
IFIT : mI = (V - VI) + i1 + i2 * XI + i3 * VI + i4 * VI * XI

Mike Fitzpatrick wrote on Sep 08, 2010

observations


Should be singular, i.e. 'observation'

Chrissyo wrote on Sep 08, 2010

I'm still getting the same error when using the singular version:

** Beginning of compilation **

** Warning near line 2:
The observation section is undefined
syntax error
** Error near line 2:
'annot continue parsing at '

** End of compilation **

I'd actually already tried that, because some of the online resources use "observations" while others use "observation". The Massey/Davis resource and help file for mknobs uses "observations" whereas the config and mkconfig help files both use "observation". Is there a difference I'm not realising? Either way, both give me the same error.

Chrissyo wrote on Sep 08, 2010

I've worked out what the problem was! I used a text editor outside of IRAF to construct the catalog files, so I tried a different method of constructing the config file:

type photcal$catalogs/fE2.dat >> config
type fobservations.dat >> config
type photcal$catalogs/tE2.dat >> config

When I examined this file in the text editor, it turned out that a bunch of ^M were showing up through the catalog section. I simply deleted these and the config file works as expected. I don't really know why they werent showing up when I examined the fE2.dat file by itself ... but as long as it's working, I'm happy! :)

Mike Fitzpatrick wrote on Sep 08, 2010

Thanks for posting the answer.

BTW, in checking out your problem I found a bug in the CHKCONFIG task (called from MKCONFIG at the end, it was the thing producing the messages) on 64-bit systems that meant the task wouldn't work at all under v2.15. This has been fixed.

Cheers,
-Mike

Last post on Sep 08, 2010