Issue with Shooting and Stacking flats

12 replies316 views
RobDSJ avatar
Hi All,
I'd been avoiding the whole issue of calibration frames since I started 2 years ago. My image train was clean, I use an ASI533 OSC camera with no amp glow, so it was never really an issue. With my latest scope dust seems to be! I'm now also processing in Pixinsight and the dust spots are very obvious.
I took some flats this morning (following imaging last night) using the ASIair auto flat function and a small light panel on a dim setting. The ASIair works out the exposure and shoots the flats. No change to focus  or camera movement was made since I finished imaging the night before. On looking at an individual flat file on the ASIair, it did clearly show the dust spots. The Master flat, just looks grey and flat.
I loaded the light (60-70) and flat files (20 of them) into Deep Sky Stacker. The resulting stacked file (when autostretched ) looked like the dust spots had been added, rather than subtracted and a kind of reverse vignette had been added to the stretched image. The image without flats showed the typical dark spots, but with the flats the dust spots were very obviously lighter and very visible.
In you experience, could this be down to exposure length for the flats (though this is automatic), or my panel being too dull/bright? I can mess around with that, but is there something fundamental I have completely missed?

Cheers Rob.
Helpful Engaging
Dan Kearl avatar
You need to shoot dark flats right after the flat frames. Take the light panel off, put the scope cap on , select Dark frames and the auto button and the you will have dark flats at the same time settings and stack those with the Flat frames.
Helpful
Paolo avatar
1. As written above. You must take also dark flats/bias, it's how the math works.

2. Aim for 40/50% of the histogram, that should work fine. The important thing is that you don't have clipped shadows or highlights (left and right of the histogram)

3. test your flat panel for brightness evenness (is that correct English??). There's a topic here on AB or on CN. It's about taking 10 flats, rotating the panel 90deg, and taking 10 flats again etc etc
RobDSJ avatar
Thanks Dan!  I'll give that a go
RobDSJ avatar
Paolo:
1. As written above. You must take also dark flats/bias, it's how the math works.

2. Aim for 40/50% of the histogram, that should work fine. The important thing is that you don't have clipped shadows or highlights (left and right of the histogram)

3. test your flat panel for brightness evenness (is that correct English??). There's a topic here on AB or on CN. It's about taking 10 flats, rotating the panel 90deg, and taking 10 flats again etc etc

Thanks Paolo, your English is perfect! I'll check that panel as it wasn't the most expensive of options
Brian Puhl avatar
Everyone above is right.     Lemme just help make it very simple. 

Do all your calibration frames at night time to avoid any possible stray light

Take your flats like Paolo said.  

Put the cap on your scope and do a 30-50 manual exposures of 1 second.      These are now your bias frames.

 So many folks doing darkflats, nothing wrong with it, but bias frames just seem so much simpler and easier.   I've never had any issues with this method personally, but you COULD run into problems if your offset is wrong on your camera.   Hopefully that's not an issue for you though.
Helpful
John Hayes avatar
The advice here is good but I want to go back to what appears to be an incorrect notion by the OP in the opening post.  First, flats do not correct for amp-glow and they are not required simply to correct for dust motes.  Understand that flats do 3 things:

1.  Correct for vignetting effects (which includes shadows from dust),
2.  Correct for cos^4 illumination fall-off across the field, which is inherent in every optical system, and
3.  Correct for PRNU, which is non-uniformity of pixel response across a sensor.  This is a small effect in modern sensors but it still exists.

All of these effects are multiplicative to the signal, which means that calibration requires a division by the calibration data.  That means that you have to account for both bias and dark current offsets when you calibrate.  It also means that the calibration process cannot correct for additive components, which includes stray light.  That means that you must be VERY careful to take you flat data so that it does not include any stray components, which can come from both external sources and stray light from specular reflections inside your imaging train.

Properly calibrated image data will alway produce a superior image relative to using uncalibrated data.

John
Well Written Helpful Insightful
wsg avatar
Rob. 

Use this guide to shoot flats and flat darks using ASIAir.

https://eastwindastro.blogspot.com/2021/03/asiair-autoflat-frame-exposures.html


scott
RobDSJ avatar
Rob. 

Use this guide to shoot flats and flat darks using ASIAir.

https://eastwindastro.blogspot.com/2021/03/asiair-autoflat-frame-exposures.html


scott

Thanks Scott, I'll check that out
RobDSJ avatar
Just an update and to thank everyone above for their advice and help. I took the flats  and dark flats as instructed and ran them through DSS. There was no improvement on my original efforts. Them ran them as flats and biases (along with the light frames) in Pixinsight WPBB. It did exactly what I wanted and got a good 'clean' image.
I'm not sure what I'm doing wrong in DSS, but at least I seem to be shooting flats/dark flats correctly.

Cheers Rob
Helpful Respectful
dkamen avatar
Here is what I think happened:


A Light sub is the "clean" signal that we want, which , plus dark signal, plus bias signal.

L = S + DLS + B

Its associated dark sub  ( is the same except no clean signal:
D = DLS + B

A flat sub is the "clean" flat field that we want, plus dark signal (different from the one in the light sub because of different duration so I mark it DFS), plus bias signal:
F = FF + DFS + B

A dark flat sub is the dark flat signal plus bias:

DF = DFS + B

The calibration equation with dark flats is:
(L - D) / (F - DF) = (S + DLS + B  - (DLS + B) ) / ( FF + DFS + B - (DFS + B) = S/FF which corrects for vignetting and dust motes by dividing the clean signal with the clean flat field.

The calibration equation with darks and bias is:

(L - B - (D - B))/ (F - B - (DF - B)) which basically works out the same way (we simply add and subtract B from both numerator and denominator).

For a sensor like the IMX533, all other dark signals are practically negligible so we have:

L = S + B
D  = B
F = FF + B
DF = B

The calibration equation with dark flats and no dark lights becomes:
L - D / (F - DF) = (S+B - 0)  / (FF + B - B) = (S+B) / FF = WRONG

The calibration equation with just bias becomes:

L - B - (0 - 0) /(F -B) = (S + B - B) / (FF + B - B) = S/FF = CORRECT

In other words the way DSS implements the calibration algorithm, when you use dark flats you must also have dark lights, even if it is the same subs. Otherwise the lights are not corrected at all. When you use the same subs as bias the math works out because bias are subtracted from both lights and flats. 

Cheers,
D.
Helpful Insightful
Jeffery Richards avatar
Just an update and to thank everyone above for their advice and help. I took the flats  and dark flats as instructed and ran them through DSS. There was no improvement on my original efforts. Them ran them as flats and biases (along with the light frames) in Pixinsight WPBB. It did exactly what I wanted and got a good 'clean' image.
I'm not sure what I'm doing wrong in DSS, but at least I seem to be shooting flats/dark flats correctly.

Cheers Rob

Maybe if you explained exactly "how" you processed in DSS someone might be able to point out a flaw in your process. I've never used DSS but it almost seems like somehow all your files just plain got "stacked" vice proper flat processing (division from the light frame)?
RobDSJ avatar
Here is what I think happened:


A Light sub is the "clean" signal that we want, which , plus dark signal, plus bias signal.

L = S + DLS + B

Its associated dark sub  ( is the same except no clean signal:
D = DLS + B

A flat sub is the "clean" flat field that we want, plus dark signal (different from the one in the light sub because of different duration so I mark it DFS), plus bias signal:
F = FF + DFS + B

A dark flat sub is the dark flat signal plus bias:

DF = DFS + B

The calibration equation with dark flats is:
(L - D) / (F - DF) = (S + DLS + B  - (DLS + B) ) / ( FF + DFS + B - (DFS + B) = S/FF which corrects for vignetting and dust motes by dividing the clean signal with the clean flat field.

The calibration equation with darks and bias is:

(L - B - (D - B))/ (F - B - (DF - B)) which basically works out the same way (we simply add and subtract B from both numerator and denominator).

For a sensor like the IMX533, all other dark signals are practically negligible so we have:

L = S + B
D  = B
F = FF + B
DF = B

The calibration equation with dark flats and no dark lights becomes:
L - D / (F - DF) = (S+B - 0)  / (FF + B - B) = (S+B) / FF = WRONG

The calibration equation with just bias becomes:

L - B - (0 - 0) /(F -B) = (S + B - B) / (FF + B - B) = S/FF = CORRECT

In other words the way DSS implements the calibration algorithm, when you use dark flats you must also have dark lights, even if it is the same subs. Otherwise the lights are not corrected at all. When you use the same subs as bias the math works out because bias are subtracted from both lights and flats. 

Cheers,
D.

Thanks for doing the maths D! You were correct, I tested the same files adding as bias in DSS (instead of dark flats) and it worked perfectly! Every day is a school day for me. Thanks for taking the time to work this out.
Cheers Rob
Well Written Respectful Supportive