roaming_binmaker¶
- clustertools.util.recipes.roaming_binmaker(x, nbin=10, ntot=20, nsum=False, steptype='linear')[source]¶
Split an array into bins of equal width with a roaming average
- Parameters:
- xfloat
input array
- nbinint
number of bins to set bin width
- ntotint
number of total bins
- nsumbool
return number of points in each bin (default: False)
- steptypestr
linear or logarithmic steps (default: linear)
- Returns:
- x_lowerfloat
lower bin values
- x_midfloat
mean value in each bin
- x_upperfloat
upper bin values
- x_hist
number of points in bin
- if nsum==True:
- x_sumfloat
sum of point values in each bin