Welcome to iraf.net Saturday, May 11 2024 @ 03:28 PM GMT
kwkchan |
10/05/2009 08:56PM (Read 3591 times)
|
|
|
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?
|
|
|
|
fitz |
10/05/2009 08:56PM
|
|
|
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
|
|
|
|
kwkchan |
10/05/2009 08:56PM
|
|
|
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?
|
|
|
|
fitz |
10/05/2009 08:56PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Be sure to load the ONEDSPEC package before you run your script.
|
|
|
|
kwkchan |
10/05/2009 08:56PM
|
|
|
Status: offline
Registered: 10/02/2009
Posts: 12
|
Got it work thanks a lot !
|
|
|
|
| |
|
Content generated in: 0.17 seconds |
|