SPIRou Pipeline
Last update: May 2019.

SPIRou science data are automatically processed during the night by a DRS trigger. The raw files (labeled o and r for ramp) are automatically archived at CADC. The processed files are available to the PI in a quicklook directory via a key available on request (one per program id). At the end of the run, the most important files are blended into packages described below. This last step also adds the QSO grades and comments given by the remote observer (RO) and the validation status of each odometer given by the queue coordinator (QC).

From time to time a new version of the DRS appears and files are re-processed and sent again to CADC. The current reduction used v0.4.097. A description of differences among versions will be available later.

This page summarizes the steps of the processing and the content and format of the products.

SPIRou images contain the spectra of three channels: two science channels (called A and B and combined, AB) and one reference channel, labelled C.

-->
Calibrations
Darks and bad pixels from images of the non-illuminated spectrograph, the pipeline generates a master dark 2D image and bad-pixel map
Order localization from flatfield images, the pipeline identifies the precise position of all 49 orders and stores it into "loco" files
Blaze function from flatfield images, the pipeline computes the blaze function of each order and stores it into "blaze" files
Instrumental Profile from Fabry-Perot images, the pipeline modelizes the instrumental profiles, or "shape" of the pseudo-slit, at all locations in the spectrum and stores it into "tilt" and "shape" files
Wavelength Calibration from Fabry-Perot and Hollow-Cathod images, the pipeline produces a wavelength map "wave" for each fiber
Science Observations
e files 2D extracted spectra that use the instrument profile and order localization and performs optimal extraction. There is one extracted spectrum for channels A, B, combined AB, and C; these spectra are respectively saved into different extensions of the e files, each with its proper header. The Blaze function is not removed from these spectra, so that the flux distribution along each order is unchanged. Each extension contains 49 orders of 4088 pixels. The data format is as an image. These are the spectra used for radial-velocity analyses. Extensions 1-4 contain the Flux in AB, A, B, and C. Extensions 5-8 contain the wavelength vectors for AB, A, B, C. Extensions 9-12 contain the Blaze functions for AB, A, B, C.
s files 1D extracted and rebinned spectra, for each channel (AB, A, B, C). The spectrum is corrected from the Blaze function, which provides a first-order continuum subtraction, and overlapping parts in the contiguous orders are merged. There are several versions of the 1D file: they all have wavelength units from 965 to 2500 nm, but one has the flux rebinned in regular wavelength bins, while the other has a constant velocity bin. The information on the wavelength bins is given in the header (see CRVAL1, CDELT1) as well as the "WAVE" column of the binary table. The table for each channel contains about 293000 pixels (NAXIS2). There is also a telluric corrected version (only for the AB fiber). Please note that s files are not yet available at CADC.
p files Polarimetric products are data packages only processed in polarimetric mode, from the combination of 4 consecutive exposures. There are eight extensions, which are: 1) the polarized spectrum in the required Stokes configuration, and 2) its error, 3) the combined Stokes I (intensity) spectrum, and 4) its error, 5) and 6) two different combinations of null spectra used to check the polarized signal (see Donati et al 1997), 7) the wavelength vector for the AB science channel, and 8) the Blaze function for AB (usefule for Stokes I). Each extension contains 49 orders of 4088 pixels in image format.
t files 2D spectra in the same format than e spectra, after the correction of telluric lines has been applied. This correction uses the library of empirical spectra of fast-rotating A stars used as telluric standards and the PCA method to optimally remove the contribution of the Earth atmosphere. Many parts of the spectrum are replaced by NaNs because the telluric absorption in this location is too intense nd correction residuals will be too large. The correction is applied only on the combined AB channel, so there is only one extension of 49 orders times 4088 pixels. The last extension represents the spectrum of the Earth atmosphere which has been used in the correction. This is an advanced product that should be used with caution and can be considered preliminary.
v files The radial velocity of the star is provided in this separate file, which is a fits table. The first 49 vectors are the individual orders, for which the cross-correlation is calculated separately. The last vector is the weighted mean of all orders ("COMBINED"), on which the velocity is modeled and measured. One cross-correlation mask is used per default, corresponding to an M3 spectral type, so it is not optimized for other types of stars. The velocity range of [-100,100] km/s is searched and a step of 1 km/s is used. This is an advanced product that should be used with caution and can be considered preliminary. Please note that at CADC v files are not visible in a search: you must download the e files to get them.
Some keywords explained (in main or in extension headers)
DRS_EOUT Type of exposure configuration (OBJ_FP or OBJ_DARK means there is a star on channels A and B and a Fabry-Perot or Dark on channel C)
TRG_TYPE Type of science exposure: object or sky
EXTNAME Name of the extension (A, B, AB or C)
CRVAL1 value of the first wavelength bin in nm for s files
CDELT1 bin size in nm for the s files (typically 0.005nm)
NAXIS1 number of data points in the s files, per extension
WAVEFILE Name of the relevant wavelength solution file for e, t, and p files
OBJECT Target name
DATE-OBS UT date of the exposure, in the format yyyy-mm-dd
UTC-OBS UT hour corresponding to the start of the exposure in hh:mm:ss.ss
MJD-OBS Modified Julian Date at start of observation
EXPTIME Exposure time in seconds
AIRMASS Airmass
SPOZPMED Median of zero point absorption from SkyProbe during the exposure (optical band, in magnitude)
SGCSEE Seeing measured during acquisition (not always) (")
SGSSEE Seeing estimated on guide images with star in the hole (")
SBRHB1_P Rhomb position in drawer 1
SBRHB2_P Rhomb position in drawer 2
SNR34 S/N per pixel in DRS order 34 (1.65mic)
SPEMSNR S/N at 1.65mic measured by the exposuremeter at the end of the exposure
SGCMAGN Magnitude estimated on the guide images with star in the hole
BJD Barycentric Julian Date (in processed files)
BERV Barycentric Earth Radial Velocity (km/s)
CCFRV Raw Stellar Radial Velocity in channel AB (km/s)
WFPDRIFT Drift of the input Fabry-Perot with respect to the FP mask (computed by cal_WAVE) (km/s)
RVDRIFT Drift between the wavelength solution and the stellar spectrum (computed by cal_CCF) (km/s)
CCFRVC Stellar Radial Velocity on channel AB, corrected from the instrumental drift (km/s)
CCFFWHM Full width half maximum of stellar cross correlation function on channel AB (km/s)
CCFCONT Contrast of stellar cross correlation function on channel AB
CCFLINE Number of lines used in the cross correlation with the stellar mask (for AB fibers) or the FP mask (for C fiber)
DVRMS RV photon noise uncertainty on the stellar spectrum (for AB fibers) or the FP spectrum (for C fiber) (computed by cal_CCF)