Articles on alexrockhill's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on alexrockhill's BlogenMon, 29 Aug 2022 20:45:30 +0000Week 11: Final Improvementshttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-11-final-improvements/<p>This week the short-term and long-term goals are coming together for the finished product. My Sphinx-Gallery PR to show which API entries are used in examples throughout the entire project was merged and added to MNE (https://github.com/mne-tools/mne-python/pull/10999). This was inspired by my initial confusion at where all the beamformer example code was documented and wanting a better understanding of which API entries were missing examples. The object-oriented widget abstraction (https://github.com/mne-tools/mne-python/pull/10913) was also merged which is similarly a high-level goal to streamline GUIs in MNE in general that tying into my project because I'm designing a GUI. For the shorter-term goals, my PR on doing time-frequency source estimation was merged (https://github.com/mne-tools/mne-python/pull/11095) enabling my last main project PR (https://github.com/mne-tools/mne-python/pull/10920) to be merged once I finish adding all the features I have time for since I finished the tests this week. I plan to prioritize adding features to the GUI to make it easier to see and more powerful to understand the data rather than working in the object-oriented widget abstraction (from above) since I think that will have more of an impact on the project but it would be nice to bring things full circle and implement the abstraction as well.</p>aprockhill206@gmail.com (alexrockhill)Mon, 29 Aug 2022 20:45:30 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-11-final-improvements/Week 10: Final Toucheshttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-10-final-touches/<p>I struggled much more than I thought on aligning the source coordinate frame to the T1 image. This was because the T1 image was moved from head-first supine to RAS in addition to its normal affine and the source estimate was already in RAS. This coordinate frame wrangling took longer than I had anticipated which meant the tests will be delayed until this week. I also need to fix the volume rendering. Now that the coordinate frame is solved, the basic deliverable GUI is functional! Although, I would like to clean things up a bit more, I'd consider this a successful GSoC (pending writing the tests, which shouldn't take too long).</p>aprockhill206@gmail.com (alexrockhill)Tue, 23 Aug 2022 01:15:25 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-10-final-touches/Week 9: Finishing Toucheshttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-9-finishing-touches/<p>The basic GUI works, hooray! I am just finishing up a few bugs and implementing the 3D viewer aspect before pushing. This week will be just about writing the tests and then the project will be finished.</p>aprockhill206@gmail.com (alexrockhill)Mon, 15 Aug 2022 22:45:44 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-9-finishing-touches/Week 8: Finishing Uphttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-8-finishing-up/<p>Drawing near to the end, the user interface is taking shape and getting it fully functional and writing the tests are the final items on the to do list. This week a lot of progress was made on the appearance and functionality of the user interface. By the end of this week, things should be fairly well wrapped up.</p>aprockhill206@gmail.com (alexrockhill)Tue, 09 Aug 2022 01:44:27 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-8-finishing-up/Week 7: Merging PRs and plugging alonghttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-7-merging-prs-and-plugging-along/<p>Finally, most of the beamformer code is working and issues are mostly resolved, which means that my focus has shifted to the user interface. I've made good progress on its development but don't yet have a working example although it's quite close. PRs that support this work have been or will soon be merged, including plotting complex-valued time-frequency objects, the widget abstraction (https://github.com/mne-tools/mne-python/pull/10913), adding provenance to time-frequency baseline corrections (https://github.com/mne-tools/mne-python/pull/10979), adding vector dynamic imaging of coherent sources (DICS) beamforming (https://github.com/mne-tools/mne-python/pull/10980) and computing cross-spectral density from time-frequency epochs (https://github.com/mne-tools/mne-python/pull/10986). Looking forward to having a snazzy new GUI soon!</p> <p>On a side note with broader-level project organization in mind, I added a PR to sphinx-gallery to make the coverage of API entries in examples (https://github.com/sphinx-gallery/sphinx-gallery/pull/983).</p>aprockhill206@gmail.com (alexrockhill)Tue, 02 Aug 2022 22:08:03 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-7-merging-prs-and-plugging-along/Week 6: Finished time-frequency example for multiple pipelines, wrapping up other PRshttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-6-finished-time-frequency-example-for-multiple-pipelines-wrapping-up-other-prs/<p>This week I finished the tutorial and function dependencies for the time-frequency source space estimation https://github.com/mne-tools/mne-python/pull/10920. There were quite a few complications and disagreements about best implementation within the MNE core development group which made it a bit trickier and more time-consuming than originally thought, but it seems like it turned out better from having more opinions from which to make a consensus. I am a bit behind on the GUI code but I will do that this week. The main reason for that is refactoring parts of MNE to accommodate for the GUI which I think are hugely important for making it maintainable in the long run: I consolidated mixin classes so that MNE time-series objects have more consistent operations https://github.com/mne-tools/mne-python/pull/10945, this will be great for the TFRSourceEstimate class so that it can inherit these capabilities. The backend abstraction PR now is (almost) ready to merge after sorting through some tricky dependency issues and is a really nice way to make MNE better at a higher level than just making the GUI https://github.com/mne-tools/mne-python/pull/10913. Fortunately, I talked to Dan about these changes and how they fit into the broader class refactoring he is funded to do next year and so they will be well-aligned to do that. This should be great it making this project much more forward-facing toward the cutting edge of MNE and not a part lagging change that just creates extra work down the road.</p>aprockhill206@gmail.com (alexrockhill)Mon, 25 Jul 2022 17:32:32 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-6-finished-time-frequency-example-for-multiple-pipelines-wrapping-up-other-prs/Week 5: Started on Time-Frequency Example, Vacationhttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-5-started-on-time-frequency-example-vacation/<p>I didn't get as much done this week because I was traveling but I did move into the meat of the project and made some good progress, especially with regards to starting the conversation on best practices for time-frequency transformations and estimation of source space activity https://github.com/mne-tools/mne-python/pull/10920. Specifically, we discussed linearly-constrained minimum variance (LCMV) beamformers compared to dynamic imaging of coherence sources (DICS) beamformers and how to unify a source estimation object. Once this object is complete, then the GUI development can begin to take place.</p>aprockhill206@gmail.com (alexrockhill)Mon, 18 Jul 2022 17:59:34 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-5-started-on-time-frequency-example-vacation/Week 4: Troubleshooting the backend but finally finishedhttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-4-troubleshooting-the-backend-but-finally-finished/<p>This week was a bit of a slog with the same PR (https://github.com/mne-tools/mne-python/pull/10913) as before, and although it's not the central focus of the project, I think it will greatly improve the maintainability and long-term adoption of this project within MNE because the backend is such a fundamental thing to all GUIs. I hope it might even be used outside of MNE, as I think it was a really worthwhile framework. This week will proceed onto the time-frequency source estimate aspects without any further ado. What ended up taking a long time was versioning issues with the dependencies and tweaks to make both the notebook and pyvistaqt backends look as similar as possible. Also, a lot of the functionality for notebook had not been implemented yet. Finally, it also took some time to implement the backend (partially) for mne.viz.Brain to troubleshoot parts that didn't work and show that it could be the framework for a GUI. This week, I am moving on to the new source space class definition which hopefully I will be able to finish tomorrow although I am on vacation Wednesday-Friday.</p>aprockhill206@gmail.com (alexrockhill)Mon, 11 Jul 2022 23:58:16 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-4-troubleshooting-the-backend-but-finally-finished/Week 3: MNE-Python Code Sprinthttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-3-mne-python-code-sprint/<p>This week I had a great code sprint in a transitioning role from sprint participant to more of a mentor which was really great. I helped Adie with her tutorial about importing and integrating objects from 3D Slicer into MNE https://github.com/mne-tools/mne-python/pull/10803. I also finished abstracting the backend code so that there are working examples for both the notebook and pyvistaqt backends for a wide range of widgets that covers those that are used in the MNE GUIs currently. I still have to refactor the GUIs to use these backends though. This has been quite a bit of work and isn't really the main thrust of the GSoC project but it is the low-level code that it depends on so it is really essential that it be done well for this project for its stability into the future. The added benefit is that it benefits all the other MNE GUIs as well and will make them much more portable across the two backends as well as opening up the possibility of adding new backends.</p>aprockhill206@gmail.com (alexrockhill)Tue, 05 Jul 2022 17:09:49 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-3-mne-python-code-sprint/Week 2: Laying Foundationshttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-2-laying-foundations/<p>In order to implement a successful user interface to do the time-frequency source space viewing, I thought it was necessary to synchronize among MNE GUIs so understanding the other GUIs well and working on the backend renderer was the theme for this week. First, I recorded a YouTube tutorial embedded in the documentation for the coregistration user interface https://github.com/mne-tools/mne-python/pull/10802. There were a few road blocks from failing CIs https://github.com/mne-tools/mne-python/pull/10825, https://github.com/mne-tools/mne-python/pull/10824 that had to be fixed as well. Then, the real workload was refactoring the backend so that it works on both notebook and pyvistaqt https://github.com/mne-tools/mne-python/pull/10803 for when the time-frequency viewer is added. This was quite a bit of work but is almost done, and cleans up the code tremendously.</p>aprockhill206@gmail.com (alexrockhill)Tue, 28 Jun 2022 18:02:32 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-2-laying-foundations/Week 1: First PR Planning, Getting Input from the Communityhttps://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-1-first-pr-planning-getting-input-from-the-community/<p>The first PR is done, there are just some failures of the CIs related to issues with updates in other packages https://github.com/mne-tools/mne-python/pull/10777! This PR abstracts the slice browser from the ieeg locate GUI so that it can be used in the time-frequency viewer. Instead of calling Qt widgets directly, another step (not in the timeline) that would be great would be to abstract the widgets so that they will work on either the Qt backend or a notebook backend. The original first PR plan has been discussed https://github.com/mne-tools/mne-python/issues/10721 but, after talking to Britta, the thought was to delay this a beat to see more what the GUI would look like and plan the input to match (as well as waiting for any progress of Dan's refactoring of TFR classes to harmonize with that).</p>aprockhill206@gmail.com (alexrockhill)Mon, 20 Jun 2022 20:03:23 +0000https://blogs.python-gsoc.org/en/alexrockhills-blog-copy-2/week-1-first-pr-planning-getting-input-from-the-community/