neurogeriatricskiel / KielMAT

Python based toolbox for processing motion data
https://neurogeriatricskiel.github.io/KielMAT/
Other
6 stars 1 forks source link

Put filters and associated parameters out of the main module #14

Closed rmndrs89 closed 11 months ago

rmndrs89 commented 11 months ago

Dear all,

could we try to put all kinds of filters out of the main modules?

For example, here within calling the gait sequence detection algorithm, the window_length and polynomial_order for the Savitzky-Golay are hard-coded: https://github.com/neurogeriatricskiel/NGMT/blob/b2e35b8c2c861611163c09796582e63db6267ec3/ngmt/modules/gsd/GSDB.py#L43C21-L43C23

From my perspective this is just (another) low-pass filter, that the end user should be able to call with different parameter settings (window length and polynomial order).

Perhaps we should have in ngmt.utils.preprocessing.py a function lowpass_filter with a method arguments, e.g., method="butter" or method="savgol", and the associated keyword arguments?

Best, Robbin

masoudabedinifar commented 11 months ago

Hello Robbin,

The filters are placed out of the main module, in preprocessing file. Commit Ref No: [fbec32df114f22135df74bda5ba43490d31af460] https://github.com/neurogeriatricskiel/NGMT/commit/fbec32df114f22135df74bda5ba43490d31af460

Kind regards, Masoud.