Description:
Given an array of I,J coordinates calculate the histogram of all points onto this grid of size NX
NY.
Just tells you how many data points there are per cell. Returns the histogram and the highest value in
the histogram
Invocation
CALL SURFLIB_HISTOGRAM_GRID (N_PTS, NX, NY, USEDATA, IN_DATA,
IN_QUALITY, BADBIT, IJ, GRID, IMAX, JMAX, NMAX, 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
USEDATA = LOGICAL (Given)
If TRUE the histogram takes bad data points into account by not including them in the
histogram. If false the straight histogram of the I,J’s is constructed.
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
GRID (NX, NY) = INTEGER (Given & Returned)
Histogram. Note that array is not cleared by this routine leaving the possibility that the
routine can be called multiple times to include more than one data set.
IMAX = INTEGER
(Returned)
I position of maximum [first one encountered]
JMAX = INTEGER (Returned)
J
position of maximum [first one encountered]
NMAX = INTEGER (Returned)
Maximum
value in histogram
STATUS = INTEGER (Given & Returned)
Global Status
Notes:
-
If USEDATA is TRUE the data and quality array are used so that bad pixels can be identified and not
included into the histogram of positions.
-
GRID is not initialised by this routine
-
A warning error is raised if the bounds of the histogram are exceeded. It is up to the caller to decide
whether this is a fatal error.
Copyright
Copyright ©1995,1996,1997,1998,1999 Particle Physics and
Astronomy Research Council. All Rights Reserved.