Skip to content

Commit 51782ae

Browse files
committed
Make do_correction optional for KS2.5 and KS3
1 parent 14eb2db commit 51782ae

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

kilosort_no_license/kilosort2_5-compiled/ks2_5_compiled.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ function ks2_5_compiled(fpath)
1212
rez = preprocessDataSub(ops);
1313

1414
% NEW STEP TO DO DATA REGISTRATION
15-
rez = datashift2(rez, 1); % last input is for shifting data
15+
if isfield(ops, 'do_correction')
16+
fprintf("Drift correction ENABLED")
17+
do_correction = ops.do_correction;
18+
else
19+
do_correction = 1;
20+
end
21+
rez = datashift2(rez, do_correction); % last input is for shifting data
1622

1723
% ORDER OF BATCHES IS NOW RANDOM, controlled by random number generator
1824
iseed = 1;

kilosort_no_license/kilosort3-compiled/ks3_compiled.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ function ks3_compiled(fpath)
1212
rez = preprocessDataSub(ops);
1313

1414
% run data registration
15-
rez = datashift2(rez, 1); % last input is for shifting data
15+
if isfield(ops, 'do_correction')
16+
fprintf("Drift correction ENABLED")
17+
do_correction = ops.do_correction;
18+
else
19+
do_correction = 1;
20+
end
21+
rez = datashift2(rez, do_correction); % last input is for shifting data
1622

1723
[rez, st3, tF] = extract_spikes(rez);
1824

0 commit comments

Comments
 (0)