4.5. Level 2

The level 2 pipeline attempts to remove the remaining effects due to the Observatory and the observing mode. It is expected that these steps will need to be repeated to improve upon the default settings and/or that undesirable features such as standing waves or spurs will need to be removed.

Level 2 pipeline flow diagram

Figure 4.4. Level 2 pipeline flow diagram


DoCleanUp. 

This step removes all data from the timeline product that are of not of type 'science' (sds_type) and that correspond to 'ON' measurements. Furthermore, science datasets that belong to the same LO tuning group and/or the same raster point and/or the same scan line number are merged to form new datasets.

DoAntennaTemp. 

This step corrects for all telescope dependent parameters except the coupling of the antenna to the source brightness distribution, i.e. it translates to a T*_A (T_A-star) scale where T*_A = T'_A/eta_l with forward efficiency eta_l.

MkSidebandGain. 

This step provides the sideband gains coefficients dependent on detector band, sideband, LOF-scale and IF-scale. These coefficients will subsequently be applied in the DoSidebandGain-task. In you want to work with only the default coefficients 0.5, you can skip this task and call DoSidebandGain without passing a coefficents via the cal task parameter.

DoSidebandGain. 

Divides the flux (at this stage typically an intensity) by the sideband-specific, detector-band specific, LOF- and and IF-dependent gain coefficients. The gains applied to the data are written to the metadata of the level 2 spectra and are denoted by usbGain and lsbGain for the upper and lower sidebands, respectively.

[Note] Intensity scales

HIFI is a double sideband (DSB) instrument. In consequence, application of sideband gains mean that the detected lines are calibrated to single sideband (SSB) scale, while the continuum contains contribution from both sidebands and remains at the DSB scale. If the gains are unity then the continuum is at twice the SSB scale. Beware, however, that the introduction of sideband gain coefficients at the low frequency end of band 2a mean that is not the case there.

ConvertFrequencyTask. 

In this step of the pipeline, the spectra are transformed from the IF frequency scale to sideband frequencies. For detector bands 1-5 this is defined by:

f_usb = f_LO + f_IF and f_lsb = f_LO - f_IF

For bands 6 and 7, it is:

f_usb = f_LO + CF - f_IF and f_lsb = f_LO = CF + f_IF

where the conversion factor CF is given by 10.4047 GHz for horizontal and 10.4032 GHz for vertical polarisation.

At the same time, the units are changed from MHz to GHz.

This step is not a dedicated pipeline step and is also provided for use in interactive analysis so that data can be transfored to different scales, including the velocity scale.

MkFreqGrid. 

This step creates a linear frequency grid that can be used by the DoFreqGrid task to resample the spectra to. By default, the width between successive gridpoints is set to 0.5 MHz for WBS data, while for HRS data it is determined by inspecting the input spectra.

DoFreqGrid. 

Resamples the all HIFI spectra to the frequency grid specified as input task parameter. By default, the grid determined in the MkFreqGrid step is used. The resampling scheme is set as a trapezoidal integration scheme in combination with a linear interpolation scheme. By default the flux values in the output grid are resampled using an Euler scheme.

DoGridding. 

The doGridding task is used to create cubes for all mapping mode data and is fully described in Chapter 12. By default, the pipeline assumes a half beam pixel size so if you requested a different beam spacing you will need to re-run the doGridding task with an appropriate beam size.It is expected that you will in any case need to re-run the doGridding task after standing waves have been removed and any baseline issues corrected.

DoAverage. 

Computes the average over different scans that belong to the same LO tuning group (frequency surveys), the same raster column and row (in raster maps), or the same line number in OTF maps. Furthermore, science data from ON or OFF are not mixed. Various different options for how to do the average and for pre-selecting the scans to be averaged are available but the default in the standard pipeline is to return a single dataset for each of the conditions described above.