meaning of “overwtiting” error message
cosmologist wrote on Jan 12, 2011
I am running a data reduction package that uses some iraf scripts other than the ones I am familiar with (ccdproc, flatcombine...etc)...
Does anyone know what this error message might mean?
Why would there be an existing file with this name if this is the first time I run the program... I am confused... :shock:
Does anyone know what this error message might mean?
Extracting amp regions..
ERROR: Operation would overwrite existing image (tmpq429jdb1.fits)Why would there be an existing file with this name if this is the first time I run the program... I am confused... :shock:
Mike Fitzpatrick wrote on Jan 12, 2011
Without seeing the script I can't comment specifically. Even though you run the script only once, there may be an intermediate file used several times within the script. This usually indicates a problem in the script, e.g. an image wasn't deleted due to a logic error, an MEF file is being used where a simple FITS file was expected etc.
To see exactly what's happening you can type 'd_trace' before running the command, please post the last screenful of output (and/or the entire script). Note you can actually turn on the 'imclobber' environment variable to overwrite an existing image, but I doubt this is how the script was meant to be run and would likely cause other problems.
To see exactly what's happening you can type 'd_trace' before running the command, please post the last screenful of output (and/or the entire script). Note you can actually turn on the 'imclobber' environment variable to overwrite an existing image, but I doubt this is how the script was meant to be run and would likely cause other problems.
cosmologist wrote on Jan 12, 2011
The package I am using is the "WiFeS" package which is used for the 2.3m telescope at Siding Spring in Australia.
I am not exactly sure what the script is, I am following the online data reduction guide for it.
http://rsaa.anu.edu.au/observing/ssowiki/index.php/WiFeS_data_reduction
This is the last thing I get before the error message:
I am not exactly sure what the script is, I am following the online data reduction guide for it.
http://rsaa.anu.edu.au/observing/ssowiki/index.php/WiFeS_data_reduction
This is the last thing I get before the error message:
CCD binning: xbin = 1., ybin = 4.
Expanding to 1x1 frame size...
Extracting amp regions..
1 [1:2109,1:4096]
Sub-image 1:
fit column bias..trim..
BIASSEC: [14:36,1:4096]; TRIMSEC: [62:2109,1:4096]
1 -> [1:2048,1:4096]
2 [2113:4180,1:4096]
Sub-image 2:
fit column bias..trim..
BIASSEC: [2053:2061,1:4096]; TRIMSEC: [3:2050,1:4096]
2 -> [2049:4096,1:4096]
WFPREPARE: Shifting MDF in Y by 4. pixels (subtracted from y_ccd)
Write average detector gain to header: 1.
Write average detector read noise to header: 7.
Write flagged saturation level to header: 0.
n input file --> output file
1 tmpABCD2411zub --> nT2m3wr_20101118_083731
filter focal plane input BPM RN gain sat
RT560 APT_REFLECTOR_FULL_FIELD none 7.0 1.0 65536
RT560 APT_REFLECTOR_FULL_FIELD none 7.0 1.0 65536
Image: /Users/night4_ac/T2m3wr_20101118_083857[0]
Type: ARC
Grating: R3000
Dichroic: RT560
Aperture: APT_REFLECTOR_FULL_FIELD
Exposure: 1.999000E+00
MDF: wifes$data/mdf-R3000.fits
Array table: wifes$data/wifesarrayr_2amp.fits
Config table: wifes$data/wifesconfig.fits
-------------------------------------------------------------------------------
CCD binning: xbin = 1., ybin = 4.
Expanding to 1x1 frame size...
Extracting amp regions..
ERROR: Operation would overwrite existing image (tmpq2411mub1.fits)
"printlog ("\n"//k//" "//ampsz, l_logfile, l_verbose)"
line 943: wifes$wfprepare.cl (hidden task)
called as: `wfprepare (inimages=@arcimglist, rawpath=/Users/randa/night4_ac/, bpm=gflat_R3000_RT560_bpm.pl, fitbias=, overscan=column, fl_vardq=no, arraytable=wifes$data/wifesarrayr2.fits, configtable=wifes$data/wifesconfig.fits, shiftimage=sT2m3wr_20101118_071830)'
"if (wfprepare.status != 0) {"
line 1031: wifes$wfcal.cl
called as: `wfcal ()'
wifes>
Mike Fitzpatrick wrote on Jan 12, 2011
I think the problem part of the code is in the wfprepare.cl script:
Specifically, the 'tmpq' temp file is only deleted if the tabpar.undef parameter is set, however the name is re-used in any case in the IMCOPY on the last line of the snippet. This whole thing is within a loop so its entirely possible for the name to be recycled.
I can't offer a specific fix (check with the original code authors), but it looks to be a logic problem in the script. Hope this helps.
printlog ("\nExtracting amp regions..", l_logfile, l_verbose)
for (k = 1; k <= nreg; k += 1) { # for each quadrant...
tabpar ( table=l_arraytable, column="ampsize", row=k, format-)
if ( tabpar.undef ) {
printlog( "ERROR: Ampsize "//k//" not found in table: "// \
l_arraytable//" - trying header...", l_logfile, ver+ )
# Get pixel coordinates from image header:
keypar (inimg//"[0]", l_key_ampsize[k], >& "dev$null")
imdelete ( tmpq//k, ver-, >& "dev$null" )
if (keypar.found) {
ampsz = keypar.value
} else {
printlog( "Ampsize not found for amp "//k//" - exiting", \
l_logfile, l_verbose )
goto clean
}
} else {
ampsz = tabpar.value
}
imcopy (inimg//"[1]"//ampsz, tmpq//k, ver-)
Specifically, the 'tmpq' temp file is only deleted if the tabpar.undef parameter is set, however the name is re-used in any case in the IMCOPY on the last line of the snippet. This whole thing is within a loop so its entirely possible for the name to be recycled.
I can't offer a specific fix (check with the original code authors), but it looks to be a logic problem in the script. Hope this helps.
Last post on Jan 12, 2011