Online material
Appendix A: The PACSman suite for Herschel/PACS spectroscopy data analysis
PACSman^{4} is an IDL package designed to provide an alternative for several reduction and analysis steps performed in HIPE on PACS spectroscopic data. The following operations are currently included: transient correction, line fitting, map projection, and map analysis. All of the observation modes are supported: wavelength switching (now decommissioned), unchopped scan, and chop/nod.
A.1. Transient correction
Transients are cosmic ray hits to the detector that modify the pixel response over a given period of time (see the works of Coulais & Abergel 1999, 2000, for the ISOPHOT and ISOCAM detectors on ISO). Two types of transients are observed in the PACS data, “dippers” that result in a lower pixel response and “faders” that result in a larger pixel response. The response after a dipper hit normalizes after a short time (about the timescale of a line scan), while the response after a fader hit takes considerably longer to settle (near the observation itself or even more). A fader is often seen after the calibration block, which observes a bright source. The transient correction is only necessary for unchopped scan observations since the fast chopping in chop/nod observations allows reliable removal of the transients (dippers and faders).
A.1.1. Faders
Faders are responsible for large jumps in the flux, which can render a spectral pixel useless unless its signal is aligned with the others. HIPE includes a task called specLongTermTransient that minimizes the scatter of points by using a series of exponential functions to model the “faders” transients (Fadda & Jacobson 2011). However, it is possible that several transients overlap in time, which makes it difficult to find the number of exponential functions required and the parameters of each function. This is the main reason we developed a special routine in PACSman that performs the transient correction on the signal timeline for each of the 16 spectral pixels and each of the 25 spaxels.
PACSman includes a correction tool that uses a multiresolution algorithm to straighten the signal (Starck et al. 1999). The smallest resolution scales are subtracted to remove the noise and the largest scale is subtracted to remove any fadertype signal (Fig. A.1). The main advantage of multiresolution over an exponential curve fitting is its ability to remove the signal from several faders that are overlapping in time. Furthermore, it provides an unbiased approach since the faders do not need to be identified beforehand.
Fig. A.1
Example of fader transients occurring in unchopped scan observations. The signal is plotted against the readout number for a given spaxel and spectral pixel. The irregular black curve is the unflagged data, while the flat green curve shows the corrected signal. Several transients are observed in this timeline, including the systematic transient after the calibration block on the extreme left. 

Open with DEXTER 
A.1.2. Dippers
The presence of dippers dominates the S/N in the timeline (thus in the spectra as well). Dippers are searched for after each flagged pixel. An exponential curve is fitted with free parameters. If the timescale parameter is consistent with a dipper signal, the fit is used to correct the signal (Fig. A.2).
Fig. A.2
Example of a dipper fit. The profile is fitted by an exponential curve whose parameters are compared to the expected behavior of a dipper (in particular the timescale). 

Open with DEXTER 
Fig. A.3
Example of a map projection. The observation (3 × 3 raster footprints) is shown with color symbols. The squares show the spaxel center (5 × 5 spaxels for one raster position), the large diamond shows the spaxels (1, 1), and the dots show the center of the subspaxel (1 / 3 of the size of a spaxel). The information from different spaxels and rasters can be combined to populate the projected grid. Subpixels where there is no coverage are shown as gray squares. 

Open with DEXTER 
A.2. Line fitting
The input data for line fitting and map projection (Sect. A.3) is the Level 1 cube reduced with HIPE. At this level of reduction, the data is calibrated in flux and in wavelength. The bad pixels are masked according to the HIPE reduction criteria (outliers, glitches, saturated, noisy, etc.). The data cube contains one spectral window for each of the 25 spaxels and 16 spectral pixels (and for a given raster position when mapping). The HIPE reduction corrects for the flatfielding of the spectral pixels so that the combination of the spectral windows from the 16 spectral pixels provides one spectrum per spaxel. The data cloud for a given spaxel typically contains a few million points (for line spectroscopy).
The line fitting in PACSman is performed on the full data cloud; i.e., the data is not rebinned beforehand. This is to keep all the possible information on the data and on the masks during the line fitting process. The data cloud does not provide propagated errors for the individual measurements. We estimate the error by calculating the dispersion of measurements in a given wavelength bin (defined as 1/5 of the line FWHM). By default, a 5σ clipping is performed prior the line fitting.
Line fitting is then performed with the MPFIT package^{5}. The continuum is adjusted first using spectral windows on each side of the line. The result is then used as an initial guess for the final fit that combines the continuum polynomial and the Gaussian curve. Default constraints exist that can be changed on the line FWHM, line central wavelength, and continuum range around the line. It is essential that constraints exist to provide reliable upper limits in faint lines. For a chop/nod observation, the two nods can either be combined in a single spectrum or considered individually. The fitting is performed as follows: (1) the continuum is fitted first around the line, and (2) the line+continuum profile is fitted using the continuum fit as a first guess. Example of fits are shown in Fig. 3.
A.3. Map projection
For a mapping observation, the raster footprints (5 × 5 spaxel image of the line flux) have to be combined to create the final map. Maps are projected on a subpixel grid with a pixel size three times smaller (linear scale) than the spaxel size. The pixel size is
about 3″. This allows recovering the best spatial resolution possible (see PACS ICC calibration document PICCKLTN038).
The grid orientation is chosen to be orthogonal with the raster maps so that the splitting of the spaxels requires as little rotation as possible. Since the spaxel positions and sizes are not regular, the orthogonality is only approximate. For a given pixel in the projected grid, the contributing fraction of each spaxel in the map is calculated assuming a uniform surface brightness within a spaxel (Fig. A.3). Several determinations are thus obtained for each pixel in the projected grid. The final image simply averages these determinations to obtain one value per pixel.
Fig. A.4
Example of a line cut across the map. The circles on the left image show the aperture used for extraction while the line shows the profile cut. 

Open with DEXTER 
A.4. Map analysis
A tool is provided to analyze the spectral maps. Several tasks can be performed, such as aperture extractions with annulus subtraction (see Figs. A.4). A 2D Gaussian surface can also be fitted to the data to estimate the source spatial FWHM. Finally, spatial profiles can also be plotted along a given cut.
© ESO, 2012