View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

No Param File

Elden Paul Iverson wrote on Jan 04, 2008

Mike-

Craig and I are encountering the following problem when running a few of our scripts.

task `ap_pierside_obhead_v_1' has no param file

We tasked the script in the following way in our login.cl.

task ap_pierside_obhead_v_1 = /home/piverson/research/ap_pierside_obhead_v_1.cl

Any idea what could be happening? It should create the parameter file at login, but it doesn't seem to.

Thanks.

-Paul

Mike Fitzpatrick wrote on Jan 04, 2008

Does the task actually have parameters, i.e. any variable declared before the 'begin' statement or as an argument in the 'procedure' is considered a paramter. If not, the the task should be declared as

 
task $ap_pierside_obhead_v_1 = /home/piverson/research/ap_pierside_obhead_v_1.cl 


where the '$' indicates the task has no params. You might also try to unlearn it in case an earlier declaration or version of the script is being pulled from your uparm directory.

-Mike

Elden Paul Iverson wrote on Jan 04, 2008

Mike-

The script is pasted below. I know you don't recommend using the begin-end syntax that we did but it is the only way that we have found to be able to use optional prompts (i.e. prompts that only need to be called in certain circumstances).

We tried unlearning the task and then logging back in but it still didn't work.

[size=9:e06664a361]procedure ap_pierside_obhead_v_1 (E_or_W)

string E_or_W {prompt="Enter orientation of image",enum="E|W"}

begin
string EastWest
end

#variable declarations
int n=1
int numimg=1
real HA=0.0
real LST=0.0
real RA=0.0
string s1=""
string s2=""
string s3=""
string files=""
struct *list1

#deletes possibly incompatible datalists
del data*

hselect ("obj*","I,HJD",yes,>"datalist1")
tsort ("datalist1",2)
sections @datalist1
numimg=section.nimages

hselect ("obj*","$I",yes,>"datalistfiles")
hselect ("obj*","$I,LST,RA",yes,>"datalistLSTRAtemp1")

sed -e 's/" "/:/g' "datalistLSTRAtemp1" >"datalistLSTRAtemp2"

list1="datalistLSTRAtemp2"
while (fscan(list1,s1,s2,s3)!=EOF){
print (s2,>>"datalistLSTtemp")
print (s3,>>"datalistRAtemp")
}
sed -e 's/[^0-9:.]//g' "datalistLSTtemp" >"datalistLST"
sed -e 's/[^0-9:.]//g' "datalistRAtemp" >"datalistRA"

joinlines ("datalistfiles,datalistLST,datalistRA",>"datalisttotal")
list1="datalisttotal"
while (fscan(list1,s1,s2,s3)!=EOF){
files=(s1)
LST=real(s2)
RA=real(s3)

HA=LST-RA

if (HA<-0.3){
hedit (files,"PIER","E",add+,ver-)
rename (files,files//"-E",field="root")
if (n==1){
disp (files,1)
n=n+1
}
;
}
;
if (HA>0.3){
hedit (files,"PIER","W",add+,ver-)
rename (files,files//"-W",field="root")
}
;
if (HA<=-0.3&&HA>=0.3){
if (n!=1){
print ("Image in frame 1 is in East orientation")
}
;
if (n==1){
disp ("*obj*-"//numimg//"*",1)
print ("Image in frame 1 is in West orientation")
}
;
disp (files,2)

print ("")

EastWest=E_or_W

hedit (files,"PIER",EastWest,add+,ver-)
rename (files,files//"-"//EastWest,field="root")
}
;
}

#deletes possibly incompatible datalists
del data*

beep
[/size:e06664a361]

Mike Fitzpatrick wrote on Jan 04, 2008

procedure ap_pierside_obhead_v_1 (E_or_W)

string E_or_W {prompt="Enter orientation of image",enum="E|W"}

begin
string EastWest
end
:
:


The 'end' should be at the end of the script, the remainder is I think being seen as a syntax error.

-Mike[/quote]

Elden Paul Iverson wrote on Jan 04, 2008

Mike-

We are still having problems with "no param file". I don't know if it is our setup here or what but we have only had problems when putting the end statement at the end of the script.

Any other ideas?

Thanks.

-Paul

Mike Fitzpatrick wrote on Jan 04, 2008

Hi Paul,

The 'end' should definitely be the last line of the script. Without the proper input files I can't actually run your script, but I'd also suggest the 'struct' variables be declared before the 'begin'. Since the error is coming from the task itself and not something it calls, I'd unlearn the task or try logging into a CL started from a fresh MKIRAF someplace to eliminate any parameters problems. Lastly, before you run the script type 'd_trace' to have the CL trace execution of the script (post the last page of results if nothing pops out at you).

Cheers,
-Mike

Elden Paul Iverson wrote on Jan 04, 2008

Mike-

Thanks for all your help and for being patient. I tried what you suggested.

1. Placed "end" at the end of the script
2. Defined variables before "begin"
3. Did a new MKIRAF, and ran it in there

However the problem persists. Still no parameter file is created.

Here are the results of the d_trace:

ap_pierside_v_1
----- task cl - line 4 (CALL) -----
4 0+7: call ap_pierside_v_1
ERROR: task `ap_pierside_v_1' not found
cl_error: abort=1 trace=1 flpr=1
cl_error: code=1 do_err=1 errtype=1/1 task='cl'

I really don't know what is going on. I have scripted this way before without any problems but now I am "dead in the water" until I can fix this. If there is anything that I can send you or post here that will help you help me solve this issue please let me know.

Thanks.

-Paul

Elden Paul Iverson wrote on Jan 04, 2008

Mike-

I tried something on a whim and it happened to be the problem. The text editor I was using was only recognizing comments out to a particular character limit. My comments exceeded that limit and were therefore seen as code.

Thanks for your help.

-Paul

Last post on Jan 04, 2008