Welcome to iraf.net Tuesday, May 21 2024 @ 07:25 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Script Error
   
Nicolastro
 12/01/2009 04:05PM (Read 2439 times)  
+----
Newbie

Status: offline


Registered: 12/01/2009
Posts: 3
hi !
I'm trying to make a script on IRAF to measure the noise in a aperture. So I use the task "imstat" in the following script :
[code:1:a0bed905ed]cl> list="coord.cat"
cl> while (fscan(list,s1) !=EOF){
>>> imstat s1 >> text.out
>>>}[/code:1:a0bed905ed]
in which coord.cat is a list where each line is "name[x1Angry2,y1:y2]".
And that return me that there is a Syntax Error.
Can you help me ?ThanksNicolas

 
Profile Email
 Quote
fitz
 12/01/2009 04:05PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
If [i:b61ae977d9]text.out[/i:b61ae977d9][ is a literal file name, it needs to be in quotes.

 
Profile Email
 Quote
Nicolastro
 12/01/2009 04:05PM  
+----
Newbie

Status: offline


Registered: 12/01/2009
Posts: 3
Thanks for your help, but now I have an other error . The variable s1 is not what is read by the task fscan in the file list, but s1 is 's1' during all the process. So in the file 'text.out' there is :
[code:1:22935a58d3]Error reading image s1 ...[/code:1:22935a58d3] Do you have an idea ?

 
Profile Email
 Quote
fitz
 12/01/2009 04:05PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try using the "program mode" syntax, i.e.[code:1:2db348eccf]
imstat (s1, >> "text.out")
[/code:1:2db348eccf]What you have now is called "compute mode" and is the style you would use at the CL prompt. I thought I tested this before my earlier reply and it worked either way, but if you are really using procedure script and your post was just a snippet then that would explain the error.-Mike

 
Profile Email
 Quote
Nicolastro
 12/01/2009 04:05PM  
+----
Newbie

Status: offline


Registered: 12/01/2009
Posts: 3
You're right !!!!Now all it's ok, thank you very much for your answer fitz.RegardsNicolas

 
Profile Email
 Quote
   
Content generated in: 0.18 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