CIRADA-Tools / RM-Tools

RM-synthesis, RM-clean and QU-fitting on polarised radio spectra
MIT License
42 stars 23 forks source link

Stokes I fitting threshold #121

Open Cameron-Van-Eck opened 5 months ago

Cameron-Van-Eck commented 5 months ago

The Stokes I fitting tool for 3D cubes has a feature where it will only fit pixels above a threshold; this saves computation working on pixels of low signal.

Paddy recently complained that the current threshold is far too permissive, in that it includes too many pixels compared to what might be expected. The current filter/threshold implementation is this: per-pixel, it checks how many channels are above the user-supplied threshold (which is either in intensity units or a multiple of the estimated channel noise); if 1 or more channels are above the threshold, the pixel is fit. Having the threshold be only one channel means that the filter is very sensitive to outliers -- even a single channel with anomalously high noise/values is enough to trigger fitting on nearly every pixel. So the threshold has to be set very high, which isn't always good.

Should we change the filter condition? For example, it could be if 50% of channels are above the threshold value -- this would be more robust against small numbers of outlier channels. It's an easy change to make, as well. I'm not sure if there's a more statistically interesting/clever/valid test we could construct for this.