def find_largest_peak(x, y, window=None):

    # make sure they are _really_ arrays
    x = np.asarray(x)
    y = np.asarray(y)

    # get the bin with the largest number of counts
    j = np.argmax(y)
    if window is not None:
        roi = slice(np.max(j - window, 0), j + window + 1)
    else:
        roi = slice(0, -1)

    (w, x0, y0), r2 = fit_quad_to_peak(x[roi], np.log(y[roi]))
    return x0, np.exp(y0), 1/np.sqrt(-2*w)
Finds and estimates the location, width, and height of
dataset/ETHPy150Open scikit-beam/scikit-beam/skbeam/core/spectroscopy.py/find_largest_peak