Skip to content

Commit

Permalink
Merge pull request #47 from bachlab/issue45_bug_get_viewpoints
Browse files Browse the repository at this point in the history
Fixes issue #45: changes in import_viewpoint function
  • Loading branch information
eozd committed Oct 22, 2019
2 parents 6374f3d + 98f6f57 commit b25ec0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Import/viewpoint/import_viewpoint.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
[channels, marker, chan_info] = parse_messages(messages, channels, marker, chan_info, file_info.eyesObserved);

sess_beg_indices = [find(contains(marker, '+')); size(dataraw, 1) + 1];

for sn = 1:numel(sess_beg_indices) - 1
begidx = sess_beg_indices(sn);
endidx = sess_beg_indices(sn + 1) - 1;
Expand Down
11 changes: 11 additions & 0 deletions src/pspm_get_viewpoint.m
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,17 @@
end

function import_cell = import_marker_chan(import_cell, markers, mi_names, mi_values, n_rows, sampling_rate)
% Put here all characters which do not belong to markers.
% They have to be separated by a '|'
non_markers = [',','|','+','|','='];

mi_names_tmp = regexprep(mi_names,non_markers,'');
non_empty = find(~cellfun('isempty',mi_names_tmp));

mi_names = mi_names(non_empty,1);
markers = markers(non_empty,1);
mi_values = mi_values(non_empty,1);

import_cell.marker = 'continuous';
import_cell.flank = 'ascending';
import_cell.sr = sampling_rate;
Expand Down

0 comments on commit b25ec0b

Please sign in to comment.