5.3. Spectroscopy

Here we describe the standalone browse products created by SPG 13 and higher. You can also create these products in HIPE yourself—this is explained in a PACS Useful script in the Scripts menu of HIPE Scripts→PACS useful scripts→Spectroscopy: Re-create the standalone browse products.

For unchopped range scan observations for which a Level 2.5 is provided, the SBPs include the Level 2.5 products (the "background subtracted" versions) and the Level 2 products (i.e. the background subtracted products and those taken from the on-source observation only, which still have the flux from the telescope background spectrum).

5.3.1. The postcards

The postcards are intended to give the astronomer a quick indication of the data in the observations. You will find one spectrum and one cube image per wavelength range that was requested in the observation. The postcards can be seen in the upper part of the summary tab when you view an observation with the Observation viewer in HIPE. They are also found in the browseImageProduct entry of an observation, and also seen in the HSA search result pages. They can be saved as jpeg files from the HSA.

The spectrum in the spectroscopy postcard is taken from the rebinned cubes, which have spaxels of 9.4" (the native spaxel size). The spectrum shown is taken from what is found to be the brightest spaxel for pointed observations, and from the central spaxel of the brightest cube for mapping observations. The wavelength of the image is the central wavelength, unless that cut has many NaNs in it (possible if the spectral sampling is poor) in which case the nearest NaN-clear wavelength is taken. The units are Jy/spaxel. The image is taken from the drizzled cubes, if there is one, otherwise the projected cubes. For mapping observations the flux unit is MJy/sr, and for pointed observations it is Jy/[9.4" spaxel]. For pointed observations, the spaxels of the projected cube are 0.5", but to have the fluxes of the spectrum and image match, the fluxes in the image have been scaled up to an 9.4"x9.4" area (i.e. one native spaxel).

5.3.2. Equidistant cubes

The pipeline-produced cubes from PACS do not have a wavelength grid that is equidistant, i.e. the bins-sizes of the spectral grid are not equal at every wavelength, but rather they scale with resolution, which in turn scales with wavelength. This was done so that even for spectra which cover the entire SED of PACS (50—220μm) a Nyquist (or better) spectral sampling is achieved at all wavelengths. This means that the spectral grid is not defined via the third axis of the World Coordinate System (WCS), i.e. we do not have values for the reference wavelength and dispersion in axis 3. Instead, the wavelength grid is contained as a dataset in the cubes. Unfortunately, this can make it cumbersome to load PACS cubes into software other than HIPE and for their spectral grid to be immediately recognised. To combat this, we have created cubes with an equidistant wavelength grid.

  • For Nyquist and oversampled mapping lineScan observations: from the red and blue drizzled cubes (HPS3DEQD[R|B], or HPS3DEQDBS[R|B] for the Level 2.5 version)

  • For Nyquist and oversampled mapping rangeScan observations: from the red and blue projected cubes (HPS3DEQP[R|B] or HPS3DEQPBS[R|B] for the Level 2.5 version)

  • For all other observations (pointed and undersampled mapping, line and rangeScan): from the red and blue interpolated cubes (HPS3DEQI[R|B] or HPS3DEQIBS[R|B] for the Level 2.5 version)

(See Section 2.3.3 for details on the types of mapping modes.) The equidistant cubes are created with the task "specRegridWavelength". The task takes an input wavelength grid that has evenly spaced bins (i.e., "equidistant"), and re-samples all the datasets (image, error, ...) on this new grid. The new cube then has an equidistant spectral grid, and the spatial and spectral information is held in the WCS component of the cube:

# For a Level 2 standard interpolated cube (HPS3DI[R|B]) 
HIPE> print cube.wcs 
World Coordinate System
-----------------------
naxis  : 3
naxis3 : 142
naxis1 : 15
naxis2 : 15
crpix1 : 1.0
crpix2 : 1.0
crval1 : 221.29708839108744
crval2 : -20.879270056738726
cdelt1 : -0.001305555555556
cdelt2 : 0.001305555555556
ctype1 : RA---TAN
ctype2 : DEC--TAN
cunit1 : deg
cunit2 : deg
ctype3 : WAVE-TAB
cunit3 : um
cdesc3 : Wavelength

HIPE> print cube.getWcs().getCdelt1()*3600 # spaxel size in arcsec
HIPE> print cube.getWcs().getCdelt3()      # wavelength grid bin size
 herschel.ia.dataset.image.wcs.WcsException: The cdelt3 keyword is not available

# For the Level 2 equidistant interpolated cube
HIPE> print eqcube.wcs 
World Coordinate System
-----------------------
naxis  : 3
naxis1 : 15
naxis2 : 15
crpix1 : 1.0
crpix2 : 1.0
crval1 : 221.29708839108744
crval2 : -20.879270056738726
cdelt1 : -0.001305555555556
cdelt2 : 0.001305555555556
ctype1 : RA---TAN
ctype2 : DEC--TAN
cunit1 : degree
cunit2 : degree
naxis3 : 406
crpix3 : 1.0
crval3 : 79.4005558677062
cdelt3 : 0.003359694455696
cunit3 : um
ctype3 : Wavelength

HIPE> print eqcube.getWcs().getCdelt1()*3600
HIPE> print eqcube.getWcs().getCdelt3() 
 0.0033596944557

External software such as ds9 will be able to not only recognise these cubes as 3D products—this should, in fact, be the case for all the cubes PACS produces—but will also display the spectra with the correct wavelength information. The non-equidistant cubes can also be read into other software, but because the wavelength grid is not evenly spaced and is instead held in an ImageIndex extension in the FITS files, it may requires extra steps to display the correct spectral information.

Added in 14.2: the third dimension of the WCS of all non-equidistant cubes was changed so that the "ctype3" is now "WAVE-TAB". This is a FITS standard keyword for spectra with non-equidistant spectral axes, where the spectral axis information is provided in a look-up table: in the PACS cubes it is provided in a dataset called "wcs-tab" and a FITS extension with the same name. Some software can deal with this FITS standard. The dataset/extension "wcs-tab" is in fact present also in the equidistant cubes, but as the ctype3 is just "Wavelength" this lookup table is not necessary (it is, however, filled with the correct wavelengths, those from the equidistant cube rather than its parent cube).

The bin size of the equidistant grid is chosen as a fraction of the smallest bin in the originating cube. All of the datasets of the originating cubes are interpolated from the old grid to the new grid. For the flux array it was decided to chose a bin size to minimise the change in the spectral appearance by the interpolation: a small bin size allows the "new" fluxes to follow the "old" fluxes very well. In the PDRG chp. 7 a comparison between the spectra of the equidistant cubes and their "parent" cubes for various fractional bin sizes is shown. Tests show that for lineScans and ranges of a few microns a good match between the old and the new spectra can be achieved with a fractional bin size of 0.35 times the smallest bin of the originating cube's grid, even for spectra crowded with lines. For long ranges and SEDs, the standard wavelength grid varies with dispersion, which varies with wavelength. Hence, the best fractional bin size will not be the same at different wavelengths. In the SPG pipeline we have chosen to use a fractional bin size also of 0.35 as this provides a good compromise and produces well-matched spectra for most cases. Before doing science on these equidistant cubes, you should check this value also works well for your data: spectra that are more crowded and with blended lines, or SEDs where the important lines lie in the spectral regions with the greatest difference between the standard and the equidistant bin sizes, may require different bin sizes. If the user wishes to create their own equidistant cubes with different bin sizes, there is a HIPE script to show how to do this: Scripts→PACS useful scripts→Spectroscopy: Re-create the standalone browse products.

5.3.3. Rebinned cube tables

The rebinned cubes are one of the recommended science-end product for single pointed observations, and especially for those of point sources. However, these cubes have neither an equidistant spectral nor equidistant spatial grid. Their sky footprint is that of the instrument, i.e. spaxels of 9.4" size, in a slightly irregular 5x5 grid (see the PDRG chp. 9 for more detail). Because these rebinned cubes can be less than straightforward to read into other software—which usually expect cubes to be equidistant along all axes—we have provided the same data in a table format. For each wavelength range in the observation, and for each camera separately, all the spectra of all spaxels for all raster positions are included in a single table. The collection of tables are held in a context of class SlicedPacsSpecTable, called HPSTB[R|B], which can be found at Level 2, or HPSTBBS[R|B] from Level 2.5).

To see these tables in HIPE, open the Observation viewer on your observation (double-click on the observation in the Variables panel), and go to the Data panel. Click on +level2 (or +level2.5 if there is one) and then on +HPSTBR, and then click on the +# of any one of the tables, e.g. +0 (which will also have text similar to "0 L1 N1 R(0 0)"—this text is explained in Chapter 2), and then finally on the "Spectra" to see the data in the table:

In Section 3.2.3 the organisation of the data in the rebinned cube table is explained in more detail.

5.3.4. Spectrum tables

A new product created in Track 14 is the spectrum table: HPSSPEC[R|B] from Level 2 or HPSSPECBS[R|B] from Level 2.5, and both also present in the browseProduct location in an observation. For all pointed observations, the pipeline task extractCentralSpectrum (see chp. 8 of the PDRG) is applied to each Level 2/2.5 rebinned cube, and one or two of the point-source calibrated spectra it creates are converted into a tabular format: wavelength, flux, and error. The spectra taken are: that based on the central spaxel ("c1" as used in the pipeline scripts), that taken from the central 3x3 spaxels ("c9"), and that from the central spaxel but scaled wrt the spectrum of central nine spaxels ("c129"). All three are provided for chop-nod observations, c129 is not provided for unchopped observations as it is inappropriate for this AOT. The unit of the point source spectra is Jy. Additionally the spectrum taken from the central spaxel is added to the table (wavelength, flux, error), and that has units of Jy/pixel[spaxel]. The column titles indicate what is contained therein and the fluxes. See Section 3.2.3 for more detail on the columns of data in this product.

It is important to note that no assumption is made that the target in the observation is a point source, nor that it is located in the central spaxel, both of which are preconditions for the output of this task to be useful. It is up to the end-user to determine if these are the case.

For all the pointed chopNod observations that were taken in SED mode—where two or three observations were taken to cover the entire PACS spectral range—the red and blue spectrum tables of Level 2 are combined into a single table, and moreover, the tables of each obsid that was taken to cover the SED are added in. This super-combined table is placed in Level 3 (of each obsid that contributed to the table). It is called HPSSPEC in the SPG-processed ObservationContext at Level 3 and in the browseProduct level. For these tables, the "band" and "segment" column become useful ways of telling which observation, camera, and band, each spectrum in the table came from. In the meta data of this table, you will see some data with the text "Seg###" appended. These meta data are for each of the segment numbers: so you can tell what obsid, proposal, date, etc, each segment came from.