-
Notifications
You must be signed in to change notification settings - Fork 193
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
Can't interpolate traces with dtype('int16') #3404
Comments
could you post your full spikeinterface script? Kilosort 1-3 require int16. I think KS4 can handle not int16, but still prefers int16. So our wrappers should handle this. |
|
As the error suggests, the interpolation part of the
Honestly I think we should do this by default even if the input is int16 and I find the current behavior pretty annoying! @samuelgarcia what do you think? |
@jackrwaters sorry I read too quickly! You could do this: cast to float, run correct motion, and then use the astype to recast to int16. Can you give it a try? |
Hey Alessio shouldn't we just convert with |
That is done for KS1-3, but KS4 accepts floats too so we shouldn't cast to int16 IMO |
It might be better to check the |
Hello!
I've been having the same error as was seen in [https://github.com//issues/3146#issue-2391280072](this thread). I was happy to switch to float32, as they did, but it seems like this is causing problems further down in our processing chain with Phy. We are running Kilosort4 from SI after performing motion correction—what's the best course of action for us? Should we somehow convert our data back to int16 prior to running kilosort?
Traceback (most recent call last):
File "----------", line 122, in
rec_corrected, motion_info = si.correct_motion(rec, preset='nonrigid_accurate', interpolate_motion_kwargs={'border_mode':'force_extrapolate'},folder=result_folder, output_motion_info=True)
File "---------/miniconda3/envs/kilosort/lib/python3.9/site-packages/spikeinterface/preprocessing/motion.py", line 433, in correct_motion
recording_corrected = InterpolateMotionRecording(recording, motion, **interpolate_motion_kwargs)
File "-----------/miniconda3/envs/kilosort/lib/python3.9/site-packages/spikeinterface/sortingcomponents/motion/motion_interpolation.py", line 346, in init
raise ValueError(f"Can't interpolate traces of recording with non-floating dtype={recording.dtype=}.")
ValueError: Can't interpolate traces of recording with non-floating dtype=recording.dtype=dtype('int16').
srun: error: gpu-n40: task 0: Exited with exit code 1
The text was updated successfully, but these errors were encountered: