Error when running imal2 script from vaphot package
fks wrote on Apr 15, 2011
Hi,
Can anyone please help? I have been trying to get imal2 from the vaphot package to work, but I keep getting an error.
The task is as follows:
PACKAGE = stplot
TASK = imal2
images = @obj.in Images to be aligned
coords = HATP16_aln_II.cor Coordinate file
referenc= tk150060_ot.fits Reference image
(shifts = ) Initial shift file
(updates= yes) Update shift file with last shift done?
(copyorg= no) Copy original images to org* ?
(shiftim= yes) Shift the images?
(verbose= yes) Print the centers and shifts?
(boxsize= 15) Size of the small centering box
(bigbox = 45) Size of the big centering box
(negativ= no) Are the features negative?
(autobac= yes) Find reference background level
(backgro= INDEF) Reference background level
(lower = 1500.) Lower threshold for data
(upper = INDEF) Upper threshold for data
(niterat= 5) Maximum number of iterations
(toleran= 0) Tolerance for convergence
(debug = no) yes: keeps temp. files in $tmp
(imglist= ) ignore
(tmplist= ) ignore
(mode = ql)
Upon running it, I get the following error:
tk150028_ot.fits background set to 431.5255
#Coords Image X-center Err Y-center Err Num
tk150028_ot.fits 1697.069 (0.021) 715.385 (0.021) 1
tk150028_ot.fits 912.122 (0.017) 864.260 (0.017) 2
tk150028_ot.fits 1745.094 (0.008) 1664.232 (0.008) 3
tk150028_ot.fits 338.111 (0.015) 521.313 (0.015) 4
tk150028_ot.fits 898.076 (0.006) 290.364 (0.006) 5
#Refcoords Reference X-center Err Y-center Err Num
tk150060_ot.fits 1711.922 (0.018) 713.254 (0.018) 1
tk150060_ot.fits 926.952 (0.014) 862.191 (0.014) 2
tk150060_ot.fits 1760.718 (0.007) 1661.790 (0.007) 3
tk150060_ot.fits 353.236 (0.012) 519.193 (0.012) 4
tk150060_ot.fits 913.953 (0.005) 288.474 (0.005) 5
#Shifts Image X-shift Err Y-shift Err N Internal
tk150028_ot.fits 15.262 (0.009) -2.131 (0.009) 5 (0.210,0.089)
ERROR on line 145: cannot open `' for writing
imal2 (mode=h)
imal2 (mode=h)
ERROR on line 145: cannot open `' for writing
The directory from which I am running iraf has all read write permissions. Where should I make the changes so that imal2 runs?
Many thanks for your help.
Can anyone please help? I have been trying to get imal2 from the vaphot package to work, but I keep getting an error.
The task is as follows:
PACKAGE = stplot
TASK = imal2
images = @obj.in Images to be aligned
coords = HATP16_aln_II.cor Coordinate file
referenc= tk150060_ot.fits Reference image
(shifts = ) Initial shift file
(updates= yes) Update shift file with last shift done?
(copyorg= no) Copy original images to org* ?
(shiftim= yes) Shift the images?
(verbose= yes) Print the centers and shifts?
(boxsize= 15) Size of the small centering box
(bigbox = 45) Size of the big centering box
(negativ= no) Are the features negative?
(autobac= yes) Find reference background level
(backgro= INDEF) Reference background level
(lower = 1500.) Lower threshold for data
(upper = INDEF) Upper threshold for data
(niterat= 5) Maximum number of iterations
(toleran= 0) Tolerance for convergence
(debug = no) yes: keeps temp. files in $tmp
(imglist= ) ignore
(tmplist= ) ignore
(mode = ql)
Upon running it, I get the following error:
tk150028_ot.fits background set to 431.5255
#Coords Image X-center Err Y-center Err Num
tk150028_ot.fits 1697.069 (0.021) 715.385 (0.021) 1
tk150028_ot.fits 912.122 (0.017) 864.260 (0.017) 2
tk150028_ot.fits 1745.094 (0.008) 1664.232 (0.008) 3
tk150028_ot.fits 338.111 (0.015) 521.313 (0.015) 4
tk150028_ot.fits 898.076 (0.006) 290.364 (0.006) 5
#Refcoords Reference X-center Err Y-center Err Num
tk150060_ot.fits 1711.922 (0.018) 713.254 (0.018) 1
tk150060_ot.fits 926.952 (0.014) 862.191 (0.014) 2
tk150060_ot.fits 1760.718 (0.007) 1661.790 (0.007) 3
tk150060_ot.fits 353.236 (0.012) 519.193 (0.012) 4
tk150060_ot.fits 913.953 (0.005) 288.474 (0.005) 5
#Shifts Image X-shift Err Y-shift Err N Internal
tk150028_ot.fits 15.262 (0.009) -2.131 (0.009) 5 (0.210,0.089)
ERROR on line 145: cannot open `' for writing
imal2 (mode=h)
imal2 (mode=h)
ERROR on line 145: cannot open `' for writing
The directory from which I am running iraf has all read write permissions. Where should I make the changes so that imal2 runs?
Many thanks for your help.
fks wrote on Apr 15, 2011
I think this is the part of the imal2 script which is causing problems:
procedure imal2 (images, coords, reference)
...
file shifts {filetype="r",prompt="Initial shift file"}
...
struct *tmplist {mode="h",prompt="ignore"}
...
string imgfile, imcefile,modefile, shiftfile, trimsect, tmp, junk
real xshift, yshift
struct line
...
if (shifts_found) {
while (fscan (tmplist, junk, xshift, junk, yshift, junk) == 5){
print (xshift, " ", yshift, >& shiftfile)
}
But can you please let me know where the error lies? Thanks in advance for
any help anyone can give :0).
procedure imal2 (images, coords, reference)
...
file shifts {filetype="r",prompt="Initial shift file"}
...
struct *tmplist {mode="h",prompt="ignore"}
...
string imgfile, imcefile,modefile, shiftfile, trimsect, tmp, junk
real xshift, yshift
struct line
...
if (shifts_found) {
while (fscan (tmplist, junk, xshift, junk, yshift, junk) == 5){
print (xshift, " ", yshift, >& shiftfile)
}
But can you please let me know where the error lies? Thanks in advance for
any help anyone can give :0).
Mike Fitzpatrick wrote on Apr 15, 2011
The relevant lines in the script are:
You have the 'updateshifts' parameter set, however you do NOT specify a 'shifts' parameter and so the 'shiftfile' variable has no value.
if (updateshifts) { shiftfile=shifts} else {
shiftfile = mktemp ("tmp$ias_tmp.") #file with measured shifts
}
You have the 'updateshifts' parameter set, however you do NOT specify a 'shifts' parameter and so the 'shiftfile' variable has no value.
fks wrote on Apr 15, 2011
It works! Many thanks for your reply. -fks
Last post on Apr 15, 2011