def get_waveform_amplitude(mean_masks, mean_waveforms):

    assert mean_waveforms.ndim == 2
    n_samples, n_channels = mean_waveforms.shape

    assert mean_masks.ndim == 1
    assert mean_masks.shape == (n_channels,)

    mean_waveforms = mean_waveforms * mean_masks
    assert mean_waveforms.shape == (n_samples, n_channels)

    # Amplitudes.
    m, M = mean_waveforms.min(axis=0), mean_waveforms.max(axis=0)
    return M - m
Return the amplitude of the waveforms on all channels.
dataset/ETHPy150Open kwikteam/phy/phy/stats/clusters.py/get_waveform_amplitude