## Appendix GClassified Recipe Parameters

The recipes REDUCE_SCIENCE_NARROWLINE, REDUCE_SCIENCE_GRADIENT, REDUCE_SCIENCE_LINEFOREST, and REDUCE_SCIENCE_BROADLINE support the following parameters, except where noted. Recipe parameters should be supplied in an external file and called by the command line option -recpars <params.ini>. For an example recipe-parameter file see Section 6.2.

The parameters are classified for easier identification.

 Parameter Description CLUMP_METHOD Method for identifying emission clumps: Clumpfind, Fellwalker, or Thresh. CUBE_WCS The co-ordinate system in which to regrid cubes. FINAL_LOWER_VELOCITY Lower velocity limit for all the cube products. FINAL_UPPER_VELOCITY Upper velocity limit for all the cube products. ITERATIONS Number of iterations. Further iterations refine the identification of emission to exclude from baseline subtraction. One iteration is usually sufficient. PIXEL_SCALE The pixel scale, in arcseconds, of cubes. REBIN List of velocity resolutions to rebin the final cube to. SPREAD_FWHM_OR_ZERO Depending on the spreading method, this parameter controls the number of arcseconds at which the envelope of the spreading function goes to zero, or the full-width at half-maximum for the Gaussian envelope. SPREAD_METHOD The method to use when spreading each input pixel between a group of neighbouring output pixels when regridding cubes. SPREAD_WIDTH The number of arcseconds on either side of the output position which receive contributions from the input pixel.
Table G.1: The recipe parameters used to define the properties of the recipe products.

 Parameter Description FRACTION_BAD The maximum fraction of bad values permitted in a receptor (or receptor’s subband for a hybrid observation) permitted before the a receptor is deemed to be bad. RESTRICT_LOWER_VELOCITY Trims all data to this lower velocity, not just at the end for the products. RESTRICT_UPPER_VELOCITY Trims all data to this upper velocity, not just at the end for the products. TRIM_MINIMUM_OVERLAP The minimum number of desired channels that should overlap after trimming hybrid-mode observations. TRIM_PERCENTAGE The percentage of the total frequency range to trim from either end. This parameter only takes effect if both TRIM_PERCENTAGE_LOWER and TRIM_PERCENTAGE_UPPER are undefined. TRIM_PERCENTAGE_LOWER The percentage of the total frequency range to trim from the lower end of the frequency range. TRIM_PERCENTAGE_UPPER The percentage of the total frequency range to trim from the higher end of the frequency range.
Table G.2: The recipe parameters used to exclude areas of noisy spectrum or bad receptors.

 Parameter Description BASELINE_ORDER The polynomial order to use when baselining cubes. BASELINE_EDGES Percentage of the full range to fit on either edge of the spectra for baselining purposes. If set to a non-positive value and BASELINE_REGIONS is undefined, then the baseline is derived after smoothing and automatic emission detection. If assigned a negative value, BASELINE_REGIONS, if it is defined, will be used instead to specify where to determine the baseline. BASELINE_REGIONS A comma-separated list of velocity ranges each in the format $v1:v2$, from where the baseline should be estimated. It is countermanded should BASELINE_EDGES be positive. These can also be used to define where to test baseline linearity if BASELINE_LINEARITY_LINEWIDTH is set to "base". FREQUENCY_SMOOTH The number of channels to smooth in the frequency axis when smoothing to determine baselines. This number should be small ($\sim$10) for narrow-line observations and large ($\sim$25) for broad-line observations. SPATIAL_SMOOTH The number of pixels to smooth in both spatial axes when smoothing to determine baselines.
Table G.3: The recipe parameters to control how baselines are determined and fit.

There are a number of ways to define the baseline regions:

• as a percentage of the spectrum width at either end of the spectrum (see BASELINE_EDGES);
• as a set of velocity ranges expected or known to be free of emission lines (see BASELINE_REGIONS); or if both of these arguments of corresponding recipe parameters is undefined,
• use the whole spectrum smoothing spectrally and spatially (see FREQUENCY_SMOOTH and SPATIAL_SMOOTH) with feature detection to mask lines.

The first two are suitable for broadline emission. The second is desirable in the presence of many lines. The third is the default and most appropriate for a single narrow line.

 Parameter Description LV_IMAGE Permits creation of a longitude-velocity map via primitive _CREATE_LV_IMAGE_ LV_AXIS Specify the axis to collapse in the creation of the longitude-velocity map. LV_ESTIMATOR Specify the collapse statistic in the creation of the longitude-velocity map. CREATE_MOMENTS_USING_SNR If set to true (1), moments maps will be created using a signal-to-noise map to find emission regions. This is useful when observations were taken under differing sky conditions and have different noise levels. MOMENTS Comma separated list of the moments maps to create (integ,iwc). MOMENTS_LOWER_VELOCITY The lower velocity range from which the moments maps will be created. MOMENTS_UPPER_VELOCITY The upper velocity range from which the moments maps will be created.
Table G.4: The recipe parameters used to specify moments and longitude-velocity products.

 Parameter Description FLATFIELD Whether or not to perform flat-fielding. FLAT_APPLY Whether or not to apply the calculated flatfield. If set false the ratios are still calculated and logged. FLAT_METHOD Flatfield option to ratio voxel by voxel. FLAT_LOWER Sets the lower limit by which to restrict the velocity range where there is astronomical signal for FLAT_METHOD. FLAT_UPPER Sets the upper limit by which to restrict the velocity range where there is astronomical signal for FLAT_METHOD. MINSNR Allow selection of higher signal-to-noise voxels for FLAT_METHOD.
Table G.5: The recipe parameters associated flat fielding.

 Parameter Description DESPIKE Whether or not to perform despiking. DESPIKE_BOX The size, in pixels, of the box used to both find the "background" and for cleaning spikes. DESPIKE_CLIP The clip standard deviations to use when finding spikes in the background-subtracted RMS spectrum. DESPIKE_PER_DETECTOR If a spike is not seen in all detectors, consider setting this value to 1.
Table G.6: The recipe parameters associated removal of noise spikes.

 Parameter Description CHUNKSIZE Maximum sized chunk used for the group cube. CUBE_MAXSIZE Controls the maximum size of the reduced cube. TILE A true value (1) performs tiling of the cube to restrict the memory requirements. Such tiled cubes abut each other in pixel co-ordinates and may be pasted together to form the complete spectral cube.
Table G.7: The recipe parameters used to limit computer memory requirements for large datasets or observation fields of view.

 Parameter Description HIGHFREQ_INTERFERENCE If set to true (1) the spectra for each receptor are analysed to detect high-frequency interference noise, and those spectra deemed too noisy are excluded from the reduced products. HIGHFREQ_INTERFERENCE_EDGE_CLIP Used to reject spectra with high-frequency noise. It is the standard deviation to clip the summed-edginess profile iteratively in order to measure the mean and standard deviation of the profile unaffected by bad spectra. HIGHFREQ_INTERFERENCE_THRESH_CLIP Used to reject spectra with high-frequency noise. This is the number of standard deviations at which to threshold the noise profile above its median level. HIGHFREQ_RINGING Whether or not to test for high-frequency ringing in the spectra. This is where a band of spectra in the time series have the same oscillation frequency and origin with smoothly varying amplitude over time. HIGHFREQ_RINGING_MIN_SPECTRA Minimum number of good spectra for ringing filtering to be attempted (see HIGHFREQ_RINGING). The filter needs to be able to discriminate between the normal unaffected spectra from those with ringing. The value should be at least a few times larger than the number of affected spectra.
Table G.8: The recipe parameters associated exclusion of spectra affected by high-frequency noise.

 Parameter Description LOWFREQ_INTERFERENCE If set to true (1) the spectra for each receptor are analysed to detect low-frequency local interference ripples or bad baselines, and those spectra deemed too deviant from linearity are excluded from the reduced products. LOWFREQ_INTERFERENCE_EDGE_CLIP Used to reject spectra with low-frequency interference. It is the standard deviation to clip the profile of summed-deviations from linearity iteratively in order to measure the mean and standard deviation of the profile unaffected by bad spectra. A comma-separated list will perform iterative sigma clipping of outliers, but standard deviations in the list should not decrease. LOWFREQ_INTERFERENCE_MAX_THRESHOLD Spectra are deemed to be non-linear if their non-linearity exceeds this threshold. LOWFREQ_INTERFERENCE_MIN_THRESHOLD No spectra with non-linearity below this threshold will be rejected. LOWFREQ_INTERFERENCE_THRESH_CLIP Used to reject spectra with low-frequency interference. This is the number of standard deviations at which to threshold the non-linearity profile above its median level.
Table G.9: The recipe parameters associated exclusion of spectra affected by non-linear baselines. These are for short periods during an observation where some external signal has affected the baselines. If most or whole of an observtion might be affected see BASELINE_LINEARITY and related parameters below. These parameters are not available in the REDUCE_SCIENCE_BROADLINE recipe.

 Parameter Description BASELINE_LINEARITY If set to true, receptors with mostly or all non-linear baselines are excluded from the reduced products. BASELINE_LINEARITY_CLIP This is used to reject receptors that have non-linear baselines. It is the maximum number of standard deviations above the median rms deviations for which a detector’s non-linearity is regarded as acceptable. BASELINE_LINEARITY_LINEWIDTH This is used to reject receptors that have non-linear baselines. It is the extent of the source spectral line measured in km/s, which is excluded from the non-linearity tests. BASELINE_LINEARITY_MINRMS This is used to retain receptors that have noisy or slightly non-linear baselines, or transient bad baselines (cf. LOWFREQ_INTERFERENCE). The parameter is the minimum rms deviation from linearity, measured in antenna temperature, for a receptor to be flagged as bad. BASELINE_LINEARITY_SCALELENGTH This is used to reject receptors that have non-linear baselines. It is the smoothing scale length in whole pixels. Features narrower than this are filtered out during the background-level determination. It should be should be odd and sufficiently large to remove the noise while not removing the low-frequency patterns in the spectra.
Table G.10: The recipe parameters associated exclusion of receptors affected by non-linear baselines throughout or most of an observation. The parameters are not available in the REDUCE_SCIENCE_BROADLINE recipe.