Author Topic: Possible Bug in BatchPreprocessing script  (Read 2852 times)

Offline lukepower

  • Newcomer
  • Posts: 4
Possible Bug in BatchPreprocessing script
« on: 2014 December 11 00:15:16 »
Hello,

I just tried to do a larger batch with BatchPreprocessing script. What I had to do is using several flat frames from different directories, but named in the same manner, like:
Flat_red_001.fits
Flat_red_002.fits
...

The problem is, I have different files in different directories, but with the same name. Doing the Integration of the flats fails with the following message:
Code: [Select]
C:/Astronomy/Images/23 November 2014/calibrated/flat/Flat-red-0009_c.xisf
Loading image: w=4096 h=4096 n=1 Gray Float32
Computing image statistics: done
Weight          :     1.00000
C:/Astronomy/Images/23 November 2014/calibrated/flat/Flat-red-0009_c.xisf
*** PCL Exception: File I/O Error: Unable to open file: Win32 error (32): The process cannot access the file because it is being used by
: C:/Astronomy/Images/23 November 2014/calibrated/flat/Flat-red-0009_c.xisf
another process.
<* failed *>

As far as I understand it, it writes an output twice (by actually overwriting the file), and then tries to access it, causing the error. It might make sense to add a "Rename if existing file found" option to the script.

Thanks

Lukas

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Possible Bug in BatchPreprocessing script
« Reply #1 on: 2014 December 11 00:55:39 »
Just as guess: is it the virus scanner?
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Possible Bug in BatchPreprocessing script
« Reply #2 on: 2014 December 11 10:47:44 »
no, i think this is a problem in BPP - it does not uniquify the input filenames but tries to write all the output files to the same directory. i don't know how ImageCalibration is called from the script, but most processes have a checkbox for "overwrite existing files" such that the output filenames become unique. however then i think BPP would lose the handle on those files since it's not expecting _1.xxx, _2.xxx versions of a particular file. so i think ImageCalibration might be trying to overwrite the file but finding it locked for some reason? may have something to do with the new file format, not sure.

rob