Documentation for /Users/balarsen/Documents/idl/larsen/

Generated by IDLdoc

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

./

reverse_indices.pro

topreverse_indices

result = reverse_indices(histo, ri [, bin] [, OMIN=OMIN] [, OMAX=OMAX] [, VALUE=VALUE])

use histogram to pull out regions using the reverse_indices keyword

Return value

out: indices in that bin of a histogram

Parameters

histo in required

a histogram from the histogram() function

ri in required

the histogram() reverse_indices keyword output

bin in optional

the bin you want the indices for

Keywords

OMIN in optional

omin keyword output from histogram()

OMAX in optional

omax keyword output from histogram()

VALUE in optional

specify a bin by value instead of number

Examples

IDL> data=fix(randomu(101,25)*12) IDL> h=histogram(data, OMIN=omin, OMAX=omax, REVERSE_INDICES=ri, binsize=2, /nan) IDL> print, data[sort(data)] 0 0 0 1 1 1 1 2 3 3 4 4 4 4 4 5 6 7 9 10 10 11 11 11 11 IDL> print, data[reverse_indices(h, ri, 2)] 5 4 4 4 4 4 IDL> print, data[reverse_indices(h, ri, value=3.5 , OMIN=omin, OMAX=omax)] 2 3 3

Author information

History:

Wed Dec 19 15:43:36 2007, Brian Larsen added early return of NaN if there are no indices Mon Feb 12 15:14:46 2007, Brian Larsen written and tested

Statistics

Lines: 37
McCabe complexity:

File attributes

Modifcation date: Tue Sep 9 14:12:26 2008
Lines: 92
Disclaimer