Author Topic: Is it better to use median or average in creating master bias and dark frames?  (Read 3588 times)

Offline rgbtxus

  • Newcomer
  • Posts: 26
I think the title says it all.  There are various references in the forum to a presumably best way to create these frames, but at least all the links I've hit so far are broken.  I've been using average, no normalization and Windsorized Sigma Clipping with the default parameters but wonder if that is best and if median might be the better combining algorithm.  Now I ran median and average over 100 bias frames from a cooled (-18C) QHY23, differenced the two and took a peek with the statistics tool -- not any significant difference as you can see
count (%)   100.00000
count (px)  8770732
mean        1.253
median      1.115
avgDev      0.879
MAD         0.844
minimum     0.000
maximum     8.230
So, maybe the answer is who cares.  Still I'd be interested in knowing if in fact one is better than the other and if so, under what circumstances the difference will manifest itself in a better image
Thanks,
Richard

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
I suggest measuring the noise in each by itself, don't diff them.

Noise should be lower in the average as long as rejection parameters are setup to reject outliers only.

Median is nice because you don't have to worry about choosing good rejection parameters. For example, for my guiding camera, I use median to make bias masters. The guiding camera is uncooled, and drifts all over the place, I don't want to spend time choosing rejection parameters, so instead I use median and capture more frames that I would otherwise to help reduce noise.

Mike

Offline rgbtxus

  • Newcomer
  • Posts: 26
mschuster,
Thanks for your reply.  As a total newbie here I'm still trying to get my bearings.  Do you have a preferred noise measure you would suggest?  BTW: I followed your link to your zenfolio page -- remarkable stuff.  I hope someday to produce such images.  At this point I'm just setting things up and I only have dark and bias frames.  The gods of AP seem to have taken umbrage at my recent purchases and seem intent on punishing me with overcast weather for some time to come ;-)
Richard

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Hi Richard,

Thank you. If you turn on the 'Evaluate noise' option, ImageIntegration and maybe BatchPreprocessing too will give noise estimates at the end of processing. You can also use NoiseEvaluation script which measures the frontmost image in the workspace. The Statistics dialog's Sn and Qn values are also useful. All of these measurements are a bit polluted by fixed pixel offset variations, which do not get reduced when adding more frames to the master, but even so they give good information.

Mike

Offline rgbtxus

  • Newcomer
  • Posts: 26
Thanks Mike,
Hadn't thought to look under scripts for noise analysis (still feeling my way around PI).  As you suggested running NoiseEvaluation on the mean and median versions of the integrated bias noise showed the mean version to have ?k = 3.066e-05 v.s. ?k = 3.807e-05 for the median version.  Although I confess my brain just started to hurt when I wondered if lower noise in the image representing the noise floor is actually better or worse <G>
Thanks again
Richard

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Yes, lower is better. It is typical to see average about 20% less than median.

Mike