-
Notifications
You must be signed in to change notification settings - Fork 191
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
Allow relative path for export_to_phy
#2041
Conversation
Will this have the same behavior as our spikeinterface/src/spikeinterface/core/base.py Lines 306 to 327 in ff1b8cd
If that's the case, maybe the name and behavior should be the same? Or, if it is different, maybe we should add a note in the docstring indicating how it behaves differently from |
@alejoe91 just suggested propagating the idea from the So that's why I did that, but happy to change. The only change I made is to change the Path for the binary file for Phy to look for. I don't think it should actually affect any SpikeInterface machinery, but definitely correct me I'm happy to add more documentation or change the argument name. |
@zm711 @h-mayorquin let's use |
@@ -64,6 +65,8 @@ def export_to_phy( | |||
Dtype to save binary data | |||
verbose: bool | |||
If True, output is verbose | |||
use_relative_path : bool, default: False |
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.
Can you exapnd on this. When you say "saves the dat_path
as a relative path, ... "
I am kind of expecting that there is something after, relative to what?
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.
@h-mayorquin. Great point, that is a lazy docstring. I'll fix that shortly just got to lab so need to set up for the day.
@alejoe91 @zm711 A general question I have here is: |
@h-mayorquin So the way phy works is it needs to extract waveforms from a binary file. In this case we have the binary file I'll let @alejoe91 answer:
|
@h-mayorquin As we move more into server/cloud/remote computing patforms, I think it makes total sense to make |
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.
@zm711 I noticed one thing. In case copy_binary
is False
, but the recording is already binary, we should get the relative path to the phy output folder. Right?
Co-authored-by: Alessio Buccino <[email protected]>
@zm711 Thanks a lot for the explanation about how phy works at that level. This was very useful for me. |
Any way we can test this by the way? |
phy does have a command something like |
So here is the test they use on phy for |
I think what we could do is actually run the test using phylib. We can read in all the |
I think that is better if @alejoe91 decides how to handle this as I am unfamiliar with that module. He probably knows what standards and type of tesing we want to (and can) have there. |
Yeah I wouldn't start messing with qt dependencies in tests. Let's leave it as is for now and maybe open an issue to add phylib tests later on! |
Co-authored-by: Garcia Samuel <[email protected]>
for more information, see https://pre-commit.ci
@alejoe91 The test failure is a problem with
It's also occurred in |
@zm711 let me fix the failing test real quick! sorry about that |
No worries. :) Better to find failing tests sooner rather than later. Thanks for the fix. |
This adds another argument to
export_to_phy
to allow for just therecording.dat
to be given as thedat_path
(ie the behavior found in KS1 and KS2) with a default of False (current SI behavior as well as the standard behavior of KS2.5 and KS3).For #2021.