SCULIB_UNPACK_JIGGLE

unpack demodulated data onto 2-d map

Description:

This routine unpacks the demodulated data from a switch onto a rectangular 2-d map.

If status is good on entry the data and variance of the output map will be initialised to ‘bad’ values, the quality to 1. If there are any data to unpack the routine will then attempt to do so. The method used depends on whether the switch covered part/all of the entire jiggle pattern or contains data for several repeats of the jiggle pattern.

In the first case, the routine will check that the indices of the section of jiggle pattern covered by this switch lie within the bounds of the full jiggle pattern. If not, an error will be reported and bad status returned. Otherwise, the datablock will be unpacked into the map as specified by the I_JIGGLE, J_JIGGLE arrays. Each map point just has its data, variance and quality copied from the demodulated data.

When the data covers several repeats of the jiggle pattern, the routine will check that the jiggle index of the first point in the datablock is 1 and that the number of data points is an integer multiple of the size of the jiggle. If not, an error will be reported and bad status returned. Otherwise, the datablock will be unpacked into the map as specified by I_JIGGLE, J_JIGGLE. The unpacking differs from the first case in that demodulated data with bad quality will be ignored. Points in the unpacked map will be set to the average of the values contributed by the separate jiggles, variances will be calculated from the dispersion of the values about the mean if there was more than 1, or set to the demodulated variance otherwise.

Invocation

CALL SCULIB_UNPACK_JIGGLE (N_JIGGLES, N_BOLS, DEMOD, J_START, JIGGLE_COUNT, I_JIGGLE, J_JIGGLE, IDIM, JDIM, MAP_DATA, MAP_VARIANCE, MAP_QUALITY, J_END, STATUS)

Arguments

N_JIGGLES = INTEGER (Given)
number of jiggles in datablock
N_BOLS = INTEGER (Given)
number of bolometers measured
DEMOD (4, N_BOLS, N_JIGGLES) = REAL (Given)
demodulated data
J_START = INTEGER (Given)
index of first jiggle in datablock in the overall jiggle pattern
JIGGLE_COUNT = INTEGER (Given)
number of jiggles in jiggle pattern
I_JIGGLE (JIGGLE_COUNT) = INTEGER (Given)
i index in output map of each jiggle position in pattern
J_JIGGLE (JIGGLE_COUNT) = INTEGER (Given)
j index in output map of each jiggle position in pattern
IDIM = INTEGER (Given)
i dimension of output map
JDIM = INTEGER (Given)
j dimension of output map
MAP_DATA (IDIM, JDIM, N_BOLS) = REAL (Returned)
output map data
MAP_VARIANCE (IDIM, JDIM, N_BOLS) = REAL (Returned)
output map variance
MAP_QUALITY (IDIM, JDIM, N_BOLS) = INTEGER (Returned)
output map quality
J_END = INTEGER (Returned)
index of last jiggle in datablock in the overall jiggle pattern
STATUS = INTEGER (Given and returned)
global status

Copyright

Copyright ©1993-1999 Particle Physics and Astronomy Research Council. All Rights Reserved.