astromatic / sextractor

Extract catalogs of sources from astronomical images
http://astromatic.net/software/sextractor
GNU General Public License v3.0
154 stars 44 forks source link

Relative variance scaling. #71

Open jackcturner opened 2 months ago

jackcturner commented 2 months ago

Hello,

I'm trying to understand the Source Extractor approach to weighting, but I'm struggling to understand the conversion from relative to absolute variance. The manual states that "A robust scaling to the appropriate absolute level is then performed by comparing this variance map to an internal, low-resolution, absolute variance map built from the science image itself". It's not clear to me what this "comparison" would be and I haven't been able to find it within the code.

Any help would be very much appreciated!

ebertin commented 1 month ago

Hi @jackcturner, good question and sorry for the late reply! What SExtractor does is compute in every valid background mesh the ratio between the estimated (clipped) standard deviation of the background noise and an estimate of the mode of the actual weight map. if RESCALE_WEIGHTS is set to Y (the default) then the weight-map is rescaled with a factor which is the median of all those ratios. It runs fast but of course this may lead to biased estimates. However in practice the dispersion in the ratios is low enough (for background meshes with reasonable sizes) that systematic errors are likely to be small compared to other factors, such as noise-correlation and contamination of the sky background by undetected sources. I hope it helps!