Store proximity to nearby peaks
Created by: JelleAalbers
This renames NCompeting to PeakProximity, and adds fields for the time to the nearest, previous, and next peak.
This would make selecting isolated peaks a lot easier (e.g. for single electron studies @Jianyu010):
df = st.get_df(run_id, ['peaks_basics', 'peak_proximity'],
selection_str='t_to_nearest_peak > 10e3')
The t_to_nearest_peak
etc. fields have a (configurable) maximum value of 1 second. So if a peak has no other peaks within 5 minutes, t_to_nearest_peak
will still be 1 second. This limits the amount of lookback/lookahead we need to do, which is good for online processing.