graph in pyraf / remark on variable declarations
fmeynadier wrote on Mar 03, 2006
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 !
--
Frédéric Meynadier
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 !
--
Frédéric Meynadier
Mike Fitzpatrick wrote on Mar 03, 2006
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?
Cheers,
-Mike
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?
Cheers,
-Mike
Guest wrote on Mar 03, 2006
fitz
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
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 ?
Cheers,
--
Frédéric Meynadier
Last post on Mar 03, 2006