View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

header fields…

Andrea Cardullo wrote on Apr 11, 2008

Hi everybody (and sorry for my probaly stupid, but continuous asking.. where I am nobody is able to help me, usually!)Today I have a problem with hselect-imgets-imheader!
I have an enormous header with the usual paramteres and a lot of lines like these:
...
HIERARCH ESO INS SLIT9 OBJ RA= 223.075300 / RA (J2000) of object
HIERARCH ESO INS SLIT9 OBJ DEC= 4.573856 / DEC (J2000) of object
HIERARCH ESO INS SLIT9 X = 29.490000 / x co-ordinate of SLIT i
HIERARCH ESO INS SLIT9 Y = -55.074000 / y co-ordinate of SLIT i
HIERARCH ESO INS SLIT9 DIMX = 3.337000 / Size in x direction of SLIT i
...
I would like to store in a file (or to see on window) only the field containing SLIT* X and, say, SLIT* OBJ RA
but I have no idea about how to say to imhead-hselect-imgets to do this.
I tryied with
imhead name.fits lo+ |grep *SLIT*X*
hselect name.fits *SLIT*X* yes
and some other attempts but it doesn't work...
How should I write the espression that I want to filter? Exspecially when it has blanck spaces (SLIT* X, for ex.)? Even in imhead and hselect.
And for ex. if I want to store two different field, as hselect allow, how I should write all the expression?
(say: $I,EXPTIME,*SLIT1 X*,*SLIT2 Y*)
Thanks

Mike Fitzpatrick wrote on Apr 11, 2008

See http://iraf.net/article.php?story=20060508144144423&query=esoselect

You can also search the forums for 'esoselect' from the banner bar.

-Mike

Francisco Valdes wrote on Apr 11, 2008

Hello,

The way I would do this is with imheader piped into match:


cl> imhead name.fits l+ | match "SLITX[0-9] OBJ RA"


Note that match provides a powerful string matching syntax. The main confusion people have is that * is different from what it means in directory matching. It is more similar to regular expressions except '?' means any character instead of '.' in regular expressions.

Yours,
Frank Valdes

Last post on Apr 11, 2008