Calib: Correct method name in documentation.
heterodyne: Protect against short time series.

FIXSTEPS needs at least twice as many samples as the fit box width.
heterodyne: Add three recipe parameters related to receptor gain correction.
heteordyne: Introduce a new gain-correction primitive.

This is another step towards a robust flat-field determination. It
compares voxel by voxel against the reference receptor rather than
assume matching coverage for each receptor.  It should compare with at
least the central four receptors to give complete coverage or to allow
for a rejected reference receptor.
heteordyne: Check for a valid reference receptor.

Continuing the earlier fudge until the reason why bad_receptors_qa
fails to return the QA masked receptors is resolved.
SCUBA2: use noise tag rather than uhdr flag
SCUBA2: check for badpeak tag before continuing

If the tag "badpeak" exists for the current Frame then the file has
bad values at the peak. In this case unset all of the process control
flags and let the primitive run as a no-op. The values stored in the
primitive hash will therefore be undefined so calling primitives
should check before attempting to use them (but they should be doing
this anyway).
SCUBA2: not having enough points to find the focus position should be an error

If the pipeline detects that the focus cube has bad values at the
relevant peak positions, then the JOS is likely to come to the same
conclusion. Therefore issue an error rather than a warning because it
may indicate a problem with the data.
SCUBA2: use product to determine when to find beam size

Checking for the existence of a tag can lead to the beam-size
calculation running in fastramp sequences. This shouldn't be a
problem, but the pipeline will be repeating itself for no good reason.
SCUBA2: define a flag to indicate no focus cube exists

It's not enough to check for the non-existence of a group product as
evidence for no cube (the product will be defined for planet
observations). In addition, check that if the product is defined, it
is not equal to the "focus_cube" product.
SCUBA2: calibrators aren't usually thought of as "weak"

The error message reported when a calibration source cannot be
detected suggests that it's because the source is too weak. In
reality, a non-detection is a result of observing in poor weather, and
thus attributable to a high noise level. The updated error message
reflects this change of perspective.
SCUBA2: estimate RMS of FTS-2 ZPD measurements.

FIT1D needs to be given a reasonable estimate of the RMS
of the data.  Therefore updated the baseline method to remove
a first order fit, and calculated statistics on one of the
baseline regions.
SCUBA2: invert s4b and s8d ZPD interferograms.
SCUBA2: add option to fit smoothed ZPD data.

Added an option ESTIMATE to _FIT_INTERFEROGRAM_PEAK_ which
controls how the initial estimate of the ZPD position should
be found.  With the new 'smooth' option, it smooths
the interferogram and fits a Gaussian to the whole thing
and uses its position as the estimate of the ZPD fringe.
SCUBA2: remove stray debugging code
SCUBA2: ensure the subarray is set in the uhdr

If the QA assessment fails because the subarray has no bolometers,
then the SUBARRAY entry to be stored in the index file is undef. Set
it in the uhdr to ensure it is always present.
SCUBA2: set the product to NOISE

Setting a tag isn't always enough.

Also clarify the use of the initial results hash by renaming it to
avoid duplicate names (%results was used twice).