Welcome to iraf.net Friday, May 17 2024 @ 02:11 AM GMT
Anonymous: Guest |
03/03/2006 12:19PM (Read 3250 times)
|
|
|
|
Dear.
I deeply appreciate if someone can help me.
I'm writing a iraf script something like
----------------------------
slist(filename, >> "output")
wc "output" | fields ("STDIN", "6") | scan (num_aper)
---------------------------
(part of my script) and I got a following error message.ERROR on line 309: Attempt to access undefined local variable
`num_aper'.This script works fine with my laptop computer but
it does not work with my workstation with dual xeon processors.
(I'm using Suse 9.1 professional for both machines.)
Could you possibly tell me what causes this problem?
Thank you very much.Jae-Woo Lee, Ph.D.
Assistant Professor
Dept. Astronomy & Space Science, Sejong University
98 Gunja-Dong, Gwangjin-Gu
Seoul, 143-747, KoreaT) 82-2-3408-3966
F) 82-2-3408-3916
|
|
|
|
fitz |
03/03/2006 12:19PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
[quote:b33a5435bb]slist(filename, >> "output")
wc "output" | fields ("STDIN", "6") | scan (num_aper)
---------------------------
(part of my script) and I got a following error message.ERROR on line 309: Attempt to access undefined local variable
`num_aper'.[/quote:b33a5435bb] I'm not quite sure I understand your intention in the code snippet: The SLIST task produces a table where column 6 is the starting wavelength, but the 'wc' ouput only has four values in most cases. This means the FIELDS output should be empty and so 'num_aper' isn't defined and would account for the error. If all you want to do is count the number of lines of output from SLIST you could do it as slist (filename) | count ("STDIN") | scan (num_aper)To make sure the value was read you can use the nscan() afterward to verify at least one value was scanned. I can't explain why it works on one machine and not the other, the 'wc' should produce only 4 columns in an case. Hope this helps.Cheers,
-Mike
|
|
|
|
| |
|
Content generated in: 0.06 seconds |
|