Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ynic-public
brainstorm3
Commits
9f0071f1
Commit
9f0071f1
authored
Nov 13, 2019
by
Mark Hymers
Browse files
Fix import of channel comments
Signed-off-by:
Mark Hymers
<
mark.hymers@ynic.york.ac.uk
>
parent
96d0f103
Changes
1
Hide whitespace changes
Inline
Side-by-side
toolbox/io/in_fopen_megscan.m
View file @
9f0071f1
...
...
@@ -233,6 +233,9 @@ for iChan = 1:hdr.numberchannels
case
{
'ANALOG'
}
try
comment
=
h5readatt
(
DataFile
,[
'/config/channels/'
hdr
.
channelname
{
iChan
}
],
'mode'
);
if
iscell
(
comment
)
comment
=
char
(
comment
);
end
ChannelMat
.
Channel
(
iChan
)
.
Comment
=
comment
;
catch
disp
(
''
);
...
...
@@ -242,6 +245,9 @@ for iChan = 1:hdr.numberchannels
case
{
'DIGITAL'
}
try
comment
=
h5readatt
(
DataFile
,[
'/config/channels/'
hdr
.
channelname
{
iChan
}
],
'mode'
);
if
iscell
(
comment
)
comment
=
char
(
comment
);
end
ChannelMat
.
Channel
(
iChan
)
.
Comment
=
comment
;
catch
disp
(
''
);
...
...
@@ -254,7 +260,12 @@ for iChan = 1:hdr.numberchannels
%info = h5info(DataFile,'/geometry/eeg','TextEncoding','UTF-8');
points
=
h5read
(
DataFile
,
lower
([
'/geometry/eeg/'
hdr
.
channelname
{
iChan
}
'/location'
]))
.
/
1000
;
ChannelMat
.
Channel
(
iChan
)
.
Loc
=
points
(:,
1
)
'
;
ChannelMat
.
Channel
(
iChan
)
.
Comment
=
hdr
.
channelname
{
iChan
};
comment
=
hdr
.
channelname
{
iChan
}
if
iscell
(
comment
)
comment
=
char
(
comment
);
end
ChannelMat
.
Channel
(
iChan
)
.
Comment
=
comment
;
catch
disp
(
'No EEG locations'
)
...
...
@@ -267,7 +278,13 @@ for iChan = 1:hdr.numberchannels
try
ChannelMat
.
Channel
(
iChan
)
.
Loc
=
h5read
(
DataFile
,[
'/config/channels/'
hdr
.
channelname
{
iChan
}
'/position'
])
.
/
1000
;
%m
ChannelMat
.
Channel
(
iChan
)
.
Orient
=
h5read
(
DataFile
,[
'/config/channels/'
hdr
.
channelname
{
iChan
}
'/orientation'
]);
ChannelMat
.
Channel
(
iChan
)
.
Comment
=
h5read
(
DataFile
,[
'/config/channels/'
hdr
.
channelname
{
iChan
}
'/loop_shape'
]);
comment
=
h5read
(
DataFile
,[
'/config/channels/'
hdr
.
channelname
{
iChan
}
'/loop_shape'
]);
if
iscell
(
comment
)
comment
=
char
(
comment
);
end
ChannelMat
.
Channel
(
iChan
)
.
Comment
=
comment
;
catch
disp
([
'no orientation or location for '
hdr
.
channelname
{
iChan
}])
ChannelMat
.
Channel
(
iChan
)
.
Loc
=
[];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment