ewrls#

torchspin.ewrls(data, p, lam, nPreAvg=0, delta=100.0, direction='fb')[source]#

Exponentially weighted RLS adaptive filter.

Parameters:
  • data (ndarray) – 2-D array where each column is one scan (shape (nPoints, nScans)).

  • p (int) – Filter length (typically 5-50).

  • lam (float) – Memory factor (typically 0.96-0.99). Must be between 0 and 1.

  • nPreAvg (int) – Number of scans to average for the desired signal. If 0 (default), all scans are averaged.

  • delta (float) – Regularization parameter (default 100).

  • direction (str) – Filtering direction: 'f' forward, 'b' backward, 'fb' average of both (default).

Returns:

y – Filtered averaged signal (1-D array of length nPoints).

Return type:

ndarray