Skip to content
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

Problem when sorting multiple .bin files #148

Open
enelken opened this issue May 5, 2020 · 1 comment
Open

Problem when sorting multiple .bin files #148

enelken opened this issue May 5, 2020 · 1 comment

Comments

@enelken
Copy link

enelken commented May 5, 2020

Output of jrc version

JRCLUST v4.0.0-beta-p1 "Edward"

The command you used

jrc detect 2304_g3_t0.imec0.ap.prm

Console output

[LONG LIST]
.
.
.
2020-05-05 15:37:02 Finished load 2/2 (took 21.62 s)
2020-05-05 15:37:02 Finished processing file \poetry\Archive\Pixie\230420\2304_g6\2304_g6_t0.imec0.ap.bin (3/3) (took 40.90 s)
Error using reshape
To RESHAPE the number of elements must not change.

Error in jrclust.detect.DetectController/detect (line 107)
res.spikesRaw = reshape(fread(fid, inf, '*int16'), res.rawShape);

Error in JRC/detect (line 16)
dRes = obj.hDetect.detect();

Error in JRC/run (line 13)
obj.detect();

Error in jrc (line 20)
hJRC.run();

Origin of the bug

Lines 80 and on of detect.m:
% update rawShape, filtShape
if isempty(res.rawShape)
res.rawShape = recData.rawShape;
else
res.rawShape(3) = res.rawShape(3) + size(recData.rawShape, 3);
end
if isempty(res.filtShape)
res.filtShape = recData.filtShape;
else
res.filtShape(3) = res.filtShape(3) + size(recData.filtShape, 3);
end

The update of res.rawShape and res.filtShape is wrong - should be :
res.rawShape(3) = res.rawShape(3) + recData.rawShape(3);
...and similarly for res.filtShape.
After this correction, the program works fine.

Eli Nelken

@aliddell
Copy link
Collaborator

Hi Eli! Thanks for catching this. Can you submit a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants