FLATFIELD observations are processed with the calcflat command. The input data must be from the same observation and the same subarray. The data are a series of frames in which the current supplied to the internal pixel heaters is varied about a nominal value (see the FITS keyword PIXHEAT). calcflat solves for the optimum heater setting given a list of resistances for each bolometer and a reference resistor value. The list of resistances is mandatory and requires knowledge of the subarray performance. However, a file with suitable default values is included with the installation of SMURF: $STARLINK_DIR/share/smurf/resist.cfg.
The output from processing a FLATFIELD observation is a data file (named automatically if not supplied) which contains the flatfield solution in the NDF extension .MORE.SCUBA2.FLATCAL, the same location as for the raw data. The main data array for this output file is a three-dimensional array containing the reference-subtracted measurements for each heater setting ( ).
In addition to generating the flatfield solution, calcflat can also create a responsivity image for the current subarray. The RESP parameter may be specified to store the responsivity. The responsivity has units of amperes per watt (A/W). Since each observation contains the flatfield, it is possible to extract the responsibity data from any file by using the calcresp command.
If for some reason this flatfield should be applied to existing data files the copyflat command can be used to copy from the file generated by calcflat. This is sometimes useful if a flatfield was accepted by mistake and it needs to be corrected.
SMURF -- the Sub-Millimetre User Reduction Facility