Extended SR-EELS_characterisation.ijm by an Gaussian fit:

The Gaussian fit is used to estimate the region (rectangle selection) that is used to run the threshold.
Additionally the region is used at the next iteration to fit the Gaussian. Because there are high counts at the first iteration, there is only a low risk for this method to fail.
For bad fit result the code 'sigma_weighed = sigma_weighting * gauss_sigma / pow(Fit.rSquared(), 2);' will increase the width of the region.