Welcome to iraf.net Friday, April 26 2024 @ 06:26 AM GMT


 Forum Index > Help Desk > IRAFNet
 Strange problems with cl script/parameter file
   
btingley
 07/28/2008 01:51PM (Read 10197 times)  
+----
Newbie

Status: offline


Registered: 07/28/2008
Posts: 5
Hi Everyone,I've been beating my head against this problem for a couple of days now, without being able to solve it myself. Maybe someone here can point me in the right direction.I am attempting to run a cl script that someone gave me. It works for them and it works for them when they log into the same machine I am using. When I try to run the cl script (imal2.cl) myself WITHOUT a pre-existing .par file, I get the following message:cl> imal2
ERROR: Required parameter `reference' not defined.When I use the .par file from the person who gave me the script, I get the following message instead:cl> imal2
unmatched quotes in prompt field for `images'
unmatched quotes in prompt field for `coords'
unmatched quotes in prompt field for `reference'
unmatched quotes in prompt field for `shifts'
unmatched quotes in prompt field for `copyorg'
'ust specify at least name,type,mode for `
unmatched quotes in prompt field for `shiftimages'
unmatched quotes in prompt field for `verbose'
'ust specify at least name,type,mode for `
unmatched quotes in prompt field for `boxsize'
unmatched quotes in prompt field for `bigbox'
'ust specify at least name,type,mode for `
unmatched quotes in prompt field for `negative'
unmatched quotes in prompt field for `autoback'
unmatched quotes in prompt field for `background'
unmatched quotes in prompt field for `lower'
unmatched quotes in prompt field for `upper'
unmatched quotes in prompt field for `niterate'
unmatched quotes in prompt field for `tolerance'
'ust specify at least name,type,mode for `
'ad mode spec `\r' in `h
in `tmplist'
'ad mode spec `\r' in `h
in `imglist'
ERROR: cannot read parameter file `scripts$imal2.par'When I look at the parameter file, all of the parameters are enclosed by " ". However, judging from the error messages, IRAF is apparently looking for parameters to be enclosed by ` '. Does anyone know why this would happen?Cheers,Brandon Tingley

 
Profile Email
fitz
 07/28/2008 01:51PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
It is hard to comment without seeing either the script or the parameter file, could you please post these?If your uparm directory has a corrupted version of the parameters then you could try unlearning the task to start fresh, this might explain why you're having problems but your friend isn't.-Mike

 
Profile Email
btingley
 07/28/2008 01:51PM  
+----
Newbie

Status: offline


Registered: 07/28/2008
Posts: 5
OK, I'll post them.First the script:procedure imal2 (images, coords, reference)begin
bool shifts_found = no string l_images, l_coords, l_reference
string workimage
string imgfile, imcefile,modefile, shiftfile, trimsect, tmp, junk
string ajunk,bjunk,cjunk
int n
real xshift, yshift
struct line
print("A") imgfile = mktemp ("tmp$iag_tmp.")
l_images = images
l_reference = reference
l_coords = coords
print("B") sections (l_images, option="fullname", > imgfile)
imglist = imgfile
while (fscan (imglist,workimage) != EOF) {
imcefile = mktemp ("tmp$iac_tmp.")
shiftfile = mktemp ("tmp$ias_tmp.")
#don't shift previous shifted frames
print("C")
imgets(workimage,"IMSHIFT", >& "dev$null")
if (imgets.value != '0') {
print(workimage," already shifted by ",imgets.value)
goto endloop
} if (autoback) {
modefile = mktemp ("tmp$iam_tmp.")
imstat.fields = "mode"
imstat.format = no
imstat(workimage,>& modefile) tmplist = modefile
while(fscan(tmplist,background) == 1) {
print("\n",workimage," background set to ",background) }
delete (modefile, ver-, >& "dev$null") } print("D") imcentroid (workimage, coords=l_coords, reference=l_reference,
shifts=shifts,
boxsize=boxsize, bigbox=bigbox, negative=negative,
background=background, lower=lower, upper=upper,
niterate=niterate, tolerance=tolerance, verbose=verbose, >& imcefile
) if (verbose)
type (imcefile) # read the shifts
shifts_found = no
tmplist = imcefile
while (fscan (tmplist, line) != EOF) {
if (substr(line,1,7) == '#Shifts') {
shifts_found = yes
break
}
} if (shifts_found) {}
else{
print(workimage," no shift was calculated !")
print("Continue with next frame? (yes/no)")
n=scan(tmp)
if(stridx('yY',tmp) == 0) error (1, "aborted on request")
}
if (! shiftimages)
goto endloop
if (shifts_found) {
while (fscan (tmplist, junk, xshift, junk, yshift, junk) == 5){
print (xshift, " ", yshift, >& shiftfile)
}
if (copyorg) {
print("copying original image")
imcopy(workimage,"org_"//workimage,verbose=yes)
} print(workimage," being shifted by ",str(xshift)//" "//str(yshift)) imshift (workimage, workimage, shifts_file=shiftfile,
interp_type="nearest", boundary_type="nearest",
constant=0) hedit(workimage,"IMSHIFT",str(xshift)//" "//str(yshift),add=yes,delete=n
o,verify=no,update=yes,show=no)
} tmplist = ""endloop:
delete (imcefile, ver-, >& "dev$null")
delete (shiftfile, ver-, >& "dev$null")
} imglist = ""
delete (imgfile, ver-, >& "dev$null")end

 
Profile Email
btingley
 07/28/2008 01:51PM  
+----
Newbie

Status: offline


Registered: 07/28/2008
Posts: 5
...and the parameters file:images,s,a,,,,"List of images"
coords,s,a,,,,"Coordinate file"
reference,s,a,,,,"Reference image"
shifts,s,h,"",,,"Initial shift file"
copyorg,b,h,no,,,"Copy original images to org* ?\n"shiftimages,b,h,yes,,,"Shift the images?"
verbose,b,h,yes,,,"Print the centers and shifts?\n"boxsize,i,h,7,1,,"Size of the small centering box"
bigbox,i,h,45,1,,"Size of the big centering box\n"negative,b,h,no,,,"Are the features negative?"
autoback,b,h,yes,,,"Find reference background level"
background,r,h,INDEF,,,"Reference background level"
lower,r,h,INDEF,,,"Lower threshold for data"
upper,r,h,INDEF,,,"Upper threshold for data"
niterate,i,h,5,2,,"Maximum number of iterations"
tolerance,i,h,0,0,,"Tolerance for convergence\n"tmplist,*s,h
imglist,*s,h

 
Profile Email
fitz
 07/28/2008 01:51PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I don't see anything obviously wrong with either the parameter file or the script. Did unlearning the task change anything? What happens if you create a new login.cl/uparm in some other directory and declare the task from there? I'm trying to work out whether this is a problem with your account, rarely there are problems with e.g. a file not containing an EOF (sometimes happens with emacs), but since things seem to work for me and your friend, it sounds like something in your setup is the issue.-Mike

 
Profile Email
btingley
 07/28/2008 01:51PM  
+----
Newbie

Status: offline


Registered: 07/28/2008
Posts: 5
Thanks for looking it over.It's a brand new installation, this is the first thing I tried to do at my new job. All the other scripts I was given for this task work fine.Tried unlearning before I posted here :-/Could it possibly be something with the set-up of my computer account, rather than an iraf setting?

 
Profile Email
btingley
 07/28/2008 01:51PM  
+----
Newbie

Status: offline


Registered: 07/28/2008
Posts: 5
OK, my collaborator re-wrote a big chunk of it and now it works.Problem avoided, if not resolved Rolling Eyes

 
Profile Email
   

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