Welcome to iraf.net Thursday, May 02 2024 @ 08:01 AM GMT
dbrenner |
06/09/2009 06:39PM (Read 2232 times)
|
|
|
Status: offline
Registered: 05/05/2006
Posts: 115
|
Hi there,Does anyone know how to extract the xcenter and ycenter data directly from starfind without reading the file?Thanks
Doug
|
|
|
|
fitz |
06/09/2009 06:39PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The FIELDS task can be used to pull out selected columns, e.g.[code:1:f187a65e7e]
cl> starfind dev$wpix default 1.25 100.
cl> fields wpix.obj.1 "1-2"
[/code:1:f187a65e7e]Note the blank lines are preserved in the output, [i:f187a65e7e]some[/i:f187a65e7e] 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
|
|
|
|
dbrenner |
06/09/2009 06:39PM
|
|
|
Status: offline
Registered: 05/05/2006
Posts: 115
|
Great. That worked.
Now how do I get them to iraf variables?
|
|
|
|
fitz |
06/09/2009 06:39PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
For that, you [b:17abc3e7c8]will[/b:17abc3e7c8] need to read the file, e.g.[code:1:17abc3e7c8]
starfind ("dev$wpix", "default", 1.25, 100.) list = "wpix.obj.1"
while (fscan (list,x,y) != EOF) {
if (nscan() == 2) {
print (x, " ", y)
}
}
[/code:1:17abc3e7c8]The nscan() is necessary to skip the blank lines, the comments will be skipped automatically.-Mike
|
|
|
|
| |
|
Content generated in: 0.12 seconds |
|