h5analysis.simplemath.bin_data

h5analysis.simplemath.bin_data(x_data, y_data, binsize)

Reduce noise by averaging data points via binning mechanisms

Parameters:
  • x_data (array) – Specify the x data to act on

  • y_data (array) – Specify the y data to act on

  • binsize (int) – Specify how many data points to combine Must be exponents of 2

Returns:

  • new_x (numpy array) – Mean of the data in bins

  • new_y (numpy array) – y-values for the bins