Package: catdagger
**CATDagger**==============================================================================A catalog source differential gain tagger based on local noise characteristicsThis tool segments regions within residual images that are in need of a differential gain. Preferably the tool is run on stokes Vresiduals, which typically contain relatively little real flux and mostly residual calibration errors. In principle it can also be run on Stokes I residualsif direction independent calibration was successful.DS9 region maps containing regions and cluster lead information is output by default as shown as example below. Tigger LSM catalogscan simultaniously be processed and reclustered based on identified dE regions... figure:: https://github.com/bennahugo/catdagger/blob/master/misc/catdagger.png:width: 250px:height: 250px:align: centerUsage===============================================================================dagger --helpusage: CATDagger - an automatic differential gain tagger (C) SARAO, Benjamin Hugo 2019[-h] [--stokes STOKES] [--min-tiles-region MIN_TILES_REGION][--input-lsm INPUT_LSM] [--ds9-reg-file DS9_REG_FILE][--ds9-tag-reg-file DS9_TAG_REG_FILE] [-s SIGMA][--tile-size TILE_SIZE] [--global-rms-percentile GLOBAL_RMS_PERCENTILE][--de-tag-name DE_TAG_NAME][--min-distance-from-tracking-centre MIN_DISTANCE_FROM_TRACKING_CENTRE][--add-custom-exclusion-zone ADD_CUSTOM_EXCLUSION_ZONE [ADD_CUSTOM_EXCLUSION_ZONE ...]][--max-region-right-skewness MAX_REGION_RIGHT_SKEWNESS][--psf-image PSF_IMAGE][--remove-tagged-dE-components-from-model-images REMOVE_TAGGED_DE_COMPONENTS_FROM_MODEL_IMAGES][--only-dEs-in-lsm][--max-positive-to-negative-flux MAX_POSITIVE_TO_NEGATIVE_FLUX][--max-region-abs-skewness MAX_REGION_ABS_SKEWNESS]noise_mappositional arguments:noise_map             Residual / noise FITS map to use for estimating localRMSoptional arguments:-h, --help            show this help message and exit--stokes STOKES       Stokes to consider when computing global noiseestimates. Ideally this should be 'V', if available--min-tiles-region MIN_TILES_REGIONMinimum number of tiles per region. Regions with fewertiles will not be tagged as dE--input-lsm INPUT_LSMTigger LSM to recluster and tag. If this is notspecified only DS9 regions will be written out--ds9-reg-file DS9_REG_FILESAODS9 regions filename to write out--ds9-tag-reg-file DS9_TAG_REG_FILESAODS9 regions filename to contain tagged clusterleads as circles-s SIGMA, --sigma SIGMAThreshold to use in detecting outlier regions--tile-size TILE_SIZENumber of pixels per region tile axis--global-rms-percentile GLOBAL_RMS_PERCENTILEPercentile tiles to consider for global rmscalculations--de-tag-name DE_TAG_NAMETag name to use for tagged sources in tigger LSM--min-distance-from-tracking-centre MIN_DISTANCE_FROM_TRACKING_CENTRECutoff distance from phase centre in which no tags beraised.This can be used to effectively exclude theFWHM of an parabolic reflector-based interferometer.--add-custom-exclusion-zone ADD_CUSTOM_EXCLUSION_ZONE [ADD_CUSTOM_EXCLUSION_ZONE ...]Add manual exclusion zone to which no dE tags shall beadded. Expects a tripple of centre X, Y pixel andradius.--max-region-right-skewness MAX_REGION_RIGHT_SKEWNESSThe maximum tolerance for right skewness of a pixeldistribution within a region.A large value (taileddistribution) indicates significant uncleaned fluxremaining in the residual. This can be used toeffectively control detection sensitivity to uncleanedextended emission, but should be set to 0 if residualsother than stokes I are used--psf-image PSF_IMAGEPSF image from which BPA, BMAJ and BMIN may beextracted--remove-tagged-dE-components-from-model-images REMOVE_TAGGED_DE_COMPONENTS_FROM_MODEL_IMAGESBlank out model images within resolution of tagged LSMcomponents. Expects list of model FITS files. Thisoption is useful for hybrid DFT-CLEAN componentmodelling as onlyextended / faint clean componentscontributes to model.--only-dEs-in-lsm     Only store dE tagged sources in lsm. This option isuseful for hybrid DFT-CLEAN component modelling, asonly bright compact gaussian emission contributes todE solutions--max-positive-to-negative-flux MAX_POSITIVE_TO_NEGATIVE_FLUXThe maximum tolerance for the ratio of positive tonegative flux. Only to be used with stokes I--max-region-abs-skewness MAX_REGION_ABS_SKEWNESSThe maximum tolerance for absolute skewness of a pixeldistribution within a region.A large value (taileddistribution) indicates significant uncleaned fluxremaining in the residual. This can be used toeffectively control detection sensitivity to uncleanedextended emission, but should be set to 0 if residualsother than stokes Q,U or V are used