skxray.core.bin_1D

skxray.core.bin_1D(x, y, nx=None, min_x=None, max_x=None)

Bin the values in y based on their x-coordinates

Parameters:

x : array

position

y : array

intensity

nx : integer, optional

number of bins to use

min_x : float, optional

Left edge of first bin

max_x : float, optional

Right edge of last bin

Returns:

edges : array

edges of bins, length nx + 1

val : array

sum of values in each bin, length nx

count : array

The number of counts in each bin, length nx