Posted: Fri Mar 03, 2006 5:19 pm Post subject: graph in pyraf / remark on variable declarations
Hello,
Due to a disk crash I had to reinstall iraf and pyraf. (my system is now Mandriva 2006. Proceeding as I used to, xgterm graphs won't display with pyraf. Error message :
--> splot spectre.fits
Traceback (innermost last):
File "<CL script CL1>", line 1, in ?
TypeError: list indices must be integers
I don't have any idea of what I have to fix... Graphs display well with cl/ecl.
So I suppose this concerns the pyraf team, but I was wondering if anybody had faced the same problem and could share the solution on this forum.
- besides, I found that CL scripts standards are more strict in v2.12.2a : if I am not mistaken, variables *must* be declared right after the "begin" statement. Some of my old (working !) scripts were c++/c99 style, with declarations in the middle of the script. This doesn't seem to work anymore. To my surprise, the cl gives the correct faulty line, whereas the ecl does not !
I can't help with the pyraf part of your question, you might try the STScI helpdesk (help@stsci.edu) if you don't get an answer here. First thing to try though is to unlearn the task, this may be a simple parameter translation problem.
You're right that the error line numbers are different in the cl vs. ecl, this is in part due to how internal CL errors are handled. However, declarations in the middle of a procedure have never been allowed and should be an error in all cases. The exception is perhaps when using redirection on scripts (e.g. "cl < foo.cl") versus procedure scripts. Can you post an example of one of these inline declarations that (used to) work?
I can't help with the pyraf part of your question, you might try the STScI helpdesk (help@stsci.edu) if you don't get an answer here. First thing to try though
is to unlearn the task, this may be a simple parameter translation problem.
Thanks for the trick, but it does not work. I will try to contact STScI.
fitz wrote:
You're right that the error line numbers are different in the cl vs. ecl, this is in part due to how internal CL errors are handled. However, declarations in the middle of a procedure have never been allowed and should be an error in all cases.
My mistake : tolerance for variable declaration in the middle of a procedure is only a pyraf feature. I didn't realise that my "testing" system was under pyraf.
So, apologies for my off-topic post !
And many thanks for the development of ecl. Tab completion and, more generally, command-line editing were a real need (which were my main motivations for installing pyraf...). Maybe one suggestion : would it be possible to tab-complete paths without having to type "./" at the beginning ?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum