Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX, DOC: Pipeline methods shouldn't accept just any instance of raw (#…
…213) * FIX, DOC: Pipeline methods shouldn't accept just any instance of raw Following up from #212. I realized that if one did do `my_pipeline.find_outlier_chs(my_raw), then under the hood this method would actually create an epochs instance from my_pipeline.raw ... this would lead to unexpected results if my_raw and my_pipeline.raw are not the same object of memory (i.e. they are different raw objects). Since in our codebase we never do pipeline.find_outlier_chs(raw), I dont think we should support this. Instead, we should either always expect an instanc of mne.Epochs OR We should change the method signature to be def find_outlier_chs(epochs=None) , where if it is None, the method creates epochs from pipeline.raw under the hood. * Apply suggestions from Christian O'Reilly code review - Change API form `inst` to `epochs | None` - if `None`, then make epochs from self.raw - No need check and raise type error now. Co-authored-by: Christian O'Reilly <[email protected]> * FIX: cruft * DOC: improve docstring a little * DOC, FIX: add example to docstring and explicitly call pick * TST: OK codecov here is your test :) * STY: 2 lines bt functions * API: make epochs=None the default find_outlier_chs(epochs=None) --------- Co-authored-by: Christian O'Reilly <[email protected]>
- Loading branch information