AstroHuntsman / huntsman-pocs

POCS on the Huntsman Telescope
MIT License
7 stars 8 forks source link

Flat field file naming problem #450

Closed danjampro closed 3 years ago

danjampro commented 3 years ago

Looks like there is a logic error somewhere in the flat field code:

Error writing image to images/flat/1919420013090900/20210527T070711/flat_000.fits: OSError("File 'images/flat/1919420013090900/20210527T070711/flat_000.fits' already exists.")

This error occurred after taking one or two exposures with counts outside of the required range.

This appears to send the flat field sequence into an endless sequence as it keeps using the old file to update the exposure time, which is saturated. One idea is to delete the file immediately if it is not satisfactory.