SubFrameSelector weighted images

edited May 2020 in PixInsight
I just recently "discovered" the Weighted Batch Preprocessing, but only use it to calibrate my frames. After that, I end up with calibrated and "cosmetic corrected" data which I normally align with StarAlignment (using the frame with the best FWHM and Eccentricity as reference image) and to the image integration. That last one with the "weight" factor set to "SNRWeight". Because WBPP uses several factors (i.e. FHWM, Eccentricity, SNR) when it integrates images (which I don't use, I only use WBPP for calibration) I wondered if it was possible to add some kind of weight factor dat is based upon these values. And it is! 

In my case –with a monochrome CCD– I just load the calibrated images into SubFrameSelector (one filter at a time) and measure them, writing down the highest and lowest values of FWHM, Eccentricity and SNR. After that I use a expression –which can be altered at your taste– after which SubFrameSelector calculates the weight of each frame. I then output the frames using SFS and adding the FITS-keyword "SFSWEIGHT". This keyword can later on me used as a weight factor during ImageIntegration.

The formula, in my case, looks like this:

(20*(1-(FWHM-2.390)/(3.740-2.390)) + 15*(1-(Eccentricity-0.3529)/(0.7022-0.3529)) + 25*((SNRWeight-1.013)/(1.196-1.013)))+40


The numbers in red are all multiplication factors, the blue variables are the FITS keywords SFS finds in the FITS header of the images and the green constant 

is a pedestal to bring the outcome of the expression in the range from 0-100. All other numbers you see are the minimum and maximal values of resp. the FWHM, Eccentricity and SNR. The only thing the formula does is bring the actual value of these factors into a normalized range. The "1 minus you see at the beginning of FWHM and Eccentricity is to make sure that a smaller value adds more weight (lower values are better). This is not the case with the SNR (the higher this value the better it is).



Comments

  • Hi Jeroen,

     The formula you are using is exactly what is available in WBPP. So you don't have to go through SFS if you do not want to. In addition, you do not need to write down the range of your values! You can simply specify FWHMMin and FWHMMax (for example) to get the smallest and largest values automatically. I will be producing a section on SFS and WBPP very soon. There are still a couple of things I am working on. 

    There is a difference though between the weightting for SNR between SFS and WBPP... WBPP uses a modifier on the SNRWeight that is calculated in order to give better results. This is hard to test though unless there are lots of example data sets to go through (over time).

    Thanks,
    the Blockhead


  • Hoi Adam,

    thanks for the explanation. I sure like the WBPP, but I like to do it the hard way and want to be in control of whatever the weights must be in my data set depending on the kind of target. I'm lucky to have an observatory and can shoot one target at several nights. Every now and then I run into a "problem" and have end up with several sets of data with several flats. I know WBPP can handle these sets as well (just run it one set at a time and end up with calibrated data to integrate). SubFrameSelector has become my friend when it comes to be selective in the data I want to be part of the integration. If I only have one night of data I won't be very selective and use every decent frame there is. Just eject the one with a bad FWHM due to bad focussing, the ones with bad eccentricity due to bad guiding and the one with a low SNR due to shooting in dawn or dusk and that's it.

    Thanks and keep up to good work, you really got me on the right track when it comes to processing in PI!

    Jeroen

  • Well... if you *really* want to be in control... you will like my final SFS section. 
    I will be uploading momentarily and announcing. -The Blockhead
  • Hi Adam, you certainly got that one nailed. I just realized that the method I used using SNRWeight doesn't do the job properly. Great video! - Jeroen
Sign In or Register to comment.