bug-gnuastro
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Upper limits for surface brightness levels with noisechisel, mkcatalog


From: Leslie Hunt
Subject: Upper limits for surface brightness levels with noisechisel, mkcatalog
Date: Wed, 7 Feb 2024 12:02:02 +0100

Hello,

Thank you very much for all the incredible work that has gone into gnuastro! i've been using noisechisel to determine noise levels in newly released Euclid images, but have found a problem when applying the procedures described in

https://www.gnu.org/software/gnuastro/manual/html_node/Image-surface-brightness-limit.html

(1) i use noisechisel to create a mask and determine initial guesses for surface brightness (SB) levels, e.g.,

astfits ../IC10/Euclid-VIS-ERO-IC10-LSB.v5-rebin-use-detected-optimize-uplimsbl.fits  -h1 | grep ^SBL
SBLSTD  =             1.445225 / Pixel STD for surface brightness limit.        
SBLNSIG =                   1. / Sigma multiple for surface brightness limit.  
SBLMAGPX=             29.73216 / [mag/pix] Surface brightness limit per pixel.  
SBLAREA =                 100. / [arcsec^2] Area for surface brightness limit.  
SBLMAG  =             30.92496 / [mag/arcsec^2] Surf. bright. limit in SBLAREA.

(2) then i create 1000 apertures in the non-detected sky regions as described in the above mentioned section of the manual, namely

    r_pixel=$(astfits $f.fits --pixelscale -q \
                  | awk '{print '$r_arcsec'/($1*3600)}')

## Make circular aperture at pixel (100,100) position is irrelevant.
    echo "1 100 100 5 $r_pixel 0 0 1 1 1" | astmkprof --background="" \
                 --clearcanvas --mforflatpix --type=uint8 \
                 --output=lab.fits

## Do the upper-limit measurement, ignoring all NoiseChisel's
## detections as a mask for the upper-limit measurements.
    astmkcatalog lab.fits -h1 --zeropoint=$ZP -o$f-uplimsbl.fits \
             --sfmagarea=$area_arcsec2 --sfmagnsigma=$nsigma --forcereadstd \
             --valuesfile=$f.fits --valueshdu=INPUT-NO-SKY \
             --upmaskfile=$f.fits --upmaskhdu=DETECTIONS \
             --upnsigma=$nsigma --checkuplim=1 --upnum=1000 --upsigmaclip=10,3\
             --ids --upperlimit-sb

# writes ds9.reg in calling directory
    asttable $f-uplimsbl_upcheck.fits --noblank=RANDOM_SUM \
         | astscript-ds9-region -c1,2 --mode=img --output=$f.reg\
                                --radius=$r_pixel

where $f=../IC10/Euclid-VIS-ERO-IC10-LSB.v5-rebin-use-detected-optimize

i have visually inspected the apertures (as much as possible with 1000 of them), and find that they fall on empty regions of the sky as expected.

(3) the result of the upper SB limit is as follows:

asttable ../IC10/Euclid-VIS-ERO-IC10-LSB.v5-rebin-use-detected-optimize-uplimsbl.fits
1      2.670039e+01

or more than 4 mag brighter than above in point(1).

(4) i have checked the photometry in the 1000 apertures in two ways: (a) by performing aperture photometry and examining the std dev within the 100arcsec2 apertures; (b) by fitting a Gaussian to the signal within each of the apertures. Both checks give numbers that are entirely reasonable, i.e., 0.3-0.4 mag/arcsec^2 brighter, with respect to the first guess with astmkcatalog and noisechisel:

Gaussian fit Ie median stdsky 2.0336499999999997 Ie skySBlim 100arcsec2 30.554
Noclip photometry Ie median stdsky 2.37 Ie skySBlim 100arcsec2 30.387932271773856

The first numbers on each line are the median stdev within the aperture in counts (ADU), and the 2nd are SB limits in mag/arcsec^2. Note that these mags have been converted to mag/arcsec2 in 100 arcsec2 regions as advised in the gnuastro manual (tutorial, namely by adding 2.5*log10(10*0.3) where 10=sqrt(region size in arcsec) and 0.3=pixel diameter in arcsec.

BOTTOM LINE (sorry for the long description): the upper SB limit given by the uplimsbl fits file seems to be off by a lot. It would correspond to std dev count levels that are much higher than seen anywhere in the 1000 regions (checked both with photometry and by fitting Gaussians to the distribution of the signal).

Thanks very much for any insight!
All the best,
leslie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]