SCULIB_FLATFIELD_SEQUENCE

get bolometer measurement sequence for FLATFIELD

Description:

This routine works out the bolometer measurement sequence for a FLATFIELD observation. Only one of SCUBA’s sub-instruments can be flat-fielded at a time. If the sub-instrument is one of the arrays then the measurement sequence will be ref-bol-ref-bol-......-bol-ref, where the ‘bol’s are the bolometers to be measured and ‘ref’ the reference bolometer on the array. If the sub-instrument is one of the photometry pixels then only that bolometer will be measured.

Whatever bolometer is the target of the measurement, data will be taken from all A/D channels.

If status is good on entry SCULIB_BOLSELECT is called to decode the bolometers to be measured and the sub-instruments involved. If the bolometers belong to more than one sub-instrument an error will be reported and bad status returned.

If the sub-instrument is one of the arrays then the name of the reference bolometer will be read from parameters LONGREF_BOL or SHORTREF_BOL as appropriate. The number of measurements and their sequence is set as described above in N_MEASUREMENTS, FLAT_CHAN and FLAT_ADC. If the sub-instrument is not one of the arrays then the reference bolometer will not be used and the bolometers(s) will be measured in sequence.

For each measurement of a target bolometer data will be taken from all data channels; BOLS_MEASURED is set to ‘ALL’ and SCULIB_BOLSELECT called to decode this to channel and ADC numbers. A check is made that the reference bolometer, if used, is among those being measured. If not, an error message will be output and bad status returned.

Lastly, the FLAT_INDEX array is set so that it points to the position in the datablock of data from the target bolometer at each measurement.

Invocation

CALL SCULIB_FLATFIELD_SEQUENCE (BOLOMETERS, NUM_CHAN, NUM_ADC, NUM_SUB, BOL_TYPE, BOL_CALB, BOL_DU3, BOL_DU4, BOL_QUAL, BOL_ENABLED, BOLS_MEASURED, N_BOLS, BOL_SELECT_CHAN, BOL_SELECT_ADC, N_SUBS, SUB_INSTRUMENT, FLATREF_CHAN, FLATREF_ADC, N_MEASUREMENTS, FLAT_CHAN, FLAT_ADC, FLAT_INDEX, STATUS)

Arguments

BOLOMETERS = CHARACTER()
the bolometers to be measured in this FLATFIELD
NUM_CHAN = INTEGER (Given)
the number of channels per A/D
NUM_ADC = INTEGER (Given)
the number of A/Ds
NUM_SUB = INTEGER (Given)
the number of sub-instruments in SCUBA
BOL_TYPE (NUM_CHAN,NUM_ADC) = CHARACTER() (Given)
the type of each bolometer
BOL_CALB (NUM_CHAN,NUM_ADC) = REAL (Given)
the flat-field factor for each bolometer
BOL_DU3 (NUM_CHAN,NUM_ADC) = REAL (Given)
the dU3 coord of each bolometer
BOL_DU4 (NUM_CHAN,NUM_ADC) = REAL (Given)
the dU4 coord of each bolometer
BOL_QUAL (NUM_CHAN,NUM_ADC) = INTEGER (Given)
the quality of each bolometer
BOL_ENABLED (NUM_CHAN,NUM_ADC) = LOGICAL (Returned)
.TRUE. if a bolometer is to be measured
BOLS_MEASURED = CHARACTER() (Returned)
the bolometers to be measured for each FLATFIELD measurement
N_BOLS = INTEGER (Returned)
the number of bolometers to be measured at each measurement
BOL_SELECT_CHAN (NUM_CHAN NUM_ADC) = INTEGER (Returned)
the channel numbers of the bolometers to be measured at each measurement
BOL_SELECT_ADC (NUM_CHAN NUM_ADC) = INTEGER (Returned)
the A/D numbers of the bolometers to be measured at each measurement
N_SUBS = INTEGER (Returned)
the number of sub-instruments being used
SUB_INSTRUMENT (NUM_SUB) = CHARACTER() (Returned)
name of sub-instrument being used
FLATREF_CHAN = INTEGER (Returned)
channel number of reference bolometer
FLATREF_ADC = INTEGER (Returned)
A/D number of reference bolometer
N_MEASUREMENTS = INTEGER (Returned)
the number of measurements in this FLATFIELD observation
FLAT_CHAN (2 NUM_CHAN NUM_ADC) = INTEGER (Returned)
the channel number of the target bolometer in each measurement
FLAT_ADC (2 NUM_CHAN NUM_ADC) = INTEGER (Returned)
the A/D number of the target bolometer in each measurement
FLAT_INDEX (2 NUM_CHAN NUM_ADC) = INTEGER (Returned)
the index in the datablock of the target bolometer in each measurement
STATUS = INTEGER (Given and returned)
global status

Copyright

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