Chris Beaumont's IDL Library

Download source code

single page | use frames     summary     class     fields     routine details     file attributes

./

indices.pro

Routines

indices, array, x, y, z, a, b, c, d, e [, center=center]

This procedure creates coordinate arrays for each dimension in an input array.

test

Routine details

topindices

indices, array, x, y, z, a, b, c, d, e [, center=center]

This procedure creates coordinate arrays for each dimension in an input array. The coordinate arrays have the same shape as the input, and the i'th pixel in those arrays denote that dimension's coordinate value at the i'th location in the input

Parameters

array in required

An array to generate indices for

x
y
z
a
b
c
d
e

Keywords

center in optional

Optionally, set to an array with ndim elements, where ndim is the dimensionality of array. The output indices will be centered around the coordinates of center.

Author information

History:

April 2010: Written by Chris Beaumont July 29 2010: Now handles 1D arrays correctly. cnb. Mar 15 2011: Added parameter checking and center keyword. cnb. June 21 2011: Fixed bug when center=0. cnb. June 23 2011: Optimized for speed and memory (10x speedup). cnb.

toptest

test

File attributes

Modifcation date: Thu Jun 23 11:00:56 2011
Lines: 143