Flats question in Live Stacking

Anything that doesn't fit into any of the other forums
Post Reply
donstim
Posts: 56
Joined: Wed Sep 19, 2018 5:35 am

Flats question in Live Stacking

Post by donstim » Fri Dec 20, 2019 11:48 pm

According to the SharpCap manual, when selecting the bias frame option, it "requires" the camera brightness level control to not be changed when capturing the target image light frames. However, in this thread, viewtopic.php?f=5&t=1282, Chris states that he uses a different brightness setting between his flat and light frames, and having tried it both ways, that he gets a better result with a difference in settings (specifically with zero brightness for the flats and a low, but non-zero brightness for the lights (something like 4-10?).

Is the documentation incorrect, or will the flats be inaccurate if a different camera brightness level is used between taking flats with bias selected and taking the lights? (If this matters to the answer, assume darks taken at the lights settings will be applied to the lights in live stacking -- no darks applied at the time of taking the flats.)

Thanks,
Don

umasscrew39
Posts: 201
Joined: Fri Apr 28, 2017 1:28 pm
Location: Central Florida
Contact:

Re: Flats question in Live Stacking

Post by umasscrew39 » Sat Dec 21, 2019 9:54 pm

Hi Don
Well, I have been doing flats a lot over the past few months and I always keep the brightness setting the same as lights and they work great.

Bruce

BlackWikkett
Posts: 294
Joined: Sat Jun 23, 2018 8:48 pm
Contact:

Re: Flats question in Live Stacking

Post by BlackWikkett » Sun Dec 22, 2019 3:23 pm

The solution I developed was based on practical test that worked for me and the gear I have. As you can see from the thread you mentioned I did extensive testing to arrive at a solution that worked for me. That's not to say keeping the brightness the same for you lights and flat will not work. I'd test both ways to see the results.

As an aside the latest version of SC v3.2.6173 has changes to the flat frame capture and I've had to revert back to a previous version of SC. My latest results are reported here viewtopic.php?f=5&t=1282&start=50

-Chris

User avatar
admin
Site Admin
Posts: 3668
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Flats question in Live Stacking

Post by admin » Sun Dec 22, 2019 4:00 pm

Here's the deal...

To get flat correction to work perfectly you need to subtract a dark frame from both the lights and the flats so that you can do the calculation

corrected light = (light - dark) / (flat - dark flat) * constant scale factor

Now the dark frames consist of two parts – the constant offset that comes from your offset/brightness/black level control and the actual dark noise which is exposure, gain and temperature dependent. For short exposures (up to a second or two) the contribution of the true dark noise is relatively small and can usually be ignored compared to the constant offset. That's why SharpCap will use a bias frame when capturing a flat instead of a dark flat.

corrected light = [approx] (light - dark) / (flat - bias) * constant scale factor

If we didn't use a bias frame or a dark frame then the flats would tend to under correct (imagine that the flat frame is 30,000 ADU at the centre and 15,000 at the corner with a bias ADU of 1000. Without accounting for the bias we'd expect the boost to the corners to be a factor of two exactly (30000/15000), but accounting for the bias we find that it should really be 2.07 (29000/14000).

Now, if you are doing long exposure imaging you should really be using proper dark frames as well as the flat frames in which case the dark subtraction will deal with removing the offset as well as any dark noise and should give correct flat correction.

However if you are doing shorter exposure imaging (from solar/lunar/planetary with exposures in the milliseconds up to a few seconds exposure) you may not want to use dark frames but you still may want flat frame correction to deal with vignetting or dust doughnuts. In that case, SharpCap needs to have at least some estimate of the offset to subtract from each light frame before applying the flat frame correction otherwise there will be under correction. If you have used the bias option when creating your flat frame, SharpCap writes the offset level calculated from the bias frames into the file name of the master flat and then uses that offset as a best estimate when applying that flat frame without dark correction. Essentially we are calculating the correction like this

corrected light = [approx] (light - (average bias level)) / (flat - bias) * constant scale factor

So the guidelines in the documentation apply to this last case where dark frames are not in use, in which case it's essential to keep the brightness control and other controls that might affect the image such as gamma or White balance the same between capturing the flat and capturing the lights.

Hope that clears things up a bit, Robin

donstim
Posts: 56
Joined: Wed Sep 19, 2018 5:35 am

Re: Flats question in Live Stacking

Post by donstim » Mon Dec 23, 2019 2:00 am

Hi Don
Well, I have been doing flats a lot over the past few months and I always keep the brightness setting the same as lights and they work great.

Bruce
Thanks Bruce, I have generally been using Brightness of 0 for the flats and 4 for the lights, which was based on some settings reported by Chris some time ago. It was only in re-reading the recent thread on the issues Chris has had that caused me to read the documentation a bit more carefully. My flats haven't always worked out, but I don't know if this has anything to do with that.
The solution I developed was based on practical test that worked for me and the gear I have. As you can see from the thread you mentioned I did extensive testing to arrive at a solution that worked for me. That's not to say keeping the brightness the same for you lights and flat will not work. I'd test both ways to see the results.

As an aside the latest version of SC v3.2.6173 has changes to the flat frame capture and I've had to revert back to a previous version of SC. My latest results are reported here viewtopic.php?f=5&t=1282&start=50

-Chris
Thanks for posting, Chris. I've been following your thread, which is what led me to post. But I didn't want to corrupt your thread. I guess I'll have to do some testing to see what happens with my equipment. Unfortunately, my ASI294MC Pro is back with ZWO right now to repair an issue I've had with it deciding not to send frames after it gets too cold or damp or something. I've been without it for 5 weeks, and I have no idea when I'll get it back. In the meantime, I will continue to watch your thread.

Robin, I'm not sure I'm understanding the application of the math to the actual situation. In my situation, I am using darks primarily to deal preemptively with hot pixels and flats to remove vignetting and any dust bunnies that may have appeared since last use. (If there are dust bunnies, I remove them before the next session.) Exposures are on the order of 2 to 30 seconds, with most being in the 10-20 second range during live stacking.

It seems to me that if I use a lower brightness level for the flats than for the lights/darks, this would lead to over-correction, and vice versa for a higher brightness level. But then again, I am not sure if I am interpreting this correctly from the equations you supplied.

I had also assumed that for the ASI294MC Pro cooled camera connected via USB3, I should not have to worry too much about thermal noise or amp glow for <30 second exposures. Am I misguided?

Thanks,
Don

Post Reply