Conversation
Signed-off-by: Hargun Kaur <hargunkaur286@gmail.com>
Signed-off-by: Hargun Kaur <hargunkaur286@gmail.com>
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.
Hey @hargunkaur286 thanks a lot for this! Very nice approach, please see suggestions mostly around refactoring.
Signed-off-by: Hargun Kaur <hargunkaur286@gmail.com>
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 <hargunkaur286@gmail.com>
Signed-off-by: Hargun Kaur <hargunkaur286@gmail.com>
|
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 <hargunkaur286@gmail.com>
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 :) |
|
TODO: need to handle the case when no probe is loaded on the original recording |
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: