REMSKY

Remove sky noise and constant offsets from SCUBA jiggle data

Description:

This task removes sky noise and constant offsets from SCUBA jiggle data. It does this by requesting ‘sky’ bolometers, calculating an average value for each jiggle and then subtracting this off the jiggle. Each jiggle is analysed in turn. The average value can be calculated in two ways: either MEDIAN or MEAN.

After the calculation, the mean value removed from each jiggle can be added back onto the data – this should protect against removing flux from MAP data.

If a SKY NDF is found in the REDS extension, it is assumed that the sky variation has already been determined (eg by calcsky) and this sky signature is removed. The ’ADD’ parameter is ignored in this case.

Usage:

remsky in out

Parameters:

ADD = LOGICAL (Read)
This parameter governs whether the average value removed from the data should be added back after sky removal. The default is for ADD to be true for MAPs and false for other modes (the assumption being that sky bolometers in PHOTOM observations are guaranteed to be on sky)
BOLOMETERS() = CHAR (Read)
List of sky bolometers. The following options are now recognised for the BOLOMETERS parameter:
Code Description Example
nn A number 5 or 19
id Bolometer id h7 or c14
rn Ring number r1 (for the first ring)
r5 (for the outer ring of the SHORT array)
r-1 (for the outer ring)
r-2 (one ring in from outer ring)
all All bolometers all (select the entire array)

Each value must be comma separated but can be preceded by a minus sign to remove the bolometer(s) from the list. The definitions of ring number and ‘all’ are dependent on the selected sub-instrument.

Here are some example values for BOLOMETERS:

 [17,18,19,20] Bolometers 17, 18, 19 and 20
 [h6,h7,h8,h9] Bolometers H6, H7, H8, H9
 [all] Whole array
 [r0] Ring zero (central pixel)
 [r0,-19] No bolometers (bol 19 of LONG is R0/H7)
 [h7,r1] inner ring and H7
 [r1,-h8] inner ring without H8
 [r1,-18] inner ring without bolometer 18
 [all,-r1,-h7] all pixels except the inner ring/H7
 [all,-r3,g1] all pixels except ring 3 but with
G1 (which happens to be in r3)
 [all,-r1,-r2,-r3,-r4,-r5] Selects the central pixel
 [all,-r-1] Selects all except outer ring

Note that the bolometer sum is calculated sequentially so that [all,-all,h7] would leave you with bolometer H7.

IN = NDF (Read)

This is the name of the input demodulated data file.
ITER_SIGMA = REAL (Read)
When using MEAN to calculate the average, this is the sigma clipping level used. This is an iterative value - points will be removed from the mean until the spread of data points is smaller than this value. Supplying a negative value will turn off clipping.
MODE = CHAR (Read)
Method to be used for calculating the average sky. There are two methods available:
  • Median – the median value for all the sky bolometers is taken from each bolometer signal.

  • Mean – the mean of the sky bolometers is used as the average. This mean value is iterative – i.e. The mean and standard deviation are calculated, any points greater than the given distance from the mean are removed and the mean and standard deviation are calculated. This process is repeated until no bolometers are dropped from the mean.

MSG_FILTER = CHAR (Read)
Message output level. Allowed values are QUIET, NORM and VERB. Default is NORM. In VERBOSE mode a list of the selected bolometers is returned along with the value of the sky offset removed for each jiggle.
OUT = NDF (Write)
Output data file.

Examples:

remsky ndf sky_removed bolometers=[g1,g2,g3,g4,g5] mode=median
Use the median of bolometers g1,g2,g3,g4,g5 (not necessarily the best choice) to calculate the sky signal and write the output to sky_removed.sdf.
remsky o12_lon_ext bolometers=[all] mode=median
Use the median of all the bolometers for each jiggle and write the output to the default output file (e.g. o12_lon_sky).
remsky o25_sho_ext bolometers=[r5] mode=mean iter_sigma=4
Use the outer ring of the short-wave array as the sky bolometers. Calculate the sky contribution by using a clipped mean of each jiggle and remove any points from the calculation of the mean that are more than 4 sigma from the mean. Write the output to the default output file.

Notes:

Related Applications

SURF: scuquick, rebin, scuphot, scuover