View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

hselect’s missing field broken?

Jason Quinn wrote on Jan 02, 2009

I noticed today that the hselect command on my system is not working properly when the missing parameter is used. This is odd because it was working about half a year ago. My only guess is that somehow the v2.14.1 patch did something to mess it up. Let's just see if anybody else can reproduce the problem.


cl>imcopy dev$pix testfile.fits

cl>hselect testfile.fits  $I,object yes
testfile.fits   "m51  B  600s"

cl>hselect testfile.fits  $I,$object yes missing="dilbert"
testfile.fits   dilbert


The object keyword is defined in dev$pix as you can see. I am using the dollar sign prefixing, indicating that I want to use the missing capability but it still prints the missing field even though the keyword isn't missing.

Jason

Mike Fitzpatrick wrote on Jan 02, 2009

Hi Jason,

Thanks for the report, I could easily reproduce the problem but since the hedit/hselect tasks weren't changed since the initial v2.14 release so I think you might be mistaken about seeing this work previously. In any case I've posted a buglog describing the problem.

If you want to change the code yourself, the file to edit is images$imutil/src/hedit.x at about line 610, change the code to read:


        if (field[1] == '$' && field[2] == 'I')
            call strcpy (image, strval, maxch)
        else if (field[1] == '$') 
            call imgstr (im, field[2], strval, maxch)
        else
            call imgstr (im, field, strval, maxch)


To relink, login as 'iraf' and


% cd $iraf
% mkpkg redhat              # reset architecture
% cd pkg/images
% mkpkg update             # relink and install


Cheers,
-Mike

Last post on Jan 02, 2009