Skip to content

Commit

Permalink
Merge pull request open-ephys#74 from tne-lab/master
Browse files Browse the repository at this point in the history
Use correct # of channels for binary format memory-mapped file in Matlab
  • Loading branch information
aacuevas authored Jun 10, 2019
2 parents 551c884 + 5417bbe commit d73ec0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "npy-matlab"]
path = npy-matlab
url = git@github.com:kwikteam/npy-matlab.git
url = https://github.com/kwikteam/npy-matlab
6 changes: 3 additions & 3 deletions load_open_ephys_binary.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
contFile=fullfile(folder,'continuous.dat');
if (continuousmap)
file=dir(contFile);
samples=file.bytes/2/header.num_channels
D.Data=memmapfile(contFile,'Format',{'int16' [16 samples] 'mapped'})
samples=file.bytes/2/header.num_channels;
D.Data=memmapfile(contFile,'Format',{'int16' [header.num_channels samples] 'mapped'});
else
file=fopen(contFile);
D.Data=fread(file,[header.num_channels Inf],'int16');
Expand All @@ -108,7 +108,7 @@
group=char(f.getName());
if (strncmp(group,'TEXT',4))
%D.Data = readNPY(fullfile(folder,'text.npy'));
display('WARNING: TEXT files not supported by npy library');
warning('TEXT files not supported by npy library');
elseif (strncmp(group,'TTL',3))
D.Data = readNPY(fullfile(folder,'channel_states.npy'));
wordfile = fullfile(folder,'full_words.npy');
Expand Down

0 comments on commit d73ec0b

Please sign in to comment.