Removal of ghosts and satellite trailsΒΆ

Satellite trails or ghosts are sometimes remain in coadd images. These packages can masn and remove them. Please use these packages as a developing ones. We are willing to recieve a feedback from users. Please send it to helpdesk@anela.mtk.nao.ac.jp.

The ghost masking component (hscGhost) is implemented based on engineering work on the ghosts in HSC images by Drs. Yutaka Komiyama and Satoshi Kawanomoto et al., and testing codes derived from the work.

References (poster presentations at Subaru Users Meeting 2016):

After downloading, expand it to suitable directory.

tar xvf mask.tar.gz

The detailed information is described in mask/README.

First, expand the packages under mask/

tar xvf hscGhost.tar.gz
tar xvf fh_trails.tar.gz
tar xvf obs_subaru.tar.gz

Then setup pipeline, astrometry data, and the packages.

# In case of astrometry_net_dat = Pan-STARRS
setup-hscpipe
setup astrometry_net_data ps1_pv3_3pi_20170110-and

setup -jr hscGhost/
setup -jr fh_trails/
setup -jr obs_subaru/

fh_trails and obs_subaru are needed to rebuild.

cd fh_trails
scons opt=3 -j 8  # 8 = Number of cores using parallel compilation
cd ..

cd obs_subaru
scons opt=3 -j 8
cd ..

These packages should be applied to CORR files. When you execute them, setup all commands above and run maskGhost.py

maskGhost.py $home/hsc --rerun dith_16h_test --id visit=902798..902808:2 --config doMaskMustache=True doMaskCaustic=True doMaskTrail=True --clobber-config --batch-type=smp --cores=8

# Usage
#  maskGhost.py [processing directory] --rerun [rerun] --id visit=[visit] --config doMaskMustache=True doMaskCaustic=True doMaskTrail=True --batch-type=[batch type] --cores=[ncores]
# Options
# doMaskMustache = True : Mask ghosts like mustache
# doMaskCaustic = True : Mask ghosts like caustic shape
# doMaskTrail = True : Mask satellite trailes

This command applies masks for detected satellite trails, and writes new files $home/hsc/rerun/[rerun]/[pointing]/[filter]/corr/CORM-*.fits, rather than overwriting the original CORR files. The mask plane BAD is set in the mask layer of the CORM FITS files. You need to carefully check the updated masks are reasonable - be sure that your important sources and pixels are not affected by wrong masks set by this command.

You need to replace CORR fits with CORM files before you run stack.py. You can use wcs and fcr files made from previous CORR files. The stack.py will combine CORR files (not CORM files) and reject pixels with mask bit BAD set in coadding stage.