wonambi.trans.analyze module
Analysis and export convenience functions.
- wonambi.trans.analyze.event_params(segments, params, band=None, n_fft=None, slopes=None, prep=None, parent=None)[source]
Compute event parameters.
- Parameters:
segments (instance of wonambi.trans.select.Segments) – list of segments, with time series and metadata
params (dict of bool, or str) – ‘dur’, ‘minamp’, ‘maxamp’, ‘ptp’, ‘rms’, ‘power’, ‘peakf’, ‘energy’, ‘peakef’. If ‘all’, a dict will be created with these keys and all values as True, so that all parameters are returned.
band (tuple of float) – band of interest for power and energy
n_fft (int) – length of FFT. if shorter than input signal, signal is truncated; if longer, signal is zero-padded to length
slopes (dict of bool) – ‘avg_slope’, ‘max_slope’, ‘prep’, ‘invert’
prep (dict of bool) – same keys as params. if True, segment[‘trans_data’] will be used as dat
parent (QMainWindow) – for use with GUI only
- Returns:
list of dict – list of segments, with time series, metadata and parameters
- wonambi.trans.analyze.export_event_params(filename, params, count=None, density=None)[source]
Write event analysis data to CSV.