Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.349 local_max

local_max(array, position [, /subgrid, /bound])

Finds position and value of local maxima in array, starting at the positions (indices) in position and walking along the steepest gradient. position must be a scalar or array of indices to array. By default, a local maximum on the grid is returned. Keyword /subgrid requests the estimated value at the subgrid position, as determined from a quadratic fit near the integer position, with the subgrid position forced to be within one px in any coordinate from the integer position. Allow far subgrid results by also specifying /nobound. The last found maximum is put in !lastmax and !lastmaxloc (the latter always integer), and all found values are returned. If an indicated position falls before the beginning or after the end of the array then the nearest position inside the array is used instead.

See also: local_maxloc, local_min, local_minloc, max, maxloc, !lastmax, !lastmaxloc