next up previous 623
Next: SURFLIB_FILL_POLPACK_ANGLES - Average
Up: Library APIs
Previous: SURFLIB_DIFF_DESPIKE - Despike data scan by detecting points more than nsigma from running 2-point mean


SURFLIB_FILL_GRID - Populate grid with data points corresponding to position

Description:
Given an array of I,J coordinates associated with data values, this routine places each data point onto the rectangular grid and the position in the data array into a corresponding grid. Grid is of size (NX,NY,NMAX) and each data point is placed into a different layer (up to NMAX) for each I,J. We already know the value of NMAX since the output array has been pre-allocated.

Invocation:
CALL SURFLIB_FILL_GRID (N_PTS, NX, NY, NMAX, OFFSET, IN_DATA, IN_QUALITY, BADBIT, IJ, GRID, BINS, BIN_POS, STATUS )

Arguments:

N_PTS = INTEGER (Given)
Number of I,J pairs supplied
NX = INTEGER (Given)
Size of X dimension
NY = INTEGER (Given)
Size of Y dimension
NMAX = INTEGER (Given)
Maximum value allowed for third dimension of BINS
OFFSET = INTEGER (Given)
This is the offset in the IJ data array. Not used for IJ itself (Since this is added to the pointer of the input array if needed) in this array but is added onto each of the values placed into the BIN_POS array so that we can keep track of the input data without using a further two pieces of information.
IN_DATA(N_PTS) = REAL (Given)
Input data
IN_QUALITY(N_PTS) = BYTE (Given)
Input quality
BADBIT = BYTE (Given)
Bad bits mask for quality array
IJ ( 2, N_PTS ) = INTEGER (Given)
Positions of each point (I,J) in output grid for each N_PTS
GRID (NX, NY) = INTEGER (Given & Returned)
Scratch space for keeping track of the number of points added into each I,J
BINS(NX, NY, NMAX) = REAL (Given & Returned)
The data stored in relation to its position
BIN_POS (NX, NY, NMAX) = INTEGER (Given & Returned)
The position in the input data arrays associated with each data point in BINS
STATUS = INTEGER (Given & Returned)
Global Status

Notes:

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


next up previous 623
Next: SURFLIB_FILL_POLPACK_ANGLES - Average
Up: Library APIs
Previous: SURFLIB_DIFF_DESPIKE - Despike data scan by detecting points more than nsigma from running 2-point mean

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