-
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
Expose save preprocessing in ks4 #3276
Expose save preprocessing in ks4 #3276
Conversation
@JoeZiminski this LGTM. @carlacodes were you able to test this? |
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.
LGTM; tested on my own data with ks 4.0.12
do_CAR, | ||
invert_sign, | ||
device, | ||
save_preprocesed_copy=save_preprocessed_copy, # this kwarg is correct (typo) |
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.
No way..... I have a feeling is is going to be fixed and then we will need another version just to account for this....
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 you need to reviow KS PRs ahahahah
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.
It's fixed as of 4.0.13 (MouseLand/Kilosort@633ee92).
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.
@JoeZiminski maybe we have to go back to positional arguments here? :)
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.
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.
Let's do that!
I've been using a locally modified version of SpikeInterface that exposes Does this PR have a chance of being merged (after the spelling is fixed)? |
This PR edits
kilosort4.py
to expose thesave_preprocessed_copy
parameter. Now,temp_wh.dat
is saveed to the sorting output andparams.py
is edited to pointphy
to thetemp_wh.dat.
@carlacodes if you have some time maybe you could check off this fork/branch this is behaving as expected? I tested with the below code:Test code
At present this is not tested in #3085 but that can be extended after this PR is merged.
More generally @alejoe91, at present
kilosort4.py
replicates the body ofrun_sorter.py
but as versions progress, this might prove difficult to maintain and requires a lot of testing e.g. #3085 to check nothing was missed. I wonder if long-term (assuming I am correct in thinking this is done to skip: preprocessing and drift correction), we can ask / work with KS4 team to expose options to skip preprocessing if they are interested. Then, we could just wrap therun_kilosort
function directly and testing would just be checking the kwargs are passed properly (rather than having to check the outputs). Maybe there are other considerations I have overlooked though, WDYT?