SCULIB_DECODE_SPEC

Decode SCUBA-style data specifications

Description:

This routine decodes a SCUBA-style data specification. The data-spec will be of the form { <component >; <component >;...}, where components are one of the following:-

and the <index_spec > is a list like, for example, 2,5:7,17 to select indices 2, 5 through 7 and 17. Alternatively, <index_spec > can be which will select all data in that component coordinate. The data spec can be passed in as an array of data specs. The number is specified by N_SPEC. By default all components in a dataset are selected. Thus the empty data-spec {} will return all components selected. Example data-specs are:-

The data-spec is case-insensitive and blanks are ignored.

Errors will occur:-

Output consists of a flag POS_SELECTED, to say whether or not the data were selected by position, and mask arrays that are set to 1 at the coordinate of selected data and 0 otherwise. Even if the data were not selected by position the POS_S array, which is the mask for the position coordinate, will be set correctly. Conversely, however, the MEAS_S, INT_S, EXP_S and SWITCH_S arrays, which are masks for the measurement, integration, exposure and switch will not be set to sensible values if the data are position selected.

Invocation

CALL SCULIB_DECODE_SPEC (SPEC, DEMOD_POINTER, N_SWITCHES,N_EXPOSURES, N_INTEGRATIONS, N_MEASUREMENTS, N_POS, N_BOLS, SWITCH_EXPECTED, POS_SELECTED, POS_S, SWITCH_S, EXP_S, INT_S, MEAS_S, BOL_S, STATUS)

Arguments

N_SPEC = INTEGER (Given)
Number of specifications supplied in SPEC
SPEC( N_SPEC ) = CHARACTER() (Given)
the specification to be decoded
DEMOD_POINTER (N_SWITCHES, N_EXPOSURES, N_INTEGRATIONS, N_MEASUREMENTS)
= INTEGER (Given)
the pointer to the location in the main data array of the data for each switch of the observation
N_SWITCHES = INTEGER (Given)
the number of switches per exposure
N_EXPOSURES = INTEGER (Given)
the number of exposures per integration
N_INTEGRATIONS = INTEGER (Given)
the number of integrations per measurement
N_MEASUREMENTS = INTEGER (Given)
the number of measurements in the observation
N_POS = INTEGER (Given)
the number of positions measured in the observation
N_BOLS = INTEGER (Given)
the number of bolometers measured in the observation
SWITCH_EXPECTED = LOGICAL (Given)
.TRUE. if a switch component is allowed in the data-spec
POS_SELECTED = LOGICAL (Returned)
.TRUE. if the P component is used in the data-spec
POS_S (N_POS) = INTEGER (Returned)
the position mask array; 1 for selected positions, 0 otherwise
SWITCH_S (N_SWITCHES) = INTEGER (Returned)
the switch mask array; 1 for selected switches, 0 otherwise
EXP_S (N_EXPOSURES) = INTEGER (Returned)
the exposure mask array; 1 for selected exposures, 0 otherwise
INT_S (N_INTEGRATIONS) = INTEGER (Returned)
the integration mask array; 1 for selected integrations, 0 otherwise
MEAS_S (N_MEASUREMENTS) = INTEGER (Returned)
the measurement mask array; 1 for selected measurements, 0 otherwise
BOL_S (N_BOLS) = INTEGER (Returned)
the bolometer mask array; 1 for selected bolometers, 0 otherwise
STATUS = INTEGER (Given and Returned)
The global status.

Copyright

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