barbaLab / nigeLab

Neurophysiological data analyses by engineers, for physiologists.
GNU General Public License v3.0
14 stars 2 forks source link

Add downsampling of filtered data #98

Closed FrancescoNegri closed 1 year ago

FrancescoNegri commented 1 year ago

This PR implements the downsampling of filtered data. As raw data are filtered by a band-pass filter in the 300-300 Hz range, the filtered signal can be resampled at frequencies slightly larger than 3000 Hz, such as 5000 Hz, in order to reduce its size in memory. Note that the SampleRate attribute of the Block class is changed accordingly, while the fs property of each channel is left unchanged at 30000 Hz (the original sampling frequency). This produces a potential inconsistency and it might therefore be better to ensure the same value between Block.SampleRate and the fs attribute of channels.