Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

graph in pyraf / remark on variable declarations

 
Post new topic   Reply to topic    iraf.net Forum Index -> Systems
View previous topic :: View next topic  
Author Message
fmeynadier



Joined: 27 Dec 2005
Posts: 1

PostPosted: Fri Mar 03, 2006 5:19 pm    Post subject: graph in pyraf / remark on variable declarations Reply with quote

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
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3255
Location: Tucson

PostPosted: Sat Mar 04, 2006 4:47 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Mar 06, 2006 10:34 am    Post subject: Reply with quote

fitz wrote:
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 ?

Cheers,

--
Frédéric Meynadier
Back to top
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Systems All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.12 seconds