Welcome to iraf.net Thursday, May 02 2024 @ 08:01 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 starfind
   
dbrenner
 06/09/2009 06:39PM (Read 2232 times)  
++++-
Regular Member

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

 
Profile Email
 Quote
fitz
 06/09/2009 06:39PM  
AAAAA
Admin

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

 
Profile Email
 Quote
dbrenner
 06/09/2009 06:39PM  
++++-
Regular Member

Status: offline


Registered: 05/05/2006
Posts: 115
Great. That worked.
Now how do I get them to iraf variables?

 
Profile Email
 Quote
fitz
 06/09/2009 06:39PM  
AAAAA
Admin

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

 
Profile Email
 Quote
   
Content generated in: 0.12 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login