Scope
This document provides a description of the algorithm and instructions for the correct usage of the
ERMASK
task, which is part of
eSASS (the
eROSITA Science Analysis Software System).
Summary:
Create detection masks for eSASS detection chain tasks defining valid image
areas which are suitable for detection.
The masks are based on exposure maps created by the task EXPMAP.
Algorithms:
The task
ERMASK evaluates an exposure map and calculates a detection mask
according to conditions specfied by parameters
threshold1 and
threshold2 .
The detection mask is written into the primary extension FITS extension of the output image (
int8 ) , valid pixels are set
=1, pixels to excluded from source detection are set =0.
Parameter threshold1 defines an exposure threshold, given as fraction of
the maximum exposure value:
detmask(x,y) = 0
if (expimage(x,y) > maxval(expimage)*threshold1) detmask(x,y) = 1
With parameter
threshold2 additionally a maximum local exposure gradient can be set:
if (sqrt((expimage(x+1,y)-expimage(x-1,y))**2 + (expimage(x,y+1)-expimage(x,y-1))**2) > expimage(x,y)*threshold2 ) detmask(x,y) = 0
The detection pipeline requires only detection mask, if images from the same instrument in several energy bands are processed.
Parameters:
- expimage (string) REQUIRED [e.g "expmap.fits"]
- detmask (string) REQUIRED [e.g "detmask.fits"]
- threshold1 (real) OPTIONAL [e.g 0.2]
- Minimum exposure threshold (fraction of max. value)
- threshold2 (real) OPTIONAL [e.g 1.0]
- Maximum gradient threshold. Set to value >> 1 to disable
- regionfile_flag (logical) OPTIONAL [e.g "N"]
- User defined region file for additional exclusion regions (currently not used)
- regionfile (string) OPTIONAL [e.g "mask.reg"]
- Name of user defined region file (currently not used)
- clobber (logical) OPTIONAL [e.g "N"]
- Overwrite any existing output files?
Input files:
Output files:
Examples:
- Create detection mask based on the exposure mask image_soft_exp.fits
- Valid pixels need to have at leas 10% of the maximum exposure
- Disable gradient condition by setting threshold>> 1
ermask expimage="image_soft_exp.fits" \
detmask="detmask.fits" \
threshold1=0.1 \
threshold2=100.