Back to eSASS task descriptions

eSASS task: FLAREGTI

eROSITA/flaregti-1.19+


Scope

This document provides a description of the algorithm and instructions for the correct usage of the FLAREGTI task, part of the eSASS (the eROSITA Science Analysis Software System) suite.

Description

FLAREGTI creates good-time-intervals (GTIs) which can be used to filter flares from an event file. The task creates a combined lightcurve of the telescope modules in a selected energy band with a chosen time binning. It then creates GTIs by choosing rate thresholds which are dynamically chosen as a function of position to optimize the detection of faint sources. Alternatively, the task can be used to calculate the GTIs for a fixed rate threshold. The produced GTIs are normally written to the FLAREGTI1-7 extensions of the input FITS event file, but can be written to a separate FITS GTI file. Please note that FLAREGTI does not itself apply the produced GTIs to the input data; EVTOOL can be used to make a filtered event file.

Algorithm

  1. Load the events in the input event file eventfile, the set of input GTIs given by the extensions GTI1 to GTI7 and the input attitudes given by the extensions CORRATT1 to CORRATT7.
  2. Start with an input set of GTIs, taken from those in GTI1-GTI7.
  3. Create an image in the rectangle given by the parameters xmin, ymin, xmax and ymax, binning by a factor of binsize, using a range in PI values between mask_pimin and mask_pimax filtering by the input GTI. Using this image, identify pixels which have a maximum-likelihood significance of detml or greater than their surroundings (measured in a surrounding 5x5 pixel box). These high-significance pixels are removed from a mask image.
  4. Construct a lightcurve for the event file. Counts are summed within a time bin of timebin seconds within a nominal field of view (FoV; currently set to a radius of 37126.7 sky pixels), selecting events between a PI values of pimin and pimax, within input GTIs, excluding masked regions. The average area within each time bin is calculated by calculating the average sky area in square degrees within the FoV which are unmasked, sampling using 1 second time bins. The average exposure for all the telescope modules (TMs) within the GTIs is also calculated in each time bin. The lightcurve rate is calculated by dividing the number of counts by the area and exposure. Bins with zero area or exposure are removed from the lightcurve.
  5. The area for which the mask image is defined is divided into a grid, splitting the x and y range by the value given by the parameter gridsize. Each of these grid points has a threshold lightcurve rate (actually surface brightness rate) to be computed later.
  6. If the parameter threshold has a positive value, this selects a fixed surface brightness rate threshold for all time bins and grid points. Otherwise, a dynamic threshold is computed (see step 8.).
  7. For each grid point, it is determined for which time bins the centre of the grid point is within the radius of the telescope (as defined by the parameter fov_radius), as the telescope scans over the field.
  8. When computing a dynamic threshold, for each grid point a range of different threshold rates are scanned over. The best threshold for each point is the rate which minimises the detected source rate. The result is an array of gridsize×gridsize threshold values. In detail, for each of these thresholds, the average background surface brightness is calculated for the above light curve bins for those bins when the rates are less than this value. Given these background surface brightnesses, the minimum rate of a source detected using the likelihood given by the parameter source_like is determined, assuming the source has a flat extent of a size given by the parameter source_size.
  9. If the parameter max_threshold is positive, then the threshold surface brightess rate for each grid point is forced to be at most this value.
  10. For each bin in the lightcurve, it is determined which grid point is closest to the aimpoint of the telescope. The fixed or dynamic threshold is taken for this grid point. If the lightcurve rate is less than this threshold the time interval for the time bin is included in the combined flare GTI.
  11. For each telescope module the intersection of the combined flare GTI with each input GTI (taken from the GTI1-GTI7 extensions), to produce the per-module flare GTIs.
  12. The process is repeated from step 3., using the output flare GTIs as the input GTIs, instead of the ones given by the GTI1-GTI7 extensions. The number of repetitions is given by the parameter mask_iter. This iteration is designed to help the detection of point sources if the input is heavily flared.
  13. Write the final mask to a file with filename mask, if write_mask is set. Write the final lightcurve and threshold rates to a file with filename lightcurve, if write_lightcurve is set. Write a 2D image of the threshold rates with filename thresholdimg, if write_thresholdimg is set.
  14. If the parameter gtifile is set, the output GTIs are written to the filename given. If unset, as is the default, FLAREGTI1-FLAREGTI7 extensions are added or replaced in the input event file.

Parameters

Default values are given in square parentheses.

Input files

Output files

Examples

Known issues

No known issues.