Welcome to iraf.net Saturday, May 11 2024 @ 03:28 PM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 splot specturm
   
kwkchan
 10/05/2009 08:56PM (Read 3591 times)  
+----
Newbie

Status: offline


Registered: 10/02/2009
Posts: 12
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?

 
Profile Email
 Quote
fitz
 10/05/2009 08:56PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:92b15597f0]
rspectext(image10)=output [/quote:92b15597f0]This is an invalid statement, I think you meant[code:1:92b15597f0]
image20=output
rspectext(image20)
[/code:1:92b15597f0]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:1:92b15597f0]cl> task askchan = /path/askchan.cl[/code:1:92b15597f0]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:1:92b15597f0]procedure askchan (input, output)[/code:1:92b15597f0]-Mike

 
Profile Email
 Quote
kwkchan
 10/05/2009 08:56PM  
+----
Newbie

Status: offline


Registered: 10/02/2009
Posts: 12
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?

 
Profile Email
 Quote
fitz
 10/05/2009 08:56PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Be sure to load the ONEDSPEC package before you run your script.

 
Profile Email
 Quote
kwkchan
 10/05/2009 08:56PM  
+----
Newbie

Status: offline


Registered: 10/02/2009
Posts: 12
Got it work thanks a lot Big Grin !

 
Profile Email
 Quote
   
Content generated in: 0.17 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login