moabb icon indicating copy to clipboard operation
moabb copied to clipboard

Filter bank classes

Open Sara04 opened this issue 1 year ago • 3 comments

Hello,

This PR:

  • removes SinglePass class, as it serves only to set-up lower and upper frequencies of the band-pass filter. This can be directly done in the MotorImagery and LeftRightImagery classes.
  • methods of the pair LeftRightImagery & FilterBankLeftRightImagery and the pair MotorImagery & FilterBankMotorImagery are (should be) the same, so there is no need to redefine them. The classes differ only in filters (single vs. filter bank). Therefore, FilterBankLeftRightImagery can inherit LeftRightImagery and FilterBankMotorImagery can inherit MotorImagery. As LeftRightImagery and MotorImagery cannot take as argument 'filters', the attributes of the classes are initialized via grandparent class BaseMotorImagery.
  • is_valid method, should return False if dataset paradigm is not 'imagery'
  • we can use NumpyDocstringInheritanceMeta metaclass to inheret docstrings and in this way avoid long repetitions

Sara04 avatar Aug 21 '23 16:08 Sara04

Thank you for the review, @PierreGtch ! I've changed 'Parameters' to 'Attributes' as I thought that we use 'Attributes' for class variables and 'Parameters' for methods, but I can revert it to be in accordance with other docstrings.

Sara04 avatar Oct 19 '23 15:10 Sara04

@Sara04 Is this PR ready or you wanted to change other things?

I can fix the errors if you want

PierreGtch avatar Apr 12 '24 06:04 PierreGtch

Hey @PierreGtch , thank you! I will check if there is something more to change.

Sara04 avatar Apr 12 '24 12:04 Sara04