Skip to content

Commit

Permalink
Bugfix: Export MNE objects without warnings (unlock Info)
Browse files Browse the repository at this point in the history
  • Loading branch information
ftadel committed Dec 25, 2021
1 parent f1e96b8 commit f2c2557
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/license.html
Expand Up @@ -5,7 +5,7 @@
<body alink="#fff000" link="#fff000" vlink="#fff000">
<h4><span style="font-family: Arial Black; color: #ffffff;"><strong>THERE IS NO UNDO BUTTON - SET UP A BACKUP OF YOUR DATABASE</strong></span></h4>
<HR>
<!-- LICENCE_START -->Version: 3.211224 (24-Dec-2021)<br>
<!-- LICENCE_START -->Version: 3.211225 (25-Dec-2021)<br>
<span style="font-style: italic;">COPYRIGHT &copy; 2000-2021
USC &amp; McGill University.<br>
</span>
Expand Down
2 changes: 1 addition & 1 deletion doc/version.txt
@@ -1,2 +1,2 @@
% Brainstorm
% v. 3.211224 (24-Dec-2021)
% v. 3.211225 (25-Dec-2021)
7 changes: 6 additions & 1 deletion toolbox/io/out_mne_channel.m
Expand Up @@ -110,9 +110,12 @@
end
% Create info object
mneInfo = py.mne.create_info(ch_names, 1000, ch_types);
% Unlocking Info object
mneSetStatus = py.getattr(mneInfo, '__setstate__');
mneSetStatus(py.dict(pyargs('_unlocked', true)));
% Add Brainstorm version
bstver = bst_get('Version');
mneInfo{'creator'} = ['Brainstorm ', bstver.Version, ' (', bstver.Date ')'];
mneInfo{'hpi_meas'} = py.list(py.dict(pyargs('creator', ['Brainstorm ', bstver.Version, ' (', bstver.Date ')'])));


% ===== TRANSFORMATIONS =====
Expand Down Expand Up @@ -388,6 +391,8 @@
% Were the compensation data saved in calibrated form.
end

% Locking Info object again
mneSetStatus(py.dict(pyargs('_unlocked', false)));


end
Expand Down

0 comments on commit f2c2557

Please sign in to comment.