View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Problems putting hselect result into variables

Felipe Navarete wrote on Jul 14, 2010

Hi there!
I'm trying to add the result from hselect into a variable in a cl script. I'm doing it in the following way:

string object
arquiv="file.fits" #calls the file which I'm working
hselect (arquiv,"OBJECT",yes) | scan(object)

The problem comes because the field OBJECT is filled with expressions and not just by a single word. When I print "object", only the first word were recorded.

For example, the OBJECT content is "Object Filter H2" and the object variable just recorder "Object". Any suggestion for solving it?

Cheers,
Felipe Navarete

Mike Fitzpatrick wrote on Jul 14, 2010

Instead of "string object", use "struct object" This will allow you to store all the words in the value.

Felipe Navarete wrote on Jul 14, 2010

Thanks for your suggestion. It worked perfectly!

Last post on Jul 14, 2010