dx_function¶
- clustertools.util.recipes.dx_function(x, nx=10, bintype='num', x_lower=None, x_mean=None, x_upper=None, plot=False, **kwargs)[source]¶
Find distribution function using nx bins
- Parameters:
- xfloat
input arrayå
- nxint
number of bins (default : 10)
- bintypestr
bin with equal number of stars per bin (num) or evenly in x (fix) (default: num)
- x_lower,x_mean,x_upperfloat
preset lower limit, mean value, and upper limit bins
- Returns:
- x_meanfloat
mean value in each bin
- x_histfloat
number of stars in each bin
- dxfloat
number of stars in each bin divided by width of bin
- alphafloat
power law slope fit to dx vs x_mean
- ealphafloat
error in alpha
- yalphafloat
y-intercept of fit to log(dx) vs lod(x_mean)
- eyalphafloat
error in yalpha