
#Saoimage ds9 image reduction how to#
Below we will show how to use TweakReg include/exclude DS9 regions.

The include/exclude DS9 regions can be used to tell TweakReg to look for sources only in specific parts of the image, or to exclude some parts of the image from sources finding without using very restrictive parameters for source finding. to reduce the number of false detections even further, however, if these parameters are too restrictive, this may lead to some "good" sources not being found. We can still adjust detection threshold, use roundness/sharpness parameters, etc. However, there are still many sources detected either as cosmic rays or located inside extended galaxies (which could affect the accuracy of positions of these sources). These sources are shown as green dots in Figure 1. This has reduced the number of sources detected in 'jcdua3f4q_flc.fits' by almost a third to 5305 (from 13758). Updatehdr=False) Figure 1: Sources found by TweakReg in 'jcdua3f4q_flc.fits' (red points) *without* excluding "bad" pixels using DQ information and sources (green points) found in the same image *with* bad pixel "filtering" based on the DQ. Imagefindcfg=dict(threshold=50,conv_width=4.5,dqbits=0),\ In order to do this, we set the TweakReg parameter 'qdbits' within 'imagefindpars' to 0: We can reduce the number of cosmic rays detected as sources by enabling TweakReg to use DQ flags associated with image pixels. TweakReg found 13758 sources in the SCI,1 extension alone in the 'jcdua3f4q_flc.fits' image. The red points show the sources found by TweakReg when run with the above command. In Figure 1 we show a part of the 'SCI,1' image of the FITS file 'jcdua3f4q_flc.fits'. Imagefindcfg=dict(threshold=50,conv_width=4.5),\ With almost default parameters, TweakReg will find plenty of sources with most of them being either cosmic rays, extended sources, or point-like sources located inside large extended sources. We provide the ACS/WFC FLC files so that the user can re-create our results. This example is based on observations of 'MACSJ1149.5+2223-HFFPAR' (proposal ID: 13504, files 'jcdua3f4q_flc.fits' and 'jcdua3f8q_flc.fits'). In this example we show how to use DS9 regions with TweakReg in order to exclude spurious detections and parts of the input images that might trouble a proper identification of sources for alignment.
