A&A 411, L117-L121 (2003)
DOI: 10.1051/0004-6361:20031365

SPI-specific analysis method and software overview

R. Diehl 1 - N. Baby 2 - V. Beckmann 3,7 - P. Connell 4 - P. Dubath 3 - P. Jean 2 - J. Knödlseder 2 - J.-P. Roques 2 - S. Schanne 5 - C. Shrader 6 - G. Skinner 2 - A. Strong 1 - S. Sturner 6 - B. Teegarden 6 - A. von Kienlin 1 - G. Weidenspointner 2,6,8


1 - Max-Planck-Institut für extraterrestrische Physik, 85741 Garching, Germany
2 - Centre d'Étude Spatiale des Rayonnements, 31028 Toulouse, France
3 - Integral Science Data Center, 1290 Versoix, Switzerland
4 - University of Birmingham, Birmingham, UK
5 - DSM/DAPNIA/Service d'Astrophysique, CEA Saclay, 91191 Gif-Sur-Yvette, France
6 - NASA/Goddard Space Flight Center, Greenbelt, MD 20771, USA
7 - Institut für Astronomie und Astrophysik, Universität Tübingen, 72076 Tübingen, Germany
8 - Universities Space Research Association, Seabrook, MD 20706, USA

Received 15 July 2003 / Accepted 4 September 2003

Abstract
The SPI spectrometer on INTEGRAL features a camera system with 19 Ge detector modules, imaging photons through a tungsten coded mask. Background is reduced by an anticoincidence detector system surrounding these. The specifics of this instrument lead to data correction and analysis methods which are described here. Raw data for science analysis are detector event messages and spectra for different categories of detector hits and pulse shapes. Preprocessing combines calibrated spectra from these, which are then interpreted using the imaging and spectral response function for measured spectra where parts of the detector plane are occulted by the mask. Background dominates the overall signal, tailored background estimates and models are based on instrument-specific signatures, their correlations, and trends.

Key words: gamma-rays: observations - methods: data analysis

1 Introduction

The SPI spectrometer (Vedrenne et al. 2003) on INTEGRAL (Winkler et al. 2003) has been optimized for gamma-ray line spectroscopy, although the coded mask also supports gamma-ray imaging. Primary signals (see Fig. 1) are the gamma-ray interactions in the 19 Ge detector modules of the "camera'', translated in detector signal amplitude, shape, and relative timing among detector units. Triggers of just one of the 19 detector modules are called "single events'' (SE, "pseudo-detector'' IDs 0-18), with three subclasses distingushed (in "pseudo-detector'' ID's 85-141), depending on the success of the pulse shape determination. A basic "event message'' holds detector-ID, trigger time, signal amplitude, and measured pulse shape info (if it can be derived, these are then called "PSD events'' (PE)). Detector triggers which occur within a "coincidence interval'' of 350 ns are called "multiple events'' (ME), they may arise from an interaction cascade of a single primary photon. For ME, the identifiers of detectors involved and all pulse heights are transmitted together with the relative arrival times in detector modules. These "multiples'' effectively constitute "virtual detector modules'', which can be used together with the 19 real detectors for improved sensitivity and angular resolution at higher energies. We use 66 such virtual detectors in our analysis ("pseudo-detector'' IDs 19-84). The fraction of "multiples'' rises with increasing energies, being $\simeq$40% at 2 MeV. The BGO detectors of the anticoincidence system may "veto'' Ge camera event triggers with a $\simeq$750 ns blocking window (5.5 $\mu$s for saturating veto events), thus suppressing camera events which arise from the passage of energetic cosmic-ray particles through the instrument, or from photons incident from outside the field of view as defined by the mask-camera arrangement, or from photons leaking out of the camera detectors ("self-veto''). Primary modes of data collection are the "photon-by-photon'' mode described above, and a "spectral'' mode where single events are collected into spectral histograms on board to save bandwidth for high event trigger rates.

  \begin{figure}
\par\includegraphics[width=8.8cm,clip]{Diehl_Fig_rawdata.eps} \end{figure} Figure 1: SPI principal data types for science analyses.
Open with DEXTER

The coded mask casts a shadow onto the camera plane, effectively occulting approximately 50% of the camera area for a point source in the sky. Variation of the camera pointing around the source direction in a "dither pattern'' then is used to collect a database of shadowgrams which can be deconvolved to find the source location also in the presence of a large background signal. The "imaging response function'' (IRF) describes how the recorded spectrum of each detector should look like for each source aspect angle within the field of view. A suitable "background model'' must be constructed to describe the signal which arises from photon interactions within the instruments, caused by induced radioactivity of the spacecraft and detector material or by cosmic-ray interactions which are not recognized through the anticoincidence systems' detectors, e.g. if due to neutrons.

Specific algorithms have been encoded in "instrument-specific software'' (ISSW) modules, which form part of the Integral Science Data Center (ISDC) system to process and analyze SPI data. In this paper we give a general overview of the data flow and processing tasks (see Fig. 2). The specifics of important and complex algorithms are described in detail and with specific references in the separate papers dedicated to each of these processing and analysis tasks.

  \begin{figure}
\par\includegraphics[width=17cm,clip]{Diehl_Fig_dataflow.eps} \end{figure} Figure 2: SPI data flow through preparation and scientific analysis within the ISDC system. The rounded boxes list specific data types, while shaded boxes list instrument-specific software modules (ISSW).
Open with DEXTER

2 Preparing science analysis

Densely-packed spacecraft telemetry is decoded from the different types of telemetry packets, and the SPI-specific data types of housekeeping data, onboard-collected spectra, event messages, and instrument status and command data are re-assembled in time order by the ISDC "preprocessing'' task. The basic time frame cycle onboard is 125 ms, housekeeping data (temperatures, voltages, scalers, and buffer status) are updated in intervals between 1 and 640 s, timing accuracy is preserved to better than 1 ms (up to the intrinsic $\simeq$102.4 $\mu$s limit for single-event telemetry), rates are sampled every 50 ms for the veto system and every second for Ge detectors. The data are grouped into "observations'', i.e. sequences of pointings around the target. The processing pipeline (see Fig. 2) starts by determining the pointings of an analysis set, then establishes "good time intervals'' (GTI), which are equivalent to the effective and useful measurement time of the instrument where telemetry is complete. Ratemeters are then evaluated to derive the instrument dead time, from onboard electronics dead times as well as telemetry losses. In a parallel processing step, the inflight calibration is derived from positions of known background lines in the measured pulse-height spectra, so that time-variable channel-to-energy conversion is obtained, which is applied in the "gain correction'' step of processing. Calibrated event messages are finally combined with onboard spectra where required (i.e. in spectral mode) in spectral histograms for each pointing, now expressed in counts per energy bin, detector, and pointing. Auxilliary data from the spacecraft complement such an instrument-specific observation data group, which then forms the basis of subsequent imaging or spectral analysis (Fig. 3).

3 Instrument response

Monte Carlo simulations of photon interactions in a representative geometrical and mass model of the instrument have been exploited to determine the instrument response function. The principal quantity of interest is the amplitude and spectral shape of the signal seen by each individual detector for a celestial source of given energy and direction. In order to reduce this database, extensive use has been made of symmetries and approximations of the variations of the response with incidence direction and energy. Dependencies of photopeak and scattered continua of the spectral response were separated, and directional effects were split into attenuation outside the Ge camera, and detailed response variations of the 19-element Ge detector camera itself (Sturner et al. 2003).

In principle, multi-site Compton scatterings over more than one detector module include even higher-resolution imaging information, as, e.g., Compton scatterings in adjacent detectors typically occur in their outer edge regions. Therefore, in particular at energies above $\simeq$1 MeV, the complex response in "virtual'' detectors composed of pairs or triples of Ge detector modules may usefully be included in imaging analyses, adding virtual detector modules of smaller geometrical size and hence positional resolution than the physical Ge detector modules. One concern, however, could be systematics in the virtual-detectors' response from low-energy calibration uncertainties (Weidenspointner et al. 2003).

The response of the pulse shape selection algorithm is determined from flight data themselves, comparing the actual pulse shape distribution of single detector events to the expectations, and evaluating the probabilities for correct classification of events as "good photon events'' or "localized background events'', respectively.

4 Background handling

Cosmic-ray bombardement of the spacecraft and instrument results in different types of detector events, which add up to dominate the overall signal from such "instrumental background''. For example, the Crab as strongest gamma-ray point source leads to $\simeq$33 detector counts s-1, while overall background generates $\simeq$900 s-1, Galactic diffuse emission has $\simeq$10% signal-to-background ratio, and Galactic 26Al emission $\simeq$2%. Because of this primary role of incident cosmic ray particles (electrons, protons, neutrons, and nuclei), all background modelling and analysis attempts to use correlations with monitors of the incident cosmic-ray flux, such as rates of anticoincidence trigger events, or Ge detector trigger events with excessively-large pulseheights, or the INTEGRAL radiation monitor signal (see Weidenspointner et al. 2003; Jean et al. 2003a, for background details and further references). Prompt backgroundevents are rejected by the instrument's event veto logic, when the anticoincidence system detectors have been triggered. But beyond the veto duration of $\simeq$$\mu$s, delayed de-excitation of nuclei, thermalized neutrons, and radioactive decay leads to inevitable background events. Special signatures of such events can be used to classify events into "likely background'' versus "likely signal'' events. Two major approaches are the rise and decay characteristics of the pulse height measured in a detector, and the coincidence of signals which would not be expected from a single photon's interactions. For the pulse shape discrimination (PSD), one uses comparisons of actual pulse shape with a library of pulse shapes for each particular energy deposit to discriminate between "localized'' and "multiple-site'' interactions. Since the latter would also be typical for normal Compton scatterings of photons, only localized beta decay background can be suppressed through PSD, the gain in sensitivity of $\simeq$10% only holds within the energy range 400-1100 keV. This is below expectations, because the number of single-site background events in orbit is significantly lower than expected (Roques et al. 2003).

Photon interactions should be distributed along a track of successive Compton scatterings, hence be contiguous in the detector volume and spread over neighboring detectors only. Likewise, if one of the detectors in a multi-detector event records an energy deposit of 511 keV, apparently pair creation was part of the photon's interaction cascade, and it is likely that the second annihilation photon escaped detection. In this way, some additional background suppression can be achieved.

  \begin{figure}
\par\includegraphics[width=8.5cm,clip]{Diehl_Fig_obsdata.eps} \end{figure} Figure 3: The roots of the SPI observations database for analysis employing the coded-mask imaging.
Open with DEXTER

For the remaining background, models are constructed. One method assumes that the measured detector pattern of event rates should remain roughly constant with pointing directions for background events, hence one can use an "off-source'' pointing as background reference, and normalize this reference to the "on-source'' observations. The variations of detector count ratios limit the systematic quality of such an "Off'' model, normalizations introduce free model parameters. Extending this, one may modulate the amplitude changes of this pointing-invariant signal part according to monitors of cosmic-ray intensity such as the (total, or only the saturated) rates of the Ge detectors or the anticoincidence detectors or the INTEGRAL Radiation Environment Monitor (IREM), or with more complex background tracer functions which include radioactive-decay delays after activation of the spacecraft material in radiation belt passages every $\simeq$3 days, or after solar flare events. Interactive data inspection tools (e.g. ISDC's interactive status monitoring utility based on ROOT ("I-OSM''), or IDL-tools following event histogramming with spihist) are employed to derive these background behaviour parameters (Jean et al. 2003a). More and more background expertise and assumptions can be encoded within such proportionality-model or absolute-intensity background predictors, reducing the free paramaters in scientific analysis; a concern is systematic uncertainty and introduction of biases. It is one of the main analysis challenges in SPI data to establish and validate a suitable background model, because major variations with energy and time occur. Software tasks "spiback'' and "spi-obs-back'' have been prepared for rather generic model generation, but fine tuning of the background model for the specific analysis objective and algorithm will be essential to obtain optimum sensitivity and to avoid systematics.

5 Spectra

Ge detectors allow for high spectral resolution of $\simeq$2.5 keV at 1 MeV, suitable for astrophysical studies of individual gamma-ray lines and their shapes. The individual detectors have to be operated at cryogenic temperature ($\simeq$90 K) in order to achieve this high resolution. A Stirling cooling machine is used to maintain such temperature in the cryostat surrounding the detectors to within $\pm$1 K, with a drift below 0.05 K d-1. Detector gains may vary by $\simeq$1 keV from this, and hence precision calibration and tuning among detectors must be achieved to allow superposition of signals from different detectors and to apply the simulated response functions. Background lines e.g. at energies 23.4, 198.3, 882.3, and 1779.2 keV are largely free from contaminations so that fitting their peak positions (yet including the blends of nearby lines in the fit) yields a reliable energy calibration; accuracies better than 0.2 keV at $\simeq$500 keV can be achieved (Jean et al. 2003b; Weidenspointner et al. 2003). Then, superposition of calibrated spectra from all detectors is possible, and the spectral resolution is very near the instrumental limits $\Delta E/E$ of $\simeq$600 at 1800 keV. Degradation of detectors due to radiation damage becomes significant, leading to decrease of the spectral resolution by 10-20% per 6 months. "Annealing'' has been demonstrated to be able to repair such degradation, however; this maintenance activity will be performed $\simeq$every 6 months (Leleux et al. 2003; Roques et al. 2003).

Within the rather large field of view, the signals from all sources are superimposed, extraction of spectral information from specific sources must be preceded by or concurrently made with imaging analysis through analysis of the mask's coding pattern. One approach is to first determine the (point) source locations per energy bin within the field of view using the imaging response. In a second step, the measured counts are allocated to each of the sources as their composite signal is fitted to the measurement, and thus the count spectra of an individual source can be extracted. The "spiros'' software module (see Skinner & Connell 2003, for details and further references) has been prepared for this. This approach assumes that the imaging step is sufficiently accurate and stable. In a subsequent analysis step, then a detailed spectral response function can be used to deconvolve or fit the original incident photon spectrum of the source, using e.g. the "XSPEC'' tool. In an improved analysis, one may analyse the entire dataset simultaneously using imaging and spectral responses (including the off-diagonal response), and allow some variations of the source positions in order to better account for the interdependence of source signals within the field of view. A new version of XSPEC (V12) is being prepared for this.

If the location of sources cannot be achieved with sufficient quality, such as is the case for extended sources and diffuse emission, another approach must be used. Prior knowledge (or assumptions) about the spatial characteristics of the sky are then used to fit intensity parameters of such sky models to the data, as a function of (fine-binned) energy and the background behaviour. Software tools which implement such model fitting are "spidiffit'' and "spi_obs_fit'' (see Strong 2003; Knödlseder 2003, for details and further references, and Diehl et al. 2003 for an application).

6 Images

The structure of the SPI coded mask matches the size of its Ge detectors, so that for a single point source a special "hexagonal dither'' always illuminates or occults  half of the detectors completely. Together with INTEGRAL's "dithering'' observations (Courvoisier et al. 2003), this allows image reconstructions within the $\sim$ $16\times 16^\circ$ field of view with $\sim$degree resolution (Skinner & Connell 2003; Strong 2003). For exposures of a general region of the sky, the rectangular $5\times5^\circ$ standard dither pattern with 2$^\circ$ pitch is a compromise to allow imaging of sources and diffuse emission in a rather large field of view and to suppress sidelobes of the coded-mask imaging response function. Observers may choose between different dither patterns.

Image construction is not straightforward, due to the presence of these sidelobes, which make the response function non-diagonal and their inversion problematic, but also due to the presence of a large background signal. The basic image reconstruction method iteratively determines strong sources by searching in the data for the strongest correlation of the expected pattern for a point source. Such iterative methods are preferred for imaging instruments where the imaging response matrix cannot be inverted. The "spiros'' software tool (see Skinner & Connell 2003, for details and further references, and Bouchet 2003 for an application) implements this method. Another method iteratively convolves a complete trial skymap with the instrument response to produce a trial measurement, and then improves that skymap based on an analysis of the discrepancy of the trial data with the real measurement. The "spiskymax'' tool (see Strong 2003, for details and further references) uses an image entropy criterion to obtain converging images for such a method with its intrinsically large number of free parameters. Provided a sufficiently-large (>20) number of pointings have been recorded, with these methods a source separation below the intrinsic with of the spatial telescope response ($\simeq$2.7 degrees FWHM) can be obtained easily for strong nearby point sources (Attié et al. 2003), which in their best cases (e.g. Crab, Cyg X-1) can be located to $\simeq$10 arcmin. This suggests that the present restriction to the diagonal part of the spectral response in the imaging response function matrix is adequate in imaging as implemented through these tools.

Images generated with such methods employ assumptions about the resulting image properties, such as being composed of point-like sources, or having a maximum entropy, in order to suppress artifacts from fitting fluctuations of the background with response sidelobes. Therefore images cannot easily be compared quantitatively, when they originate from anaysis runs where such prior information differs. In general, SPI imaging therefore always tests an astrophysical hypothesis by formulating it and its complementary hypothesis in sky image space, and comparing their differences after folding these through the instrument response into the data space of measured spectra per pointing. The "spidiffit'' and "spi_obs_fit'' tools (Strong 2003; Knödlseder 2003) have been prepared for this task, with alternative algorithms for minimum searches and parameter uncertainty determinations.

7 Software tools and the Integral Data Center

The INTEGRAL Science Data Center (Courvoisier et al. 2003) provides the basic infrastructure for science analysis, i.e. an organized archive of all data, and the associated software tools to prepare, execute, and view above data analysis steps. The ISDC infrastructure was prepared in a most instrument-independent way, instrument-specific algorithms were isolated in "ISSW'' modules ("instrument-specific software''). Backbones of the ISDC analysis software system are the CFITSIO data access routines and the FTOOLS modular executable concept (HEASARC 2002). Most of the ISDC software tools have been written in the C language to best conform to this package, although some FORTRAN history exists. Figure 2 shows the data flow through the ISDC system from preprocessing to science results, and the major instrument-specific software modules. Standardized analysishas been prepared at ISDC through scripts which perform a pipeline of processing tasks, starting from the pointing set definition, and routinely ending in images and/or point source spectra. Such analysis will adequately address point sources with continuum spectra within the inner field of view. For less well-conditioned analysis problems such as crowded regions, diffuse emission, spectral-feature analyses, and data from variable-background or -temperature time intervals, dedicated analysis must fine-tune the analysis parameters of each of the analysis tools shown in Fig. 2. A graphical user interface to these scripts supports the user's definition of parameters for each of the analysis steps.

Thus, at the ISDC, scientists who wish to study SPI data will find the tools for SPI-specific analysis, embedded into the multi-instrument software and tool system of the ISDC.

Acknowledgements
The characteristics of the instrument were studied by the SPI Team subgroups for instrument testing (SPITOG) and data analysis methods (ISDAG), who collaborated with ISDC's software developers over several years to establish processing and analysis tools; we acknowledge the efforts of all those people. SPI has been completed under the responsibility and leadership of CNES; we are grateful to ASI, CEA, CNES, DLR, ESA, INTA, NASA and OSTC for support.

References



Copyright ESO 2003