Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/~robberto/Main/Software/IDL4pipeline/density.html
Дата изменения: Thu Feb 27 21:56:49 2014
Дата индексирования: Sun Mar 2 08:33:34 2014
Кодировка:

Поисковые слова: южная атлантическая аномалия
density.pro (JWST Pipeline routines in IDL)

JWST Pipeline routines in IDL

A collection mantained by M. Robberto

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

./

density.pro


top source density

density, x0, y0, drange=drange, dlog=dlog, dsize=dsize, ct=ct, ps_white=ps_white, contour=contour, flevels=flevels, xlog=xlog, ylog=ylog, _extra=_extra

This procedure shows the density of points in an x-y plot.

This procedure shows the density of points in an x-y plot. This is mainly useful in cases where so many points are being plotted that they merge together into a large flat splotch when plotted with the usual PLOT,X,Y,PSYM=3.

INPUT x0 = array of x-positions y0 = array of y-positions OPTIONAL INPUT drange = [min,max] range for shading density of data points (default = [min,max] of density range) dlog = keyword to set use of logarithmic scaling within drange dsize = [dx,dy] size of density plot in pixels (default is size of plot within the given X-window. If a different dsize is used, the resulting density image is resizezed to still fit within the same plot window. xlog = keyword to set use of logarithmic x-axis ylog = keyword to set use of logarithmic y-axis ct = number of standard IDL color table to use. [0:40] -1 => inverted grayscale (good for PS output). ps_white = force a white background for PS color tables instead of color=255 contour = set this keyword to overplot contours. flevels = contour levels specified as the franction of data outside the contour. These should be in the range [0,1], in increasing value. _extra = allows use of any other keywords applicable to PLOT (and CONTOUR) commands e.g. XTITLE, YTITLE, TITLE, CHARSIZE, COLOR, LEVELS, ...

DENSITY is used much like the PLOT command, but with a few extra keywords to control the display range for the density (DRANGE, DLOG), the scale for the binning of the data (DSIZE), and optional contouring.

This procedure does work with "PS" devices, but you may need to adjust the color table to distinguish the axes (color = 0) from the lowest density portion of the image (color = 1). This is less of a problem with 'X' devices because in that case the axes are drawn with color = 255 (not 0).

The CT keyword specifies which of the standard IDL color tables (LOADCT) will be used in the plot. With the additional option that CT = -1 will use a white-to-black color table (i.e. and interted version of the default greyscale).

The PS_WHITE keyword can be set to force a white background color in a 'PS' version of a density plot in cases where the loaded color table results in a background of another color.

The CONTOUR keyword overplots contour lines. For potentially grainy plots (when DSIZE[1] > 100) the data are automatically smoothed before contouring is done. By default, the values of the contour LEVELS are not especially meaningful unless DSIZE is carefully set so that the displayed density is in physically relevant units. The FLEVELS parameter allows the selection of contours that exclude (not enclose) the designated fraction of the data. You'll need to use the C_ANNOTATION parameter to label the contours appropriately. Note: the contours may not be precise in some cases (because of smoothing) may appear shifted if XRANGE or YRANGE is specified without setting XSTYLE or YSTYLE to force the exact plot range.

EXAMPLE: Density plot of a gaussian distribution (with contours): IDL> x = randomn(seed,1e6) IDL> y = randomn(seed,1e6) IDL> density,x,y,ct=39,/contour,flev=[0.01,0.1,0.5],$ IDL> c_annot=['0.01','0.1','0.5'],xtitle='random x',ytitle='random y' R. Arendt (SSAI) rick.arendt@gsfc.nasa.gov Version 1.1 -- 2006/01/22 addded PS plotting to original version. Version 1.2 -- 2006/01/28 fixed PS plotting for lag axes, added PS color stuff Version 1.3 -- 2006/01/31 fixed plotting for cases with inverted axes Version 1.4 -- 2006/10/05 fixed default (unspecified) plot ranges added optional color table specification added optional contouring

Parameters

x0
y0

Keywords

drange
dlog
dsize
ct
ps_white
contour
flevels
xlog
ylog
_extra

Statistics

Lines:
233 lines
McCabe complexity:
45

File attributes

Modification date: Fri Apr 26 16:11:42 2013
Lines: 234