When and how to use Bias frames


i am using siril for processing my images (following Tutorial preprocessing) and it works great so far, thanks.

I have some questions regarding bias frames though:

  • Are bias frames only needed when using dark optimization?
  • Should dark optimization be used, if the dark frames and light frames are taken at the same condition (iso, exposure time, temperature)?
  • In the tutorial the master bias frame is subtracted from each dark frame, so the master dark does not contain the bias signal. But the formula in the documentation implies that the bias frame is subtracted in the preprocessing step, so if I use a dark frame without the bias signal, the bias signal will be subtracted twice. What is the correct way to do it?
  • If I subtract the master bias frame from the dark frames according to the tutorial, the processed master dark has very small values (even negative), since the bias and the dark frames have (in my case) a similar brightness. This was unexpected but could be correct according to https://www.qhyccd.com/bbs/index.php?topic=6159.0
  • However in that case the negative values might lead to problems and the cosmetic correction does not work, since there are lots of cold pixels identified.

So basically the question is, should I use bias frames (if the dark frames are taken at the correct conditions) and if so, what is the “correct” way to do it?

I am grateful for any help and insights!


Of course not. There are also subtracted from the flat frames.

Not necessary. But when the temperature is different here an example of the improvement of the optimization:

No I don’t see why it is subtracted twice. Biases are everywhere, so you subtract from darks and from lights. Of course if no optimization, no need to subtract from the dark. Then in this case you do not subtract from the light as it will automatically be done with the bias inside the dark.

Yes, some cmos sensor have some issue with bias signal and darks get a lot of negative values. In our future version of Siril that will not be an issue as Siril handle 32bit floating point with negative values.

True. I generally uncheck the cold pixel check. We could imagine to add a pedestal value to the dark frame too.

Use bias frames yes, but only for flat frames ;).


Same question! It can be very confusing when switching to Siril - now I have more control but obviously I never completely understood the process. Is there a nice flow chart somewhere?

I’m still confused… At the bottom you say “Use bias frames yes, but only for flat frames” but earlier in reply to ‘Are bias frames only needed when using dark optimization?’ you said “Of course not. There are also subtracted from the flat frames.”

“Also”. So that means they are used for something other than flats. You said "Biases are everywhere, so you subtract from darks and from lights. "
And this is where the double subtraction might come in:
light = signal + nonrandom-temperature + bias + random
dark = nothing + nonrandom-temperature + bias + other different randomness

light - dark = signal + random - other different randomness

You CAN subtract bias from lights ahead of time, but if so then you MUST subtract bias from darks.

Dark optimisaton, it’s not clear to me how this is done… I think it is saying “if your dark is a different temperature, then we have to ‘fudge’/optimize/multiply the value up to what it would have been”. If so, then the bias MUST be subtracted from both light and dark otherwise your final value will include a “fudge x bias” component.

Some forums talk about dark flat frames. How does that fit in here?
Similar to the above, if I understand it, you subtract bias on both or neither. If you do not have dark flats, then you should subtract bias from the “light-flats” (as you have said).

Oooof - flowchart would be nice. Did I get this right?

Yes, but don’t mix topic I think. In his case, he was talking about dark optimization. In this case, and only in this case, master bias must be subtracted from flats AND from darks.
If no optimization, there are only subtracted from the flat.

Because if no optimization the bias contained within the dark will automatically do the job.

Yes, with narrowband filters the flat is taken at long exposure. So a dark may be needed. So you need to preprocess flats frames as you would do with light frames.

You can take a look to our scripts. The step by step is described in some situations. With/without flats, … and so on.

For questions like this I could highly recommend the “Handbook of astronomical image processing” by Richard Berry and James Burnell.

Although it comes with its own software, the book by itself is a valuable reference source.


Ok, first of all thanks for the explanation, I see my mistake now. I forgot that the light frames have the bias as well.

However, I think the forumula in the tutorial is a bit misleading/inconsistent:
calibrated image = (light−masterDark−masterBias) / (masterFlat−masterFlatDark−masterBias)

The numerator (light−masterDark−masterBias) is only correct, if the masterDark has the Bias already subtracted. If the masterDark still contains the bias, then it gets subtracted twice from the light frame.

But the denominator (masterFlat−masterFlatDark−masterBias) only works if either the masterFlat or the masterFlatDark still contains the Bias. Since masterFlatDarks are a special case the general assumption seems to be in this case that the masterFlat still contains the bias.

So it is a bit confusing that in this formula the masterDark has the bias already removed, but not the masterFlat.

And following this confusion it was not clear to me which parts of the subtraction siril still does and which parts should be taken care of when preparing the calibration frames.

In the end, apart from this confusion, everything is explained in the tutorial. So thanks again for clearing that up.

One final question:
When will Siril handle 32bit floating point with negative values? Is it already in the git version which I use anyway?

You are right. We are talking about pure master frames. It is difficult to find a generic way to express the formula. Sorry for the confusion.

Yes it is available. Do you use Linux? You have the flatpak nightly builds on gitlab ;).

Yes I use Linux. I prefer building Siril myself instead of using flatpak.

So no problem then. You have 32bit for a while ;).

Blush (embarrassed). the tutorial (https://www.youtube.com/watch?v=RswLpEE7EZ4) does indeed cover these points, albeit quickly. Now that I’ve wrapped my head around it, the tutorial makes sense.
Thanks for your patience, lock. For newcomers, I advise a few “play-pause-rewind-play-pause-rewind-play” cycles.

1 Like