-
Notifications
You must be signed in to change notification settings - Fork 15
Plot probe #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Plot probe #232
Conversation
Signed-off-by: Hargun Kaur <[email protected]>
Signed-off-by: Hargun Kaur <[email protected]>
This reverts commit f370435.
for more information, see https://pre-commit.ci
|
Thanks for this @hargunkaur286, just FYI due to the main developer of spikewrap being away, it may be some time until this can be reviewed. |
Hi @adamltyson, |
JoeZiminski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @hargunkaur286 thanks a lot for this! Very nice approach, please see suggestions mostly around refactoring.
Signed-off-by: Hargun Kaur <[email protected]>
1b63fe5 to
bad230a
Compare
|
Hello @JoeZiminski , I added a get_probe() method to the PreprocessedRun class, which returns a dictionary of probe objects indexed by shank ID (e.g. "grouped", "shank_0", etc.) like you suggested. Also, I moved the probe plotting logic to a new method Session.plot_probe() to ensure that all runs have consistent probe structures before plotting and it handles both grouped and per-shank cases. |
Signed-off-by: Hargun Kaur <[email protected]>
Signed-off-by: Hargun Kaur <[email protected]>
|
Hey @hargunkaur286 thanks a lot for this, this is looking good thanks also for the tests. Currently I'm on paternity leave so will not have time to review and test this in full prior to the GSoC deadline, of course do include this contribution in your application nonetheless. Some quick feedback, I would suggest removing all plotting functionality from the |
… plot logic from run Signed-off-by: Hargun Kaur <[email protected]>
Thanks a lot for the quick feedback, really appreciate it! I've updated the implementation to remove plotting logic from _preprocess_run and now handle all probe plotting/saving at the session level as suggested. Thank you again, and enjoy your paternity leave! Meanwhile, I'll try to solve other open issues :) |
Before submitting a pull request (PR), please read the contributing guide.
Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)
Description
What is this PR
Why is this PR needed?
This PR adds functionality to automatically generate and save probe plots using the ProbeInterface library. The probe plots are saved at the run level (in a dedicated
probe_plotsfolder) whensave_preprocessed()is run. In addition, a session-level function (plot_probe()) is exposed to quickly visualize the probe associated with the entire session.What does this PR do?
save_probe_plot()method in thePreprocessedRunclass which:get_probe()).probeinterface.plotting.plot_probewith the provided axis.probe_plots) within the run folder.save_preprocessed()method to automatically callsave_probe_plot()after saving the preprocessed recordings.plot_probe()function in theSessionclass.References
Fixes #197
How has this PR been tested?
python3 run_example.py.run-001_g0_imec0andrun-002_g0_imec0), a probe plot image (probe_plot.png) is created in the correspondingprobe_plotsfolder.Is this a breaking change?
If this PR breaks any existing functionality, please explain how and why.
Does this PR require an update to the documentation?
If any features have changed, or have been added. Please explain how the
documentation has been updated.
Checklist: