SCULIB_REDUCE_SWITCH

reduce the demodulated data from the switches of an exposure into the exposure result

Description:

This routine reduces the switches in an exposure to give the exposure result, and returns the weight to be given to the specified projected bolometer position when combining different projected bolometers into the result for a sub-instrument. Exposure results are calculated assuming that:-

For a SQUARE chop-function -
switch 1 has the object in the R beam of the ‘middle’ projected bolometer and in the L beam of the ‘right’ bolometer.
switch 2 has the object in the L beam of the ‘middle’ bolometer and in R beam of the ‘left’ bolometer.

For a TRIPOS (3-position) chop-function -
switch 1 has the object in the M beam of the ‘middle’ bolometer, in the L beam of the right and the R beam of the ‘left’.
switch 2 has the object in the R beam of the ‘middle’ bolometer and in the M beam of the ‘right’.
switch 3 has the object in the L beam of the ‘middle’ bolometer and in the M beam of the ‘left’.

The reduction method depends on the number of switches taken per exposure, the chop function used and the projected beam that the bolometers are assumed to be in.

SWITCH_PER_EXP = 1
CHOP_FUN = SQUARE (SCUBAWAVE or RAMPWAVE)
left bolometer = BAD (was never looking at source), weight = 0.0
middle bolometer = switch 1, weight = 1.0
right bolometer = - switch 1, weight = 1.0
CHOP_FUN = TRIPOS
left bolometer = - 2 switch 1, weight = 0.5
middle bolometer = switch 1, weight = 1.0
right bolometer = - 2 switch 1, weight = 0.5

SWITCH_PER_EXP = 2
CHOP_FUN = SQUARE
left bolometer = switch 2 - switch 1, weight = 0.5
middle bolometer = (switch 1 - switch 2) / 2, weight = 1.0
right bolometer = switch 2 - switch 1, weight = 0.5
CHOP_FUN = TRIPOS
left bolometer = - 2 (switch 1 - switch 2), weight = 0.5
middle bolometer = 2/3 (switch 1 - switch 2), weight = 1.5
right bolometer = -2/3 (switch 1 - switch 2), weight = 1.5

SWITCH_PER_EXP = 3
CHOP_FUN = SQUARE
error
CHOP_FUN = TRIPOS
left bolometer = -1/2 (2 switch 1 - (switch 2 + switch 3)), weight = 2/3
middle bolometer = 1/3 (2 switch 1 - (switch 2 + switch 3)), weight = 1.0
right bolometer = -1/2 (2 switch 1 - (switch 2 + switch 3)), weight = 2/3

Any other combinations of parameters will give rise to an error report and the routine will return with bad status.

Invocation

CALL SCULIB_REDUCE_SWITCH (CHOP_FUN, SWITCH_PER_EXP, N_DATA, SWITCH_1_DATA, SWITCH_1_VARIANCE, SWITCH_1_QUALITY, SWITCH_2_DATA, SWITCH_2_VARIANCE, SWITCH_2_QUALITY, SWITCH_3_DATA, SWITCH_3_VARIANCE, SWITCH_3_QUALITY, BEAM, EXP_DATA, EXP_VARIANCE, EXP_QUALITY, WEIGHT, STATUS)

Arguments

CHOP_FUN = CHARACTER() (Given)
the chop function used
SWITCH_PER_EXP = INTEGER (Given)
the number of switches per exposure
N_DATA = INTEGER (Given)
the number of measurements
SWITCH_1_DATA (N_DATA) = REAL (Given)
data for switch 1
SWITCH_1_VARIANCE (N_DATA) = REAL (Given)
variance for switch 1
SWITCH_1_QUALITY (N_DATA) = BYTE (Given)
quality for switch 1
SWITCH_2_DATA (N_DATA) = REAL (Given)
likewise for switch 2
SWITCH_2_VARIANCE (N_DATA) = REAL (Given)
SWITCH_2_QUALITY (N_DATA) = BYTE (Given)
SWITCH_3_DATA (N_DATA) = REAL (Given)
and switch 3
SWITCH_3_VARIANCE (N_DATA) = REAL (Given)
SWITCH_3_QUALITY (N_DATA) = BYTE (Given)
BEAM = INTEGER (Given)
the projected beam assumed for the bolometers; 1 = LEFT 2 = MIDDLE, 3 = RIGHT
EXP_DATA (N_DATA) = REAL (Returned)
the exposure result
EXP_VARIANCE (N_DATA) = REAL (Returned)
the variance on the result
EXP_QUALITY (N_DATA) = BYTE (Returned)
the quality on the result
WEIGHT = REAL (Returned)
the relative weight to assign to this projected-beam compared to the others when adding them together to give a final result
STATUS = INTEGER (Given and returned)
global status

Copyright

Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.