View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

importing ds9 datamin into an IRAF script

nwj781 wrote on Jul 16, 2009

When an image is displayed with ds9 the terminal also displays z1, a variable representing the datamin. If I wanted to use this variable in a script how would I access it?

Mike Fitzpatrick wrote on Jul 16, 2009

If what you want is to capture the output of the DISPLAY command, try something like

display ("dev$pix", 1) |& scanf ("z1=%g z2=%g", z1, z2)


where I've assumed you declared 'z1' and 'z2' as local script variables. If you mean you want the scale values used by DS9 loading an image outside of IRAF, then you'll need to use one of the XPA access points to ask for it using 'xpaget' declared as a foreign command (note I'm not even sure there is such an access point, you'd have to check).

-Mike

Last post on Jul 16, 2009