def align_and_scale(energy_list, counts_list, pk_find_fun=None):
    if pk_find_fun is None:
        pk_find_fun = find_largest_peak

    base_sigma = None
    out_e, out_c = [], []
    for e, c in zip(energy_list, counts_list):
        E0, max_val, sigma = pk_find_fun(e, c)
        if base_sigma is None:
            base_sigma = sigma
        out_e.append((e - E0) * base_sigma / sigma)
        out_c.append(c)

    return out_e, out_c
Parameters
dataset/ETHPy150Open scikit-beam/scikit-beam/skbeam/core/spectroscopy.py/align_and_scale