Documentation for jbiu/

Generated by IDLdoc

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

misc/

contourlevels.pro


top source contourlevels

Misc

result = contourlevels(image, enclosedfrac)

Calculates the contour level that encloses a given fraction of the data in a multi-dimensional histogram.

Return value

Takes an IMAGE generated using something like HIST_2D, ie. which contains the number of data points that fall within the bounds of each pixel, and calculates the contour levels that enclose a given fraction ENCLOSEDFRAC (which can be an array) of the data points. The RESULT can be passed to CONTOUR as the LEVELS= argument. IMAGE may have any dimensionality desired. Note that this errs on the side of lower contour levels that enclose a larger fraction of the data. I.e. if no contour level contains exactly ENCLOSEDFRAC of the data points then RESULT will be the highest contour level that contains no less than ENCLOSEDFRAC of the data.

Parameters

image in

A histogram in arbitrary dimensions, e.g. as generated with HIST_2D or HIST_ND.

enclosedfrac in

The fraction of data points

File attributes

Modification date: Thu Feb 10 10:37:49 2011
Lines: 50