Author Topic: Better image weighting with Subframe Selector  (Read 873 times)

Offline robyx

  • Newcomer
  • Posts: 47
Better image weighting with Subframe Selector
« on: 2019 July 17 07:32:20 »
Hi all,

I've read many posts in several forums talking about a formula that you can use to compute the weights to be used during the Image Integration step. The (probably well known) formula is:

20*(1-(FWHM-FWHMMinimum)/(FWHMMaximum-FWHMMinimum))+20*(1-(Eccentricity-EccentricityMinimum)/(EccentricityMaximum-EccentricityMinimum))+10*(SNRWeight-SNRWeightMinimum)/(SNRWeightMaximum-SNRWeightMinimum)+50

where the relative weights (20, 20, 10) can be changed and determine the contribution of the FWHM, eccentricity and SNR to the final weight.

My question is about the reliability of this formula: does it really work? is it substantially better than weighting subs just using the noise estimation? Does is work better if the range changes from 50-100 to maybe 30-100 or 10-100?

Moreover, I have a doubt about applying this formula BEFORE the registration or AFTER the registration: the registration itself could increase the noise because of the introduction of some artifacts so I assume that it would be worth to apply it to the registered images in order to take into account also this additional noise (at the end registered images are the one to be integrated). Someone could have different opinion such that the real noise should be measured before registration so the formula should be applied before.

Would anyone share its experience on using this formula and opinions about the improvements achieved?

Many thanks,
Roberto

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: Better image weighting with Subframe Selector
« Reply #1 on: 2019 July 17 07:41:22 »
You can tests all your hypotheses about subframe weighting with a good supporting tool such as described in my reply here: https://pixinsight.com/forum/index.php?topic=13704.0.

Offline robyx

  • Newcomer
  • Posts: 47
Re: Better image weighting with Subframe Selector
« Reply #2 on: 2019 July 17 07:45:47 »
You can tests all your hypotheses about subframe weighting with a good supporting tool such as described in my reply here: https://pixinsight.com/forum/index.php?topic=13704.0.


I've read the referred post but I'm not sure to find answers, the discussion is about weighting before or after the calibration, mine is before or after registration. Moreover I don't se any tool mentioned  :)

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: Better image weighting with Subframe Selector
« Reply #3 on: 2019 July 17 07:54:04 »
Have you tried both before and after? If so, was there a significant difference? I suspect that the weights will be pretty much the same. By the way, SNRWeight can be misleading, as the author of SS notes. Try blurring an image and adding it to the list of files and you will probably find that the blurred image has greater weight than it unblurred source image. (Also, add a pure gray image, a pure white image, and a pure black image, to help yourself understand the weighting algorithm.

If you want the spreadsheet to construct your own weighting equations (and test various ones), I can send that...just ask. But I'm traveling right now; be back next Monday.

Offline robyx

  • Newcomer
  • Posts: 47
Re: Better image weighting with Subframe Selector
« Reply #4 on: 2019 July 17 08:00:02 »
I raised the question because I see a significant difference in weighting before and after registration.
All FWHM, eccentricity and SRNWeight changes and the combination of these new values generates new weights that can change significantly.
For example, I have a frame that goes from 65 (before) to 84 (after) so in the first case it has the lowest weight, in the second case he's in the middle range along with other frames.

That's why I'm wondering what's the most correct approach.

Offline aworonow

  • PixInsight Addict
  • ***
  • Posts: 258
    • Faint Light Photography
Re: Better image weighting with Subframe Selector
« Reply #5 on: 2019 July 17 08:14:22 »
But you have 3 arbitrary variables that greatly affect the values of the weights. How do you specify the "correct" values for those?

Offline robyx

  • Newcomer
  • Posts: 47
Re: Better image weighting with Subframe Selector
« Reply #6 on: 2019 July 17 08:48:45 »
That's one key point of my question, there are no "correct" values, there are just 3 arbitrary coefficients you can assign to generate a weight which is a balance between star quality (FWHM and eccentricity) and Noise.

In general this looks reasonable, for example:

- for globular clusters you want to weight more the stars but you also want the SNR to be taken into account so FWHM and eccentricity weight could be 20 and noise 10
- for nebula the SNR is very important so you can assign 10 to FWHM and eccentricity and 30 to SNR
- galaxy is somewhere in between because SNR is important but also star quality so you could assign 18 to all of three

My question is if this makes sense numerically i.e. if the integrated image really improves in the way you expect by assigning these coefficients.

Moreover the question about computing the weights before or after registration remains.
« Last Edit: 2019 July 17 09:20:06 by robyx »

Offline wadeh237

  • Newcomer
  • Posts: 39
Re: Better image weighting with Subframe Selector
« Reply #7 on: 2019 July 17 13:16:11 »
I've been using the formula in the original post for a while now, but have been questioning it recently.

I'm not sure how much I care about factoring in the FWHM and Eccentricity.  When I look at the data in SFS, I select a limiting threshold based on the values in the data.  Usually, this works out to my simply rejecting anything with a FWHM > 3 arc seconds or an Eccentricity > 0.6.

That leaves SNR.  But I'm not sure that SNR is the value that I want to use.  What I care about more than that is the median pixel values.  Variation there tends to correspond very closely to changes in sky brightness do to twilight or the moon, and also to changes due to passing clouds.  In further thinking along these lines, if all of the exposures in a set are the same duration, the same gain/offset, and the same temperature, why would I expect SNR to change significantly?  The main reason that I can think of is a change in sky brightness or transparency.  So instead of weighting by SNR, why not just evaluate and weight using the median pixel values directly?

And as I type this, I am also wondering if I should just reject frames outright for outlier sky brightness and just weight on FWHM?

Anyway, I'm just musing on this.


Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: Better image weighting with Subframe Selector
« Reply #8 on: 2019 July 17 13:54:08 »
There were discussions about this topic before:

https://pixinsight.com/forum/index.php?topic=12131
https://pixinsight.com/forum/index.php?topic=12369

It may be worth to take a look at the plots of mean and SNRWeight values versus time in a capturing session.

Bernd



Offline johnpane

  • PixInsight Enthusiast
  • **
  • Posts: 93
Re: Better image weighting with Subframe Selector
« Reply #9 on: 2019 July 17 15:47:37 »
I raised the question because I see a significant difference in weighting before and after registration.

SubframeSelector should be run before registration, with the weight stored as metadata in the image. I think the reason various image statistics that enter into weighting can change after registration is that part of the image is empty after shifting for registration (and part has been cropped out).