You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw a discussion concerning the dtype of the whitening pre-processors, but I just want to highlight that there is some inconsistencies between the pre-processors: some can specify an output dtype (filtering, whitening), and some can not (CAR, artefacts, ...)
Maybe there should be something more abstract and general such that all pre-processors can control the dtype output?
We have now the AstypeRecording. For all the preprocessors that can deal with any type, the output should be the one of the parent recording and if the user wants to control that, use AstypeRecording.
For the ones that necessarily output a type I am less sure.
Either throw a warning if the parent recording and the known necessary output does not match. Or be more demanding and make users transform the parent recording with AstypeRecording if we believe this is a serious error that they should not do (similar to what we do with the is_filtered flag).
In any case, then, it seems that dtype should not be in any __init__.
For some preprocessors the output will necessarily change. E.g., zscore and whitening will output a float no matter what!
This and #2029 have made me change my mind. It does not makes sense that pre-processing takes the input of their parent for some cases. Now I feel that some processors like dtype and phase shift should have their own dtype and we should thrown a warning if there is an increase in memory representation.
I still believe that control of dtype should be done iwth AstypeRecording instead in the __init__.
Activity
h-mayorquin commentedon Jul 19, 2023
We have now the
AstypeRecording. For all the preprocessors that can deal with any type, the output should be the one of the parent recording and if the user wants to control that, useAstypeRecording.For the ones that necessarily output a type I am less sure.
alejoe91 commentedon Jul 19, 2023
For some preprocessors the output will necessarily change. E.g., zscore and whitening will output a float no matter what!
h-mayorquin commentedon Jul 19, 2023
Yes, so I can think on two solutions.
Either throw a warning if the parent recording and the known necessary output does not match. Or be more demanding and make users transform the parent recording with
AstypeRecordingif we believe this is a serious error that they should not do (similar to what we do with theis_filteredflag).In any case, then, it seems that dtype should not be in any
__init__.Let's see if @samuelgarcia wants to chime in.
h-mayorquin commentedon Sep 26, 2023
This and #2029 have made me change my mind. It does not makes sense that pre-processing takes the input of their parent for some cases. Now I feel that some processors like dtype and phase shift should have their own dtype and we should thrown a warning if there is an increase in memory representation.
I still believe that control of dtype should be done iwth AstypeRecording instead in the
__init__.