### REDUCE_SONS

Process data for the SONS project

#### Description:

This is the recipe for processing data taken for the SCUBA-2 Survey of Nearby Stars (SONS).

This recipe processes SCAN data, making a map from files that meet a given noise criterion, and uses a jack-knife method to remove residual low-spatial frequency noise and create an optimal matched-filtered output map. The recipe proceeds as follows:

• The noise properties for each 30-second subscan are calculated, and those files which exceed 1.5 times the mean are excluded from the map-making stage.

• Each observation is processed twice using the specified parameters, the second time with an artificial point source added to the timeseries, to create a signal map and an effective PSF image.

• These images are coadded (like with like) to produce a total signal map and a total effective PSF image. The amplitude of the source in the effective PSF image is compared with the input value to assess the effect the map-making process has on a point source. This ratio is used to scale the FCF later when calibrating the data.

• The observations are divided into two groups which are coadded separately. These coadds are subtracted from one another to create the jack-knife map.

• The angular power spectrum of the jack-knife map (which should consist purely of noise) is calculated and used to remove residual low-spatial frequency noise from the signal map and the effective PSF. This is the so-called whitening step (because it produces a map which has a noise power spectrum that is white).

• The data are calibrated in mJy/beam using a corrected FCF.

• The whitened signal map is processed with a matched filter using the whitened PSF image as the PSF.

• The jack-knife map is also whitened and processed with the matched filter. This map should consist purely of noise.

• Signal-to-noise ratio maps are created for the filtered versions of the signal map and the jack-knife map.

The outcome (the match-filtered whitened signal map) should be the optimal map with white noise properties. This is the map to be used for science goals.

This recipe generates a large number of output files. There will be two for each observation (the signal map and the effective PSF map), a total signal coadd, an effective PSF coadded from all the individual effective PSF maps, a jackknife map, a whitened signal map, a calibrated whitened signal map, a matched-filtered calibrated whitened signal map and a signal-to-noise ratio map created from it.

#### Notes:

• This recipe should only be given data for a single source, and a single field.

• An even number of observations will be used to create the jack-knife map.

• Alternative configuration parameters for the iterative map-maker may be specified using the recipe parameters outlined below.

• This recipe may be called via the shorter name FAINT_POINT_SOURCES_JACKKNIFE.

• For large amounts of data this recipe will spend a long time not updating the ORAC-DR window. Check to see that makemap is still processing by running top or ps. (Running with -log sf is recommended.)

#### Available Parameters :

##### FAKEMAP_CONSTSNR
A flag to scale the gaussian in amplitude by the square-root of the number of maps to be created by the recipe so that the signal-to-noise ratio of the final map-filtered PSF is independent of the number of observations. Default is 1.
##### FAKEMAP_FWHM
FWHM (in arcsec) of a gaussian to add to the timeseries. Default is to use the appropriate telescope main beam FWHM.
##### FAKEMAP_OFFSET
The offsets (in arcsec) to apply to the fake source added to the timeseries. If one value is given, it will be used for both axes. Default is to apply no shift.
##### FAKEMAP_SCALE
Amplitude of the fake source (in Jy/beam) added to the timeseries to assess the map-making response to a point source. Default is 10/50 Jy/beam at 850/450 um respectively.
##### MAKEMAP_CONFIG
Name of a config file for use with the SMURF makemap task. The file must exist in the current working directory, $MAKEMAP_CONFIG_DIR,$ORAC_DATA_OUT, $ORAC_DATA_CAL or$STARLINK_DIR/share/smurf.
##### MAKEMAP_PIXSIZE
Pixel size in arcsec for the output map. Default is wavelength dependent (4 arcsec at 850 um, 2 arcsec at 450 um). Note that the timeseries will be downsampled to match this scale during the map-making process.
##### PSF_BOX
Size of square region (in pixels) use to define effective PSF.
##### SUBSCAN_ESTIMATOR
Estimator for calculating the noise properties of each subscan. Supported values are WTNEP (not for METHOD=MAP), MEAN, MEDIAN and SIGMA (METHOD=MAP only). Default is SIGMA (or MEDIAN if METHOD is not MAP).
##### SUBSCAN_METHOD
Method for determining the noise properties. Supported values are FREQHI, FREQLO and MAP. Default is MAP.
##### WHITEN_BOX
Size of the region used to calculate the angular power spectrum for removing residual low-frequency noise in the data. Default is a square region bounded by the noise being less than twice the minimum value.

None.