marsipu's Blog

Weekly Check-In Week 6 (12.06.-16.07.)

marsipu
Published: 07/16/2021

What did I do this week?

During this week I mainly fixed bugs (scrolling, annotations, benchmarks). Some new features included a downsampling-test and channel-colors. As my mentors suggested to refactor the existing matplotlib-backend into a subclass inheriting from an abstract base-class for plotting I read more into the structure of the matplotlib-backend and equivalent backends of MNE-Python.

What is coming up next?

Displaying Epochs is the biggest feature which is still left, so this will be next. The way how epochs-data is handled before display is already implemented in the matplotlib-backend so I will probably benefit from implementing the epochs-display in pyqtgraph while refactoring the epoch-handling methods from the matplotlib-backend.

Did you get stuck anywhere?

At first I struggled a bit on defining what of the existing matplotlib-backend should be refactored and moved into an abstract class, but this could be overcome by consulting my mentors. The refactoring probably will be a side-by-side task now where I refactor the data-management-methods when I need them in the pyqtgraph-backend.

View Blog Post

Blog Week 5 (05.07.-09.07.)

marsipu
Published: 07/11/2021

What did I work on this week?

I worked on the implementation and improvement of features as the mouse-interaction and the annotation-management. There also were still some bugs which appeared during vertical scrolling (lines getting added/removed when they shouldn't) and which were a bit hard to track. To simplify the bug-tracking, I simplified the dynamic loading of lines. With the annotation-manager, I finished a feature which is partly inspired by SigViewer.

Benchmarks

As the performance can still be improved, I ran some benchmarks for the horizontal scrolling to compare different methods of downsampling. With the current version I found:

  • applying downsampling in chunks decreases performance
  • the "peak"-downsampling-method from pyqtgraph decreases performance compared to no downsampling

I am still working on ways to improve performance. One way is to activate OpenGL, which improves perfomance a lot. On Windows this may come with future problems, because it only works with an older pyqtgraph-version at the moment.

What comes next?

There are still features left to be implemented before I can open the first PR for an integration into the main-branch of MNE-Python which I will work on. Besides that my mentors advised me to refactor the existing matplotlib-classes to make a side-by-side implementation of both backends more feasible.

View Blog Post

Weekly Check-In Week 4 (28.06.-02.07.)

marsipu
Published: 07/04/2021

What did I do this week?

During this week I mainly worked on the annotations-feature to mark regions for example for exclusion. I also adapted the methods from pyqtgraph for downsampling.

What is coming up next?

After a meeting with my mentors we still confirmed, that pyqtgraph would be the way to go for now and I updated the ToDo-List with all the features which still need to be implemented. As the basic functionality is mostly already working sufficiently we are aiming on integrating the first version of the pyqtgraph-RawBrowser into the MNE-Python development-branch soon.

Did you get stuck anywhere?

Not yet.

View Blog Post

Blog Week 3 (28.06.-02.07.)

marsipu
Published: 06/28/2021

What did I do this week?

I continued with implementing more features into the pyqtgraph-prototype (scrollbars, bad-channel-selection, keyboard-shortcuts) and I fixed several bugs. To investigate the differences in performance between the pyqtgraph-prototype and a barebone PyQt-Prototype I tried to implement the features from the pyqtgraph-prototype there too (see "Did I get stuck anywhere?"). And I recently contacted the community of pyqtgraph for some feedback on the prototype (and to thank them for their great work).

What is coming up next?

There are still features left, especially in terms of markers and the visualization of Epochs. In accordance with my mentors I will continue with implementing those features into the pyqtgraph-backend as this seems to be a viable option as the final backend.

Did I get stuck anywhere?

Working on the barebone PyQt-Prototype I encountered several challenges which haven't been present while I was working with pyqtgraph. For example I couldn't fit the lines to the view and when I tried shifting the visible lines, it resolved in weird artefacts. It was then more than ever that I realized how many problems are solved by pyqtgraph beforehand and as it took to much time to struggle with those problems I now switched back to working on the pyqtgraph-backend. The original performance problem (activating OpenGL for pyqtgraph) turned out to have a very simple solution so now the performance of the pyqtgraph-backend can be better regardless.

View Blog Post

Weekly Check-In Week 2 (14.06.-18.06.)

marsipu
Published: 06/22/2021

1. What did you do this week?

After having decided to continue improving the pyqtgraph-prototype during the first week, I worked on implementing more features from the current RawBrowser as scrolling vertically through the channels and customizing the axes. An improved benchmark-utility allows now for comparison between different parameter-sets to observe the influence of parameters on the performance.

2. What is coming up next?

As the performance already has reached a satisfying level I decided with my mentors to focus on implementing the remaining features to see if everything is feasible with the pyqtgraph-backend.

3. Did you get stuck?

Sometimes it took me a while do understand how something like e.g. the axes are implemented in pyqtgraph, but the more I read the pyqtgraph-source-code the easier it gets.

View Blog Post