h5analysis.simplemath.bin_shape_y

h5analysis.simplemath.bin_shape_y(arr, width)

Bins 2d matrices in the y direction, i.e. it maintains the number of columns, by truncating the matrix at the end if necessary and calculating the mean in each bin

Parameters:
  • arr (numpy array) – 2d array with data to be binned

  • width (int) – Binsize, how many data points per bin

Returns:

arr – Binned 2d data

Return type:

numpy array