View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

problem with hedit

Philip Massey wrote on Jun 15, 2007

Hi, Mike et al....

I'm having a very peculiar problem with some IMACS spectral data from Magellan data. doslit (in the ctio package) refuses to assign comps appropriately, and I eventually traced the problem to the fact that the headers contain "UT-TIME" as opposed to (say) just "UT" as the time stamp. I attempted the following:

hedit ccd*.fits "UT" "(UT-TIME)" up+ ver- show+ add+

Now, what this SHOULD have done (in my humble opinon) was add a key word
"UT" and assign the value from UT-TIME to it. But, instead I get the error message:
ERROR: Image header parameter not found (UT)
After I've added the UT word to the header with a bogus values, and rerun the
command (without the "add+") I get:
ERROR: Image header parameter not found (TIME)

So, I've come to the conclusion (rightly or wrongly) that the "-" is badly
confusing things.

Nevertheless I can do a
hselect ccd*.fits UT-TIME yes
and see the correct values.

Suggestions? I'm running 2.12.2 on a red hat 9 machine, if it makes any difference. I've temporarily gotten around this by instead telling doslit to do
a "match" rather than "interp" for the comps, and I'm specifying them one by one, but the real question is why isn't hedit ccd*.fits UT "(UT-TIME)"
not working.

I'll include a sample header.

THANKS!
---phil

cl> imhead ccd0076c4.fits l+
ccd0076c4.fits[2044,2027][real]: Sh18+Sh25
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [2044,2027], length of user area 5589 s.u.
Created Mon 11:53:47 11-Jun-2007, Last modified Thu 13:44:59 14-Jun-2007
Pixel file "ccd0076c4.fits" [ok]
EXTEND = F / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2007-06-11T18:53:47' / Date FITS file was generated
IRAF-TLM= '13:44:59 (14/06/2007)' / Time of last modification
OBJECT = 'Sh18+Sh25' / Name of the object observed
BUNIT = 'DU/PIXEL'
OBSERVER= 'N.Morrell' / observer name
TELESCOP= 'Baade_Mag_1' / telescope
SITENAME= 'LCO'
SITEALT = 2400 / meters
SITELAT = -29.01423
SITELONG= -70.69242
TIMEZONE= 4
DATE-OBS= '2006-04-15' / UT date (start)
UT-DATE = '2006-04-15' / UT date (start)
UT-TIME = '00:07:39' / UT time (start) 459 seconds
UT-END = '00:11:49' / UT time (end) 709 seconds
LC-TIME = '20:07:39' / local time (start) 72459 seconds
NIGHT = '14Apr2006' / local night
INSTRUME= 'IMACS Long-Camera' / instrument name
SCALE = 0.111 / x 0.999 arcsec/pixel
EGAIN = 0.90 / electrons/DU
ENOISE = 4.90 / electrons/read
NCHIPS = 8
CHIP = 4 / chip-ID
CHOFFX = -347.812 / x-offset [arcsec]
CHOFFY = -229.601 / y-offset [arcsec]
RA = ' 11:15:11.4' / right ascension
RA-D = 168.7972917 / degrees
DEC = '-61:16:41.3' / declination
DEC-D = -61.2781389 / degrees
EQUINOX = 2000.00000 / of above coordinates
ASECS = 0.0 / arcseconds
DSECS = 0.0 / arcseconds
EPOCH = 2006.28493 / epoch (start)
AIRMASS = 1.217563 / airmass (start)
ST = 32220.8 / siderial time: 08:57:00 (start)
GRAV-A1 = -80.64 / rotator gravity angle (start)
GRAV-A2 = -78.93 / rotator gravity angle (end)
GRAV-MIN= -80.64 / rotator gravity angle (min)
GRAV-MAX= -78.93 / rotator gravity angle (max)
ROTANGLE= 303.57 / rotator offset angle
CAL-LAMP= / calibration lamp(s)
FILENAME= 'ccd0076c4'
EXPTYPE = 'Object' / exposure type
FILTER = 'Spectroscopic' / filter
DISPERSR= 'Gra-600-8.6' / disperser
G-ANGLE = 9.680 / grating angle
SLITMASK= 'long0.7' / slit-mask
DETFOCUS= 8775.0 / detector-focus
L05FOCUS= -0.0 / L05-focus
MMTF-Z = 0 / Etalon-Z (spacing)
EXPTIME = 250.000 / exposure time
NLOOPS = 3 / # of loops per sequence
LOOP = 3 / # within this sequence
BINNING = '1x1' / binning
SPEED = 'Fast' / readout speed
NOVERSCN= 64 / overscan pixels
NBIASLNS= 64 / bias lines
DEWARORI= 'Nod&Shuffle' / dewar orientation
COMMENT = / comment
NSHUFFLE= 0 / physical pixels
NOD-RA = 0.0 / telscope nod [arcsec]
NOD-DEC = 0.0
DWELTIME= 0.0 / dwell time
NCYCLES = 0 / nod/shuffle cycles
SUBRASTR= '1:2048,1:4096' / subraster x1:x2,y1:y2
TEMPCCD = -110.0 / CCD temperature [C]
TEMPSTR = 14.4 / structure temperature [C]
SOFTWARE= 'Version 1.09 (Mar 7 2006, 13:22:01)'
FITSVERS= '1.03' / FITS header version
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
COMMENT
WCSDIM = 2
LTM1_1 = 1.
LTM2_2 = 1.
WAT0_001= 'system=physical'
WAT1_001= 'wtype=linear'
WAT2_001= 'wtype=linear'
TRIM = 'Jun 7 11:33 Trim data section is [1:2044,2065:4091]'
OVERSCAN= 'Jun 7 11:33 Overscan section is [2054:2107,2065:4091] with mean=103'
CCDSEC = '[1:2044,2065:4091]'
LTV2 = -2064.
CCDMEAN = 4.712404
CCDMEANT= 866030027
CCDPROC = 'Jun 11 11:53 CCD processing done'
ZEROCOR = 'Jun 7 14:32 Zero level correction image is Zeroc4'
FIXPIX = 'Jun 8 12:03 Bad pixel file is c4bad.pl'
FLATCOR = 'Jun 11 11:53 Flat field image is nFlats1c4 with scale=0.9999984'

Mike Fitzpatrick wrote on Jun 15, 2007

Hi Phil,

I hate to say it, but see the help page: The '@' symbol needs to be used to dereference params with a hyphen, otherwise it is interpreted as e.g. "UT minus TIME". So, try

cl> hedit ccd*.fits UT '(@"UT-TIME")' up+ ver- show+ add+


This will update the image with a UT keyword that is the value stored in the UT-TIME keyword.

Cheers,
-Mike

Philip Massey wrote on Jun 15, 2007

THANKS!

---phil

Last post on Jun 15, 2007