dispcor problem
D. Jack MacConnell wrote on Oct 09, 2009
I'm running dispcor in PyRAF on a unix platform on several hundred 1-D stellar spectra, and it is giving me errors on lots of them and producing no output files. The cmd. is "dispcor @ctiofit @ctiocorfit w1=6410. w2=8790. dw=4." where each file has 644 lines, and I'm getting proper output for all but 49 which give the screen output e.g.:
Warning: Cannot open file (database/eclamp.cal)
Warning: Cannot open file (database/idlamp.cal)
Warning: x49.fit: Dispersion data not found
The header of this example of an UNsuccessful one is:
******************************************************************************
x49.fit[576][real]: - Aperture 1
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [576], length of user area 2592 s.u.
Created Fri 11:26:53 12-Dec-2008, Last modified Thu 15:27:31 02-Nov-2006
Pixel file "x49.fit" [ok]
OBJECT = ' - Aperture 1' /
ORIGIN = 'KPNO-IRAF' /
DATE = '2006-11-02T20:27:31'
IRAFNAME= 'x49.imh ' / NAME OF IRAF IMAGE FILE
IRAF-MAX= 1.010321E0 / DATA MAX
IRAF-MIN= 2.701004E-1 / DATA MIN
IRAF-BPX= 32 / DATA BITS/PIXEL
IRAFTYPE= 'REAL ' / PIXEL TYPE
OBSERVAT= 'CTIO' / origin of data
CCDPICNO= 157 / original ccd picture number
EXPTIME = 20 / actual integration time (seconds)
DARKTIME= 20 / total elapsed time (seconds)
OTIME = 20 / shutter open time (seconds)
IMAGETYP= 'OBJECT ' / object,dark,bias,etc.
DATE-OBS= ' 31/01/89' / date (dd/mm/yy) of observation
RA = ' 7:30:34.00' / right ascension
DEC = '-22:01:53.00' / declination
EPOCH = 1989.5 / epoch of ra and dec
ZD = ' 0:00:24.00' / zenith distance
UT = ' 5:06:49.00' / universal time
ST = ' 9:09:23.00' / sidereal time
HA = ' 01:39:00' / hour angle (h-m-s)
AIRMASS = 1.091 / airmass
DETECTOR= ' 10 ' / detector (ccd type, photon counter, etc)
VEBGAIN = 54 / veb gain setting
SECPPIX = .404 / sec of arc per pixel
PREFLASH= .000000 / preflash time (seconds)
CAMTEMP = .00 / camera temperature, deg C
DEWTEMP = .00 / dewar temperature, deg C
FILTERS = ' 0 0 ' / filter bolt positions
TRIMSEC = '[61:248,7:574]' / final frame trim area
BIASSEC = '[401:421,1:576]' / overscan area in raw frame
DATASEC = '[1:385,1:576]' / active detector area in raw frame
CCDSUM = ' 1 1 ' / on chip summation (x,y)
DISPAXIS= 1
APFORMAT= 'onedspec'
APNUM1 = '1 1 1 1 576'
BEAM-NUM= 1
APCENTER= ' 19.77 288.00'
APLOW = ' -2.86 -287.00'
APHIGH = ' 2.71 288.00'
CTYPE1 = 'LINEAR '
CUNIT1 = 'angstroms'
REFSPEC1= 'lamp.cal'
CRPIX1 = 1.
CRVAL1 = 6366.599
CDELT1 = 4.240688
W0 = 6366.599
WPC = 4.240688
NP1 = 0
NP2 = 576
DC-FLAG = 0
HISTORY 'KPNO-IRAF' /
HISTORY '05-02-89' /
HISTORY 'CTIO-MTN' / origin of tape
HISTORY New copy of x49[130:180,*]
HISTORY '29-01-90' /
HISTORY New copy of nx49.imh
*****************************************************************************
while a successful one looks like:
*****************************************************************************
x47.fit[610][real]: PROG1073
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [610], length of user area 1539 s.u.
Created Thu 16:27:31 02-Nov-2006, Last modified Thu 15:27:31 02-Nov-2006
Pixel file "x47.fit" [ok]
OBJECT = 'PROG1073' /
ORIGIN = 'KPNO-IRAF' /
DATE = '2006-11-02T20:27:31'
IRAFNAME= 'x47.imh ' / NAME OF IRAF IMAGE FILE
IRAF-MAX= 4.560281E-12 / DATA MAX
IRAF-MIN= 5.685950E-13 / DATA MIN
IRAF-BPX= 32 / DATA BITS/PIXEL
IRAFTYPE= 'REAL ' / PIXEL TYPE
BUNIT = 'FLAM ' / BRIGHTNESS UNIT
DATE-OBS= '24/11/85' / DATE CREATED DD/MM/YY
DATA GENERAL ECLIPSE MV8000
CERRO TOLOLO INTERAMERICAN OBSERVATORY
CASILLA 603 LA SERENA CHILE
COMMENT = 'M47Xa'
CRPIX1 = 1.000000000000E+00 / REF POINT PIXEL LOCATION
CRVAL1 = 6392 / REF POINT VALUE
CDELT1 = 4.0 / COORD VALUE INCREMENT WITH COUNT
CTYPE1 = 'LINEAR ' / COORD TYPE: VALUE
SUBTYPE = 0 / 0:OBJ, 1:MIDY, 2:LAMP, 3:WCAL 4:FCAL
UT = ' 0:00:00.00' / UNIVERSAL TIME
NUL = 0 / # USELESS PIXELS ON LEFT
NUR = 0 / # USELESS PIXELS ON RIGHT
TELESCOP= 0 / 1:0.9M, 2:1.5M, 3:4.0M
SNAME = ' ' / STANDARD LAMP NAME
ITIME = 20 / INTEGRATION TIME
AIRMASS = 1.010371208191E+00 / AIRMASS
EPOCH = 1.985000000000E+03 / EPOCH (YEARS)
ST = ' 7:15:22.00' / SIDEREAL TIME
RA = ' 7:31:18.00' / RIGHT ASCENSION
DEC = '-22:39:59.00' / DECLINATION
SFIT = '1 '
HISTORY 'KPNO-IRAF' /
HISTORY '25/11/87' /
HISTORY ' 5/12/85' / DATE WRITTEN DD/MM/YY
HISTORY 'CTIO ' / TAPE WRITING INSTITUTION
HISTORY New copy of x47
**********************************************************************************
Obviously, they are very different and written some years apart. I hope someone can tell me what header keywords have to be added or modified so that I can get dispcor to run on them. I have no trouble displaying the spectra with splot and didn't realize there was a problem until running dispcor.
I tried a number of hedits but no joy.
Thanks.
Warning: Cannot open file (database/eclamp.cal)
Warning: Cannot open file (database/idlamp.cal)
Warning: x49.fit: Dispersion data not found
The header of this example of an UNsuccessful one is:
******************************************************************************
x49.fit[576][real]: - Aperture 1
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [576], length of user area 2592 s.u.
Created Fri 11:26:53 12-Dec-2008, Last modified Thu 15:27:31 02-Nov-2006
Pixel file "x49.fit" [ok]
OBJECT = ' - Aperture 1' /
ORIGIN = 'KPNO-IRAF' /
DATE = '2006-11-02T20:27:31'
IRAFNAME= 'x49.imh ' / NAME OF IRAF IMAGE FILE
IRAF-MAX= 1.010321E0 / DATA MAX
IRAF-MIN= 2.701004E-1 / DATA MIN
IRAF-BPX= 32 / DATA BITS/PIXEL
IRAFTYPE= 'REAL ' / PIXEL TYPE
OBSERVAT= 'CTIO' / origin of data
CCDPICNO= 157 / original ccd picture number
EXPTIME = 20 / actual integration time (seconds)
DARKTIME= 20 / total elapsed time (seconds)
OTIME = 20 / shutter open time (seconds)
IMAGETYP= 'OBJECT ' / object,dark,bias,etc.
DATE-OBS= ' 31/01/89' / date (dd/mm/yy) of observation
RA = ' 7:30:34.00' / right ascension
DEC = '-22:01:53.00' / declination
EPOCH = 1989.5 / epoch of ra and dec
ZD = ' 0:00:24.00' / zenith distance
UT = ' 5:06:49.00' / universal time
ST = ' 9:09:23.00' / sidereal time
HA = ' 01:39:00' / hour angle (h-m-s)
AIRMASS = 1.091 / airmass
DETECTOR= ' 10 ' / detector (ccd type, photon counter, etc)
VEBGAIN = 54 / veb gain setting
SECPPIX = .404 / sec of arc per pixel
PREFLASH= .000000 / preflash time (seconds)
CAMTEMP = .00 / camera temperature, deg C
DEWTEMP = .00 / dewar temperature, deg C
FILTERS = ' 0 0 ' / filter bolt positions
TRIMSEC = '[61:248,7:574]' / final frame trim area
BIASSEC = '[401:421,1:576]' / overscan area in raw frame
DATASEC = '[1:385,1:576]' / active detector area in raw frame
CCDSUM = ' 1 1 ' / on chip summation (x,y)
DISPAXIS= 1
APFORMAT= 'onedspec'
APNUM1 = '1 1 1 1 576'
BEAM-NUM= 1
APCENTER= ' 19.77 288.00'
APLOW = ' -2.86 -287.00'
APHIGH = ' 2.71 288.00'
CTYPE1 = 'LINEAR '
CUNIT1 = 'angstroms'
REFSPEC1= 'lamp.cal'
CRPIX1 = 1.
CRVAL1 = 6366.599
CDELT1 = 4.240688
W0 = 6366.599
WPC = 4.240688
NP1 = 0
NP2 = 576
DC-FLAG = 0
HISTORY 'KPNO-IRAF' /
HISTORY '05-02-89' /
HISTORY 'CTIO-MTN' / origin of tape
HISTORY New copy of x49[130:180,*]
HISTORY '29-01-90' /
HISTORY New copy of nx49.imh
*****************************************************************************
while a successful one looks like:
*****************************************************************************
x47.fit[610][real]: PROG1073
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [610], length of user area 1539 s.u.
Created Thu 16:27:31 02-Nov-2006, Last modified Thu 15:27:31 02-Nov-2006
Pixel file "x47.fit" [ok]
OBJECT = 'PROG1073' /
ORIGIN = 'KPNO-IRAF' /
DATE = '2006-11-02T20:27:31'
IRAFNAME= 'x47.imh ' / NAME OF IRAF IMAGE FILE
IRAF-MAX= 4.560281E-12 / DATA MAX
IRAF-MIN= 5.685950E-13 / DATA MIN
IRAF-BPX= 32 / DATA BITS/PIXEL
IRAFTYPE= 'REAL ' / PIXEL TYPE
BUNIT = 'FLAM ' / BRIGHTNESS UNIT
DATE-OBS= '24/11/85' / DATE CREATED DD/MM/YY
DATA GENERAL ECLIPSE MV8000
CERRO TOLOLO INTERAMERICAN OBSERVATORY
CASILLA 603 LA SERENA CHILE
COMMENT = 'M47Xa'
CRPIX1 = 1.000000000000E+00 / REF POINT PIXEL LOCATION
CRVAL1 = 6392 / REF POINT VALUE
CDELT1 = 4.0 / COORD VALUE INCREMENT WITH COUNT
CTYPE1 = 'LINEAR ' / COORD TYPE: VALUE
SUBTYPE = 0 / 0:OBJ, 1:MIDY, 2:LAMP, 3:WCAL 4:FCAL
UT = ' 0:00:00.00' / UNIVERSAL TIME
NUL = 0 / # USELESS PIXELS ON LEFT
NUR = 0 / # USELESS PIXELS ON RIGHT
TELESCOP= 0 / 1:0.9M, 2:1.5M, 3:4.0M
SNAME = ' ' / STANDARD LAMP NAME
ITIME = 20 / INTEGRATION TIME
AIRMASS = 1.010371208191E+00 / AIRMASS
EPOCH = 1.985000000000E+03 / EPOCH (YEARS)
ST = ' 7:15:22.00' / SIDEREAL TIME
RA = ' 7:31:18.00' / RIGHT ASCENSION
DEC = '-22:39:59.00' / DECLINATION
SFIT = '1 '
HISTORY 'KPNO-IRAF' /
HISTORY '25/11/87' /
HISTORY ' 5/12/85' / DATE WRITTEN DD/MM/YY
HISTORY 'CTIO ' / TAPE WRITING INSTITUTION
HISTORY New copy of x47
**********************************************************************************
Obviously, they are very different and written some years apart. I hope someone can tell me what header keywords have to be added or modified so that I can get dispcor to run on them. I have no trouble displaying the spectra with splot and didn't realize there was a problem until running dispcor.
I tried a number of hedits but no joy.
Thanks.
Mike Fitzpatrick wrote on Oct 09, 2009
Try deleting the REFSPEC1 keyword from the problem image, the task is trying to use a previous solution stored in that file.
-Mike
-Mike
D. Jack MacConnell wrote on Oct 09, 2009
Thanks for the quick and correct fix! Deleting REFSPEC1 keyword does the trick although the spectra with value lamp2
worked went through dispcor successfully.
worked went through dispcor successfully.
Last post on Oct 09, 2009