Comments (4)
Do you mean functions as in don't overuse classes? In that regard I agree. Sometimes they add a layer of abstraction that could be avoided.
Nevertheless because we have a lot of parameters it sometimes requires passing a lot of arguments (or a dictionary) to the functions and it gets a little bit ugly to the eyes.
In our particular case I would think about making the find_noisy_channels criteria methods into functions of the module that the Noisy Channels class calls. That way they would be less dependent of each other and could be tested in an easier way (and potentially be used in other contexts?). Right now though the test file of find_noisy_channels doesn't seem that convoluted so maybe this is unnecesary (?).
The other two critical things are the perform_reference and the robust_reference methods. Maybe it would be worth while to make deeper tests for these ones whether we refactor or not into a more functional style.
from pyprep.
@sappelhoff With @yjmantilla's functional RANSAC and the NoisyChannels tests being broken into simpler chunks in #84, what do you think is left for this issue? Factoring out adaptive line noise filtering and post-rereference interpolation as discussed in #73 comes to mind (would be necessary for writing MATLAB-equivalence tests for either), but is there anything else you can think of?
from pyprep.
Factoring out adaptive line noise filtering and post-rereference interpolation as discussed in #73 comes to mind (would be necessary for writing MATLAB-equivalence tests for either)
+1, but apart from that, I think your recent efforts have left us well covered, especially with the matprep CI :-)
I think this one can be closed once #73 is closed.
from pyprep.
I agree with both, with #73 this should be closed.
from pyprep.
Related Issues (20)
- Use the MNE logger to set the verbosity HOT 6
- Make pyprep load MNE raw data for object, if not already loaded HOT 3
- filt vs filtfilt (MATLAB implementation)
- Add a "reject_by_annotation" parameter for finding bad channels HOT 1
- pyprep.utils._filter_design throws error for large sampling rates HOT 4
- Passing a custom montage to the PrepPipeline(raw, montage=?)? HOT 5
- Saving prep.raw give error " ValueError: Measurement infos are inconsistent for dig" HOT 4
- List of channel names causes TypeError in find_bad_by_ransac HOT 2
- migrate from `.zenodo.json` to `CITATION.cff` HOT 1
- update issue/pr templates HOT 1
- Computation of window size based on cutoff frequency in local detrend method HOT 1
- Question: using pyprep.NoisyChannels on numpy arrays HOT 1
- Issue with RawBrainVision HOT 2
- find_all_bads throws inf/nan error after filtering/detrending? HOT 12
- Documentation for Noisy Channels Algorithms' stand-alone use HOT 1
- [Feature suggestion] Allow for relevant annotation selection during processing.
- How to include the prep output in my preprocessing pipeline? HOT 1
- New release? HOT 4
- Possible to add an argument in find_bad_by_nan_flat() to change FLAT_THRESHOLD ? HOT 2
- Add to NoisyChannel a bad_by_psd method to tackle low-frequency artefacts HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyprep.