splot specturm
kwkchan wrote on Oct 05, 2009
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?
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?
Mike Fitzpatrick wrote on Oct 05, 2009
rspectext(image10)=output
This is an invalid statement, I think you meant
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
cl> task askchan = /path/askchan.clIf 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.
procedure askchan (input, output)-Mike
kwkchan wrote on Oct 05, 2009
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?
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?
Mike Fitzpatrick wrote on Oct 05, 2009
Be sure to load the ONEDSPEC package before you run your script.
kwkchan wrote on Oct 05, 2009
Got it work thanks a lot :D !
Last post on Oct 05, 2009