SCAN_RLB

Remove baselines from SCAN/MAP data

Description:

This routine removes a baseline from each scan. The baseline is determined in a number of ways. For removal of a linear baseline, a fit is made to the scan ends before removing this from the entire scan.

Usage:

scan_rlb in out

Parameters:

CHOP = INTEGER (Read)
The linear baseline fit is calculated over regions CHOP arcseconds from the scan ends. This region should be as large as possible but should only include baseline regions – any scan that includes a source detection within CHOP arcseconds of the scan ends will be rendered useless. The default value is the chop throw.
IN = NDF (Read)
The name of the input file containing demodulated SCUBA data.
METHOD = CHAR (Read)
Governs the method to be used for calculating the baseline. Options are MEDIAN: Remove the median from each scan, MEAN: remove the mean level from each scan, LINEAR: fit a linear baseline to the ends of the scan.SECTION: Use a SCUBA section to specify regions of each integration that are thought to be flux free. Remove the median of the specified section from the associated integration. Default is LINEAR.
MSG_FILTER = CHAR (Read)
The messaging level. Allowed values are QUIET, NORM and VERB. Default is NORM. There are no verbose messages.
OUT = NDF (Write)
The name of the output file to contain the processed data.
RLB = INTEGER (Read)
This parameter governs whether the baseline fit is removed from the input data or stored instead of the data. If RLB is .TRUE. the corrected data are returned. If RLB is .FALSE. the fit is returned.
SECTION = CHAR (Read)
This array parameter can be used to specify SCUBA sections to be used for baseline calculation. It is requested when METHOD=SECTION. In general the SCUBA section should include scan (exposure) or position (p) specifiers which will be applied to each bolometer and integration. It is possible to be more specific and to provide multiple sections singling out certain bolometers or integrations. If entire integrations are selected no baseline removal will occur on unselected integrations (this will be stated). The median of the section supplied for each integration is subtracted from every exposure in that integration (remember that if no integration is specified, all integrations are assumed).

Curly brackets must still be given. Since this is an array parameter square brackets must be used to specify more than one component:

SECTION > [ {e1} , {e4;b2} ]

would select exposure one from each integration along with exposure 4 for bolometer 2. be used if the square brackets are not used.

Care must also be taken when using commas in SCUBA sections - the parameter system will split multiple entries on commas unless the entire section is quoted:

SECTION > "{e1,4}"

If necessary the negation character should come after a section (ie after the closing curly bracket) and that negation applies to the combined section and not just the string containing the negation character:

SECTION > {e3}-

implies that the section consists of everything except exposure 3.

Examples:

scan_rlb infile method=linear
Remove linear baselines from each scan using baseline regions the same size as the chop. Write the results to the default output file.
scan_rlb infile rlb method=linear chop=30
Calculate the linear baseline for each scan using the specified baseline region. Write the results to the default output file.
scan_rlb infile norlb method=median
Calculate the fit using the median of each scan but do not remove the baseline from the data. Store the baseline determination for later analysis.
scan_rlb method=section rlb section=e1,4
Calculate the baseline using the first and 4th exposures of each integration.

Notes:

The Kappa sub command can be used to subtract the baseline from the input data at a later stage (if RLB is true).

Related Applications

SURF: restore
KAPPA: sub