Welcome to iraf.net Tuesday, May 21 2024 @ 07:25 PM GMT
Nicolastro |
12/01/2009 04:05PM (Read 2439 times)
|
|
|
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[x1 2,y1:y2]".
And that return me that there is a Syntax Error.
Can you help me ?ThanksNicolas
|
|
|
|
fitz |
12/01/2009 04:05PM
|
|
|
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.
|
|
|
|
Nicolastro |
12/01/2009 04:05PM
|
|
|
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 ?
|
|
|
|
fitz |
12/01/2009 04:05PM
|
|
|
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
|
|
|
|
Nicolastro |
12/01/2009 04:05PM
|
|
|
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
|
|
|
|
| |
|
Content generated in: 0.18 seconds |
|