next up previous 623
Next: SURF_MON - main routine for SCUBA offline data reduction package
Up: Library APIs
Previous: SURF_GRID_CALCSKY - Calculate sky contribution from median image


SURF_GRID_DESPIKE - Despike data by sorting into a given grid position

Description:
For each data point this routine places it into a bin in the output grid depending on the position of the data point on the sky. The position in the input data array is stored. This is done in two stages:

  • Find the size of the output grid from the maximum extent of the input data.

  • Loop through data. Find I,J coordinate of each point in the output grid.

  • Find out maximum number of points for an I,J position.

  • Put data onto grid in array (I,J,N) [REALS]. We also need to store positions of these data. We can either do it by storing the file number, bolometer and position (time) index OR we can just store some index in a merged data array that goes from 1..TOT_PTS. First method is easy but memory hungry. Second method is more efficient but does need some reconstruction to work out where the point was in the original data. Use the second method.


Once the data is gridded, it is first displayed and then despiked. Currently despiking is done on a simple sigma clipping basis for each bin.

Invocation:
CALL SURF_GRID_DESPIKE ( N_FILES, N_PTS, N_POS, N_BOLS, WAVELENGTH, DIAMETER, BOL_RA_PTR, BOL_DEC_PTR, DATA_PTR, QUALITY_PTR, NX, NY, ICEN, JCEN, NSPIKES, BADBIT, STATUS )

Arguments:

N_FILES = INTEGER (Given)
Number of data sets (ie files)
N_PTS ( N_FILES ) = INTEGER (Given)
Total number of points in each map
N_POS( N_FILES ) = INTEGER (Given)
Number of positions per set (Y positions)
N_BOLS( N_FILES ) = INTEGER (Given)
Number of bolometers per set (X positions)
BITNUM = INTEGER (Given)
Bit number to be affected by this routine
WAVELENGTH = REAL (Given)
Wavelength of data (microns)
DIAMETER = REAL (Given)
Diameter of telescope (metres)
BOL_RA_PTR( N_FILES ) = INTEGER (Given)
Array of pointers to position information (X coords) Note that each data set has positions for N_POS $ *$ N_BOLS
BOL_RA_PTR( N_FILES ) = INTEGER (Given)
Array of pointers to position information (Y coords)
DATA_PTR( N_FILES ) = INTEGER (Given)
Pointers to actual data arrays
QUALITY_PTR( N_FILES ) = INTEGER (Given)
Pointer to quality arrays
NX = INTEGER (Returned)
Number of points in grid (X)
NY = INTEGER (Returned)
Number of points in grid (Y)
ICEN = INTEGER (Returned)
Reference pixel (X)
JCEN = INTEGER (Returned)
Reference pixel (Y)
NSPIKES ( N_FILES ) = INTEGER (Returned)
Number of spikes detected (and removed) in each file
BADBIT ( N_FILES ) = BYTE (Given)
Bad bit mask for identifying bad pixels from quality
STATUS = INTEGER (Given & Returned)
Global Status

Notes:
For SMODE=NONE, DMODE is only requested if a plot is required.
Copyright
Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.


next up previous 623
Next: SURF_MON - main routine for SCUBA offline data reduction package
Up: Library APIs
Previous: SURF_GRID_CALCSKY - Calculate sky contribution from median image

SURF Programming Interface
Starlink System Note 72
Tim Jenness, John F. Lightfoot
Joint Astronomy Centre, Hilo, Hawaii
10 July 2000
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council