astromatic / sextractor

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

save local noise/std for each extracted source #23

Open vpicouet opened 2 years ago

vpicouet commented 2 years ago

Hello, is there a way to access the local noise/std for each extracted source in the output catalog? I have seen that in the starlink sextractor project there was a parameter for this (https://github.com/Starlink/sextractor/blob/master/src/param.h BKGSIG) but did not find one here. I posted it here as the user forum is a broken link in the readme. Thanks a lot!

ebertin commented 2 years ago

Sorry for the user forum. I had to close it as it was too difficult to maintain because of increasing security issues. You've come to the right place. There is some ambiguity about the background noise for a given source, as it may vary a lot over the isophotal footprint. Would you like something similar to BACKGROUND, which is limited to the centroid pixel? You may also use FLUX_ERR divided by the square-root of ISOAREAF_IMAGE. This assumes of course that the noise is uncorrelated from pixel to pixel (which is what SExtractor assumes anyway). Another valuable estimator, if you are using model fitting, is King's equivalent noise area NOISEAREA_MODEL.

vpicouet commented 2 years ago

Thanks Emmanuel for the answer! Basically I wanted to get the SNR of the extracted sources but SNR_WIN does not seem to depend on the background that I have (as I am actually controlling the level of hot pixels, see gif). Enregistrement d’écran, le 2022-03-17 à 15 33 19 mov So I wanted to create a very basic SNR estimator: FLUX_MAX / BACKGROUND_NOISE where BACKGROUND_NOISE would by the estimated noise around the source (we could add the shot noise of the source but I do not really need it right now). With your previous message, it appears that FLUXERR_ISO/ISOAREAF_IMAGE**0.5 is constant:

Capture d’écran, le 2022-03-17 à 15 23 33

Do you know the easiest way to acces this information. Basically i could just extract the background 20 pixels away from the source and compute the standard deviation but I guess it is already implemented in SExtractor.

vpicouet commented 2 years ago

I guess BACKGROUND is estimated on an annulus around the source and the value at the central position is interpolated/modeled. Is there a way to retrieve the standard deviation of the same annulus or its interpolation at the central position?