## 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 ALIGN_SIDE_BAND Whether or not to combine sidebands in makecube. 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 Comma-separated list of velocity resolutions to rebin the final spectral cube. The rebinned cubes are in addition to the full-resolution cube. The last can be compressed too (cf. VELOCITY_BIN_FACTOR). 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. VELOCITY_BIN_FACTOR Average contiguous sets of velocity channels by this integer factor, each forming one channel in the reduced output. This compression is intended for the high-resolution ACSIS modes, to save significant storage and processing time, but it also yields better baseline subtraction.
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_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_METHOD Source of the baseline region. Currently only auto is recognised. This requests the automated mode where the emission is detected and masked before baseline fitting. Otherwise BASELINE_EDGES or BASELINE_REGIONS (q.v.) will be used. BASELINE_NUMBIN The number of channels to which the spectral axis is compressed for automated masking of emission when BASELINE_METHOD=auto. BASELINE_ORDER The polynomial order to use when baselining cubes. 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 (see BASELINE_METHOD).

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$-1$, 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.

 Parameter Description CALCULATE_STANDARD_ALWAYS If set true (1), this will ensure that the log.standard file will be created even if the source, molecule, and transition combination is not present in the list of known standard sources. This will affect most non-continuum heterodyne recipes. NOSIDEBANDCORR If set to 1, this will prevent any sideband-calibration correction factor from being applied to the data. SIDEBAND Set the sideband (e.g. USB or LSB) to use when applying the sideband correction. By default the system will use the sideband of the observation, but this recipe parameter can override that default if you are interested in a line in the image sideband. SIDEBAND_CORR_FACTOR This allows you to override the sideband-correction factor chosen from the calibration system and provide your own. The data will be multiplied by the value you provide, so you must ensure it is appropriate for the given sideband and LO frequency of your data. The factor should be supplied in floating point.
Table G.11: The recipe parameters associated with calibration of the data. The sideband-ratio-correction recipe parameters are used for controlling the sideband correction, and are currently only available for instrument RxA3M. These corrections do not affect reductions done with REDUCE_SCIENCE_CONTINUUM, but will be used in all other RxA3M science reductions, and in the Picard recipe CALIBRATE_SIDEBAND_RATIO. The CALCULATE_STANDARD_ALWAYS flag will also affect the non-continuum recipes.

 Parameter Description SUBTRACT_REF_EMISSION If true, the recipe will attempt to locate and remove reference (off-position) signal that appears as absorption lines. REF_EMISSION_BOXSIZE The width (in channels) of the largest reference-spectrum line expected, used to find the background before finding spectral lines. If no value is supplied, an iterative approach determines the largest line width. REF_EMISSION_COMBINE_DETECTORS If true, combine all detectors to form the reference spectrum. While it can improve the signal to noise, receptors are strictly viewing slightly different locations and hence each receptor’s reference spectrum will be different. REF_EMISSION_COMBINE_REFPOS Whether to combine observations by their reference position (1), or by observation date (0). REF_EMISSION_MASK_SOURCE This controls the use of the mask of source emission already detected for baseline estimation. There are pros and cons both using the mask (1) or not using it (0). The final option, Both, attempts to combine the benefits of both methods: the masked spectrum locates the lines, but the unmasked modal spectrum determine the line strengths. REF_EMISSION_REGIONS Instead of automated identification of absorption lines, supply a comma-separated list of line extents ($v$1:$v$2). These regions are masked and interpolated, the background determined and subtracted from the unmasked representative spectrum to form an approximation to the reference spectrum. SUBTRACT_REF_SPECTRUM If true, the recipe will interpolate across the extents of reference (off-position) lines that you specify, applied to each (reference position or date and/or detector) median spectrum to estimate the respective reference spectrum. REF_SPECTRUM_COMBINE_DETECTORS If true, combine all detectors to form the reference spectrum. While it can improve the signal to noise, receptors are strictly viewing slightly different locations and hence each receptor’s reference spectrum will be different. REF_SPECTRUM_COMBINE_REFPOS Whether to combine observations by their reference position (1), or by observation date (0). REF_SPECTRUM_FILE An estimated reference spectrum in absorption, with other values set to zero, to remove reference lines that other methods fail to excise. REF_SPECTRUM_REGIONS A comma-separated list of line extents ($v$2:$v$2) of the locations of absorptions lines to excise.
Table G.12: The recipe parameters associated with the filtering of reference-spectrum absorption-line artefacts, either automatically or specified manually. These methods are still experimental, although the manual identication is more reliable for known lines. Therefore these parameters are currently available only in the REDUCE_SCIENCE_NARROWLINE recipe.