Documentation for /home/davin/idl/socware/

Generated by IDLdoc

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

general/misc/

bin2d.pro


Procedure: bin2d Purpose: A slightly simpler wrapper for vassilis's routine for 2-d binning NOTE: despite the fact that they are keywords either binsize or binnum must be set for the proceedure to function Inputs: x: the x components for the bins. Should be an N length array. y: the y components for the bins. Should be an N length array. arrs2bin: the arrays to be binned should be an NxM sized array or an N sized array (Note: Interpolation to match the N component of input arrays is the responsibility of the user.) Keywords: binsize: a number or a 2 element array. If a single number it will be treated as size of the bins for the x dimension and the y dimension. If it is a two element array, the first element will be the size of the bins on the x axis and the second element will be the size of the bins on the y axis. Warning: Either Binsize or binum must always be set. binum: a number of 2 element array. If a single number it will be treated as the number of bins on for both axes. If a 2 element array, the first element is number of bins on the x-axis and the second element is the number of bins on the y-axis. (Note: The number of bins actually produced may vary by +- 1) Bins will be evenly spaced over xrange and yrange if provided, and over the range of the data if not. Warning: Either Binsize or binum must always be set. xrange,yrange(optional): a 2 element array specifying the min and the max over which binning will occur for the respective axis(default: all data) flagnodata(optional): set this keyword to a flag to replace output values with if there is no data. (default: 0) averages(output): outputs 2-d array in which the bin averages are stored medians(output): outputs 2-d array in which the bin medians are stored stdevs(output): outputs 2-d array in which the bin stdevs are stored. binhistogram(output): a 2-d histogram of the number of elements used for constructing each cell xcenters,ycenters(output): 1-d array of the centers for the bins on each axis. minvarvec,maxvarvec(output): Either of these are set arrs2bin will must have dimension M >= 2. The first 2 arrays of the M dimension(ie arrs2bin[*,0] and arrs2bin[*,1] will be treated as corresponding elements of an X,Y flow field. The maxvariance direction will be a 2D vector in maxvarvec for each cell. The minvariance direction will be a 2D vector in minvarvec for each cell. The vector norm is the variance in the max/min direction, i.e., lambda_i=sqrt(maxvarvec(*,0)^2+maxvarvec(*,1)^2). Notes and Warnings: 1. Interpolation to match the N component of input arrays is the responsibility of the user. 2. The number of bins actually produced may vary by +- 1 from the number requested by binum 3. Either binsize or binum must always be set. 4. If both binsize and binum, binsize will take precedent. SEE ALSO: bin1d.pro,plotxyz.pro,thm_crib_plotxyz.pro $LastChangedBy: pcruce $ $LastChangedDate: 2008-02-06 13:43:58 -0800 (Wed, 06 Feb 2008) $ $LastChangedRevision: 2352 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/ssl_general/trunk/tplot/tplotxy.pro $

Routines

Routines from bin2d.pro

bin2Dmain, x, y, arrs2bin, xmin, xmax, xbinsize, ymin, ymax, ybinsize, kinbin, bincenters, averages, stdevs, medians, maxvarvec=maxvarvec, minvarvec=minvarvec, flag4nodata=flag4nodata
bin2d, x, y, arrs2bin, binsize=binsize, binum=binum, xrange=xrange, yrange=yrange, flagnodata=flagnodata, averages=averages, medians=medians, stdevs=stdevs, binhistogram=binhistogram, xcenters=xcenters, ycenters=ycenters, minvarvec=minvarvec, maxvarvec=maxvarvec

Routine details

top source bin2Dmain

bin2Dmain, x, y, arrs2bin, xmin, xmax, xbinsize, ymin, ymax, ybinsize, kinbin, bincenters, averages, stdevs, medians, maxvarvec=maxvarvec, minvarvec=minvarvec, flag4nodata=flag4nodata

Parameters

x
y
arrs2bin
xmin
xmax
xbinsize
ymin
ymax
ybinsize
kinbin
bincenters
averages
stdevs
medians

Keywords

maxvarvec
minvarvec
flag4nodata

top source bin2d

bin2d, x, y, arrs2bin, binsize=binsize, binum=binum, xrange=xrange, yrange=yrange, flagnodata=flagnodata, averages=averages, medians=medians, stdevs=stdevs, binhistogram=binhistogram, xcenters=xcenters, ycenters=ycenters, minvarvec=minvarvec, maxvarvec=maxvarvec

Parameters

x
y
arrs2bin

Keywords

binsize
binum
xrange
yrange
flagnodata
averages
medians
stdevs
binhistogram
xcenters
ycenters
minvarvec
maxvarvec

File attributes

Modification date: Thu Feb 13 16:43:47 2014
Lines: 104