Flats Wizard Hang

Using the 3.4 Beta I had the Flats Wizard hang. I was doing a flat for an Ha filter and I had the minimum set to 1s and max to 0 which according to help file is no max. (Why is the max limited to 100s? Otherwise I could have used say 1000s.)
The result was that the wizard was stuck in an endless loop doing 1s exposures never incrementing the time. Here is a screen shot of that.

Thanks for the report. We’ll take a look. I think the issue is likely the initial 0 ADU. So when it attempts to scale the exposure to find the closest fit it’s getting an exposure time of 0, however the min is set to 1 so it won’t go below that. I’m really not sure how you could even manage a 0 ADU image as even bias are > 0 ADU. However we should handle this better in the event it does occur.

As for the max, do you really need 16 minute flats? I have 3nm filters and the max flat exposure I need is around 30 seconds.


I didn’t want to reply until I had a chance to review the code, but I suspected that this was not a bug with min/max fields when you sent the description. What is happening is that you asked your camera to take a 5 sec exposure with the HA filter and the mean ADU for that image came back as 0. As Jared mentioned, this is an impossible value unless there was an issue / error with the camera download. This error, then caused a division by 0 in order to calculate the next exposure time and sent your calibration into la-la land.

So… long story longer, I have fixed a case where division by 0 could occur and the next frame would cause the sequence to come off the rails. If you get a 0 ADU flat frame again, the wizard will simply try again at the same exposure level. It will not really continue until ADU begins to deflect (at least with bias). The filter calibration (as is implemented currently), will fail after 10 attempts.

Your homework, of course, is to figure out why you can get a 0 level ADU mean value for an image at five seconds. You can test this outside the flats cal wizard by using the FF tool aimed at the scope’s lens cap (in the dark preferably) for about 5 seconds and ensure that you have at least a bias pedestal (stats module)… usually above 1000 ADU. If you don’t then you’ll need to look further into your driver. If you do have a good value here, try to run the flats cal wizard with the lens cap… it will fail for sure, but we just want to make sure your images don’t have a 0 ADU value. If you do have 0 ADU in the flats cal wizard (consistently), but not in FF, we will need to inspect your logs to see what is going on.