I weight before the SA but if you weight after SA, you will be comparing images that actually were able to be star aligned so this would seem to be better. This is a good point. I have automated my calibration and II process and it runs every morning automatically using JavaScript but does measurements before SA. I might need to change this and do it twice. What I do with SS is the following...
1. reject frames that are 2.5 SD away from mean in the wrong direction for SNR, ECC, FWHM, and # of stars. So for example, if we have 200 as the average # of stars with an SD is 20, if we get a frame with say 50 stars, it automatically rejects the frame.
2. I select reference frames for Reg and II based on attributes against the 4 characteristics using a formula similar to the weights you show but looking for the best frames. For example, for the Registration reference frames, I use look the best frame against 50% FWHM, 25% Ecc, 25% # of stars.
3. I weight all the frames based on the formula you have but add # of stars as a choice to weight against. the number of stars basically takes care of cloudy images....
this is all automated and I do it before sa because I need the measurements to auto select the reference frame for registration.. I think if you had a choice to weight frames before or after SA, you would weight after SA because you would remove the data from the frames you could not register which should not really go into the calculation.
Don