-
Notifications
You must be signed in to change notification settings - Fork 186
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
Motion correction error: win_step_um=400.0/win_margin_um=-200.0 are too large for the probe size #3458
Comments
Can you paste the entire error? |
Sure! Please see below, thanks for the help Exception Traceback (most recent call last) File ~/miniconda3/envs/spikeinterface/lib/python3.9/site-packages/spikeinterface/preprocessing/motion.py:436, in correct_motion(recording, preset, folder, output_motion, output_motion_info, overwrite, detect_kwargs, select_kwargs, localize_peaks_kwargs, estimate_motion_kwargs, interpolate_motion_kwargs, **job_kwargs) File ~/miniconda3/envs/spikeinterface/lib/python3.9/site-packages/spikeinterface/sortingcomponents/motion/motion_estimation.py:111, in estimate_motion(recording, peaks, peak_locations, direction, rigid, win_shape, win_step_um, win_scale_um, win_margin_um, method, extra_outputs, progress_bar, verbose, margin_um, **method_kwargs) File ~/miniconda3/envs/spikeinterface/lib/python3.9/site-packages/spikeinterface/sortingcomponents/motion/dredge.py:116, in DredgeApRegistration.run(cls, recording, peaks, peak_locations, direction, rigid, win_shape, win_step_um, win_scale_um, win_margin_um, verbose, progress_bar, extra, **method_kwargs) File ~/miniconda3/envs/spikeinterface/lib/python3.9/site-packages/spikeinterface/sortingcomponents/motion/dredge.py:310, in dredge_ap(recording, peaks, peak_locations, direction, rigid, win_shape, win_step_um, win_scale_um, win_margin_um, bin_um, bin_s, max_disp_um, time_horizon_s, mincorr, do_window_weights, weights_threshold_low, weights_threshold_high, mincorr_percentile, mincorr_percentile_nneighbs, amp_scale_fn, post_transform, histogram_depth_smooth_um, histogram_time_smooth_s, avg_in_bin, thomas_kw, xcorr_kw, device, progress_bar, extra_outputs, precomputed_D_C_maxdisp) File ~/miniconda3/envs/spikeinterface/lib/python3.9/site-packages/spikeinterface/sortingcomponents/motion/motion_utils.py:312, in get_spatial_windows(contact_depths, spatial_bin_centers, rigid, win_shape, win_step_um, win_scale_um, win_margin_um, zero_threshold) Exception: get_spatial_windows(): win_step_um=400.0/win_scale_um=400.0/win_margin_um=-200.0 are too large for the probe size (depth range=705.0). You can try to reduce them or use rigid motion. |
For small probe you should try rigid motion correction, if you think you really need non rigid then you should lower |
Hi @desaponte for NP2.4, I'd recommend a couple of things. First off, I've had the best results when doing motion correction on each shank separately -- you may already be doing that, not sure. Second, if Sam's suggestion of using rigid motion doesn't suit your needs, there are parameters recommended for that probe in the DREDge paper which you can check out -- that would just mean setting |
Hello!
I'm following the spike interface tutorial on testing different motion correctors on my NP2 4 shank recording.
The kilosort-like correction works..... but when I run dredge , I get a probe size issue.
The text was updated successfully, but these errors were encountered: