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 

splot specturm

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



Joined: 02 Oct 2009
Posts: 12

PostPosted: Mon Oct 05, 2009 8:56 pm    Post subject: splot specturm Reply with quote

Hi! I am a beginner on iraf script.I am writing a script that would input a .fit image file then rspectext the image file to an IRAF image spectra and at last splot the output iraf spectra. And my script look like this:

procedure askchan
string input
string output
begin
string image10, image20
image10=input ; rspectext(image10)=output
splot(output)
end
But when I try running the script I keep having errors, can somebody help?
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Wed Oct 07, 2009 12:19 am    Post subject: Reply with quote

Quote:

rspectext(image10)=output


This is an invalid statement, I think you meant

Code:

image20=output
rspectext(image20)


You didn't say what error you were seeing specifically. Since the task has parameters (i.e. anything declared between the 'procedure' and the 'begin') you'll need to declare the task as

Code:
cl> task askchan = /path/askchan.cl


If you want the input/output parameter to be supplied on the command line you'll need to declare them as part of the procedure statement,i.e.

Code:
procedure askchan (input, output)


-Mike
Back to top
View user's profile Send private message
kwkchan



Joined: 02 Oct 2009
Posts: 12

PostPosted: Wed Oct 07, 2009 11:40 pm    Post subject: Reply with quote

fitz, I try to rewrite my script according to you instruction as follow
procedure askchan (input, output)
string input
string output
begin
string in, out
in=input ; out=output
rspectext(in)
splot(out)
end
I try to run it but still have an error which saids "task "rspectext" not found"
can anyone help me figure out what is wrong?
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Oct 08, 2009 1:30 am    Post subject: Reply with quote

Be sure to load the ONEDSPEC package before you run your script.
Back to top
View user's profile Send private message
kwkchan



Joined: 02 Oct 2009
Posts: 12

PostPosted: Thu Oct 08, 2009 6:51 am    Post subject: Reply with quote

Got it work thanks a lot Very Happy !
Back to top
View user's profile Send private message
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.11 seconds