Processing Modes
Several modes are available for the onboard data processing. For scientific observations only two need to be considered: PMWORK and PMENV2.
PMWORK
This mode uses two maps which must have been calculated before:
- Offset Map OFF(RAWX,RAWY): even in the absence of any radiation, each pixel releases some charge. This charge 'offset', which may be different from pixel to pixel, must be subtracted from the charge which is measured during an observation. The computation of the offset map is usually done, with the filter wheel closed, by reading out 134 CCD frames, rejecting for each pixel the three highest and lowest PHA values and computing the mean of the remaining 128 samples. Hardware limitations make it necessary to do this separately for the upper and lower half of the CCD.
- Noise Map NOISE(RAWX,RAWY): the charge released by a pixel in the absence of any radiation is not constant, but subject to fluctuations. The noise map contains the standard deviation of the charge for each pixel, computed from a sample of 128 frames.
and requires two parameters:
- primary threshold T1
- secondary threshold T2
The processing is done in the following way:
- every 50 ms, the charges found in all the 384 x 384 pixels are read out from the framestore, yielding a map PHA(RAWX,RAWY);
- the offset map is subtracted, yielding the map PHA_off(RAWX,RAWY) = PHA(RAWX,RAWY) - OFF(RAWX,RAWY);
- for each segment ( PHA_off(rawx,RAWY), rawx = n*64-63 .. n*64), n = 1,6 ), the median value PHA_med(n,RAWY) is computed;
- the median value is subtracted from each pixel, yielding PHA_cor(RAWX,RAWY) = PHA_off(RAWX,RAWY) - PHA_med(n,RAWY);
- all the pixels (RAWX,RAWY) with PHA_cor(RAWX,RAWY) ≥ T1 are selected and put into the telemetry;
- for each of the pixels (RAWX,RAWY) which were selected in the step before, their 8 pixel environment is checked for the presence of pixels with PHA_COR(rawx,rawy) ≥ T2 NOISE(rawx,rawy); if this condition is satisfied, these pixels will also be transmitted.
PMENV2
This mode uses two maps which must have been calculated before:
- Offset Map OFF(RAWX,RAWY): see above.
- Threshold Map THR(RAWX,RAWY): this map contains for each pixel the primary threshold T1.
and requires two parameters:
- scaling factor for the Threshold Map S1.
- secondary threshold pair selector S2.
The processing is done in the following way (the first 4 steps are identical to PMWORK):
- every 50 ms, the charges found in all the 384 x 384 pixels are read out from the framestore, yielding a map PHA(RAWX,RAWY);
- the offset map OFF(RAWX,RAWY) is subtracted, yielding the map PHA_off(RAWX,RAWY) = PHA(RAWX,RAWY) - OFF(RAWX,RAWY);
- for each segment ( PHA_off(rawx,RAWY), rawx = n*64-63 .. n*64), n = 1,6 ), the median value PHA_med(n,RAWY) is computed;
- the median value is subtracted from each pixel, yielding PHA_cor(RAWX,RAWY) = PHA_off(RAWX,RAWY) - PHA_med(n,RAWY);
- all the pixels (RAWX,RAWY) with PHA_cor(RAWX,RAWY) ≥ S1 THR(RAWX,RAWY) are selected and put into the telemetry.
- for each of the pixels (RAWX,RAWY) which were selected in the step before, their 8 pixel environment is checked for the presence of pixels with PHA_COR(rawx,rawy) ≥ S1 THR(RAWX,RAWY) - DIFF2(dir), where DIFF2(dir) is given by the secondary pair selector S2 and the direction of the neighbouring pixel (rawx,rawy) with respect to (RAWX,RAWY), i.e., whether dir = abs(rawx-RAWX) + abs(rawy-RAWY) is 1 (adjacent pixel) or 2 (diagonal pixel); if this condition is satisfied for at least one pixel in the 8 pixel environment, then the whole environment is transmitted in a highly compressed format, which requires not more bytes than the transmission of one neighbouring pixel in PMWORK.
Comparison of the two modes
PMENV2 is the more advanced processing mode, providing several advantages over PMWORK:
- The threshold map was determined during the ground calibration from more than 30 000 CCD dark frames with the goal
- to achieve a total event rate of 5.0 events per frame (per CCD).
- to ensure that each pixel contributes equally to the total event rate.
and was loaded into the on-board memory, individually for each CCD, before launch. The motivation for computing the threshold map in this direct way rather than to base it on the noise map (as done in PMWORK) was that the fluctuations are not Gaussian and that 128 samples are far too few for covering the full range of fluctuations.
In order to be able to adjust the threshold map to the conditions after launch, where the noise was expected to be higher, this threshold map can be multiplied with the scaling factor S1 to yield the scaled threshold map. The scaling factor turned out to be comfortably small, staying below 1.2 for all the 5 CCDs which are not affected by the light leak.
- A novel algorithm was introduced which makes it possible to transmit the 8 pixel environment in a highly compressed format. The compression was achieved by the following means:
- abandoning the necessity of coding any pixel coordinate by transmitting the environment pixels in a pre-defined sequence around the central pixel.
- reducing the number of bits needed for coding the PHA values by expressing them in relative units with respect to the scaled threshold map; as the four adjacent pixels are more important for the charge collection than the diagonal pixels, there is the possibility to assign different PHA ranges to the two pixel types with the parameter S2.
With PMENV2 it becomes possible to transmit essentially all the information necessary for the charge collection which would be accessible if eROSITA were operated on ground. An interesting detail is that the transmission of the 8 pixel environment occurs only if at least one pixel is found to exceed the threshold. In the majority of cases when this does not happen, PMENV2 provides valuable information without requiring any additional telemetry. Please note that the description above is somewhat simplified. PMENV2 offers even more diagnostics, as can be seen in the description of the eSASS task pattern.
After launch, it turned out that the on-board coding of PMWORK contained a bug in the MIP processing, which may create essentially random bit patterns in the downlinked data. These cannot be filtered out in the decoding process, but may then be recognized as, e.g., wrong frame times or wrong telemetry modes. In many cases, however, it is not possible to spot them, because all the bits in the telemetry are used for coding information. The 'coordinate bits', e.g., can by design only store values between 0 and 383 for each axis, so that an error in the coordinate can only be spotted when this coordinate happens to coincide with another occurrence of the same coordinate in the same CCD frame. Due to this bug (which is not present in PMENV2), PMWORK cannot be considered as a reliable data transmission mode, and one should take the possibility into account that scientific results derived from data taken in this mode may be affected by this problem.