Welcome to iraf.net Friday, May 03 2024 @ 01:35 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 No Param File
   
piverson
 01/04/2008 06:12PM (Read 7002 times)  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
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 fileWe 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.clAny idea what could be happening? It should create the parameter file at login, but it doesn't seem to.Thanks.-Paul

 
Profile Email
 Quote
fitz
 01/04/2008 06:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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[code:1:212b3bfb7a]
task $ap_pierside_obhead_v_1 = /home/piverson/research/ap_pierside_obhead_v_1.cl [/code:1:212b3bfb7a]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

 
Profile Email
 Quote
piverson
 01/04/2008 06:12PM  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
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][color=blue: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.nimageshselect ("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
[/color:e06664a361][/size:e06664a361]

 
Profile Email
 Quote
fitz
 01/04/2008 06:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:8f104c3bb7]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
:
:[/quote:8f104c3bb7]The 'end' should be at the end of the script, the remainder is I think being seen as a syntax error.-Mike[/quote]

 
Profile Email
 Quote
piverson
 01/04/2008 06:12PM  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
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

 
Profile Email
 Quote
fitz
 01/04/2008 06:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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

 
Profile Email
 Quote
piverson
 01/04/2008 06:12PM  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
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 thereHowever 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

 
Profile Email
 Quote
piverson
 01/04/2008 06:12PM  
+++--
Chatty

Status: offline


Registered: 07/10/2007
Posts: 42
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

 
Profile Email
 Quote
   
Content generated in: 0.23 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