Skip to content
Commit 87f38607 authored by Ole Koenig's avatar Ole Koenig
Browse files

lag_energy_spectrum: Frequency interval filtering from ]fmin,fmax] to [fmin,fmax]

* The lower bin should also be included, otherwise the minimal
  frequency bin (1/T) is never included in the calculation

Further notes:

* lag_energy_spectrum (and foucalc) filters the frequency range
  [fmin,fmax] and calculates the RMS in that range with the where
  function. This can potentially lead to underestimates of the RMS
  because bins where fmin/fmax is in between bin_lo and bin_hi are NOT
  counted.
* Example:
                                     fmin       fmax
User defined frequency filtering:     |           |
Frequency grid coming from DFT:    |   |   |   |   |
                                         X   X
only the two bins marked with X are accounted for in the RMS calculation.

* A potentially better implementation is to use an if statement to
  check whether most of the bin is below or above the frequency
  threshold and then decide to in-/exclude it.
parent 10c11aa5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment