$\kappa, \sigma$ clipping allows for a non-zero background level, i.e. the mode of the background pixels can deviate from zero for Stokes I images.
One should be able to opt for a zero background per image, depending on the image fidelity.
This should be the case for well-deconvolved images, where there are no negative pixel values, beyond negative noise peaks, surrounding strong sources.
For images of the Galactic Centre this is almost never the case, such a strong and complicated radio source hampers deconvolution and calibration. Consequently, radio images of the GC almost always show negative pixel values around Sgr A.
For simpler imaging with e.g. only point sources and negligible side lobes remaining from deconvolution, this effect can often be avoided and the mode of the background pixels in all subimages should be almost zero.
In that case, for assessing the rms noise, PySE should compute the quadratic sum of all negative pixel values per subimage, the average thereof and finally calculate the square root of that average. That should yield a pretty good estimate of the rms noise. And the mode of the background noise can be assumed to be zero. No $\kappa, \sigma$ clipping would be needed for such "clean" images. This should be accurate as well as fast.
$\kappa, \sigma$ clipping allows for a non-zero background level, i.e. the mode of the background pixels can deviate from zero for Stokes I images.
One should be able to opt for a zero background per image, depending on the image fidelity. This should be the case for well-deconvolved images, where there are no negative pixel values, beyond negative noise peaks, surrounding strong sources. For images of the Galactic Centre this is almost never the case, such a strong and complicated radio source hampers deconvolution and calibration. Consequently, radio images of the GC almost always show negative pixel values around Sgr A.
For simpler imaging with e.g. only point sources and negligible side lobes remaining from deconvolution, this effect can often be avoided and the mode of the background pixels in all subimages should be almost zero.
In that case, for assessing the rms noise, PySE should compute the quadratic sum of all negative pixel values per subimage, the average thereof and finally calculate the square root of that average. That should yield a pretty good estimate of the rms noise. And the mode of the background noise can be assumed to be zero. No $\kappa, \sigma$ clipping would be needed for such "clean" images. This should be accurate as well as fast.