You are welcome!
I am sure that you have already adapted your expressions, but maybe others may find the following beneficial (I hope!)
Both FWHMSigma and SNRWeightSigma can return negative values. But a low FWHMSigma is a good thing, so you have to modify your expression to accommodate that. For the first part of your expression, something like:
( Max(FWHMSigma) - FWHMSigma ) / ( Max(FWHMSigma) - Min(FWHMSigma) ) I am not sure how to get the max/min values of FWHMSigma and SNRWeightSigma will give your frames with low FWHM (the good ones!) a weight value towards 1. The above expression takes values from 0 to 1.
You can do a similar scaling for the SNRWeight part,
(SNRWeightSigma - Min(SNRWeightSigma) )/( Max(SNRWeightSigma) - Min(SNRWeightSigma) )Here high SNRWeightSigma is a good thing and frames with good SNRWeight will have weights towards one. Again, the above expression takes values from 0 to 1.
From your weighting expression I see that you want a mix of "2/3 good FWHM " and "1/3 good SNR". Since now each "quality measure" is properly scaled, you can choose your "mix weights" (2/3 for "good FWHM" and 1/3 for "good SNR") at your taste (but again your "mix weights" should sum to one.)
You can also modify the numerators to avoid obtaining weights close to zero in order to give a chance to all images to contribute
something at the integration stack!
I hope this makes sense, and has no obvious mistakes