nigsp.operations.timeseries.graph_filter¶
- nigsp.operations.timeseries.graph_filter(timeseries, eigenvec, freq_idx, keys=['low', 'high'])[source]¶
Filter a graph decomposition into two parts based on freq_idx.
Return the two eigenvector lists (high freq and low freq) that are equal to the original eigenvector list, but “low” is zero-ed for all frequencies >= of the given index, and “high” is zero-ed for all frequencies < to the given index. Also return their projection onto a timeseries.
- Parameters:
- timeseries
numpy.ndarray
The input timeseries. It is assumed that the second dimension is time.
- eigenvec
numpy.ndarray
The eigenvector resulting from the Laplacian decomposition.
- freq_idx
int
orlist
The index of the frequency that splits the spectral power into two (more or less) equal parts - i.e. the index of the first frequency in the “high” component.
- keys
list
, optional The keys to call the split parts with.
- timeseries
- Returns:
dict
ofnumpy.ndarray
Return first the split eigenvectors.
dict
ofnumpy.ndarray
Return second the projected split eigenvectors onto the timeseries.
- Raises:
IndexError
If the given index is 0 (all “high”), the last possible index (all “low”), or higher than the last possible index (not applicable).