View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

starfind

douglas brenner wrote on Jun 09, 2009

Hi there,

Does anyone know how to extract the xcenter and ycenter data directly from starfind without reading the file?

Thanks
Doug

Mike Fitzpatrick wrote on Jun 09, 2009

The FIELDS task can be used to pull out selected columns, e.g.


cl> starfind dev$wpix default 1.25 100.
cl> fields wpix.obj.1 "1-2"


Note the blank lines are preserved in the output, some tasks which expect (x,y) input might be able to use the file directly by assuming the coords are the first two columns and ignoring the rest of the line.

-Mike

douglas brenner wrote on Jun 09, 2009

Great. That worked.
Now how do I get them to iraf variables?

Mike Fitzpatrick wrote on Jun 09, 2009

For that, you will need to read the file, e.g.


    starfind ("dev$wpix", "default", 1.25, 100.)

    list = "wpix.obj.1"
    while (fscan (list,x,y) != EOF) {
        if (nscan() == 2) {
            print (x, "  ", y)
        }
    }


The nscan() is necessary to skip the blank lines, the comments will be skipped automatically.

-Mike

Last post on Jun 09, 2009