<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body link="#0563C1" vlink="#954F72"><p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB">Hi friends,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I have &nbsp;built a wrapper with mne to read and analyze data from the new Medtronic Percept implantable sensing enabled DBS device. The code is published here:
<a href="http://www.github.com/neuromodulation/icn_perceive">www.github.com/neuromodulation/icn_perceive</a>
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Unfortunately, handling correct dates is crucial for conversion into BIDS format. Everything was working fine in January. Now I have installed the code on a new machine and it creates the following issue:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw = ephys.mne_import_raw(raw_data.values.transpose() / 100000, list(raw_data.keys()), sfreq=sfreq,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">&nbsp;&nbsp; ...:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ch_types='seeg', meas_date=(meas_date.timestamp(), 0))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw.info['meas_date']<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">Out[38]: (1580223097.0, 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw.plot()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 3331, in run_code<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; exec(code_obj, self.user_global_ns, self.user_ns)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;&lt;ipython-input-39-f60196099aa7&gt;&quot;, line 1, in &lt;module&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; raw.plot()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\base.py&quot;, line 1378, in plot<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; show_scalebars=show_scalebars, verbose=verbose)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;&lt;decorator-gen-138&gt;&quot;, line 21, in plot_raw<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\viz\raw.py&quot;, line 336, in plot_raw<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; inds &#43;= [pick_types(info, meg=t, ref_meg=False, exclude=[])]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\pick.py&quot;, line 383, in pick_types<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; exclude = _check_info_exclude(info, exclude)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\pick.py&quot;, line 295, in _check_info_exclude<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; info._check_consistency()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\meas_info.py&quot;, line 693, in _check_consistency<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; % (prepend_error, repr(self['meas_date']),))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">RuntimeError: info[&quot;meas_date&quot;] must be a datetime object in UTC or None, got &quot;'(1580223097.0, 0)'&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw.info['meas_date']=None<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw.plot()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">Out[41]: &lt;Figure size 1600x825 with 4 Axes&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Now if I try to use the datetime object, the following error occurs:
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw = ephys.mne_import_raw(raw_data.values.transpose() / 100000, list(raw_data.keys()), sfreq=sfreq,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">&nbsp;&nbsp; ...:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ch_types='seeg', meas_date=meas_date)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">C:\Program Files\JetBrains\PyCharm Community Edition 2019.3\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_thrift.py:321: RuntimeWarning: Could not
 get size for self.info<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; value = format % v<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif">raw.plot()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\IPython\core\interactiveshell.py&quot;, line 3331, in run_code<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; exec(code_obj, self.user_global_ns, self.user_ns)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;&lt;ipython-input-49-f60196099aa7&gt;&quot;, line 1, in &lt;module&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; raw.plot()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\base.py&quot;, line 1378, in plot<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; show_scalebars=show_scalebars, verbose=verbose)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;&lt;decorator-gen-138&gt;&quot;, line 21, in plot_raw<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\viz\raw.py&quot;, line 336, in plot_raw<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; inds &#43;= [pick_types(info, meg=t, ref_meg=False, exclude=[])]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\pick.py&quot;, line 383, in pick_types<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; exclude = _check_info_exclude(info, exclude)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\pick.py&quot;, line 295, in _check_info_exclude<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; info._check_consistency()<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; File &quot;C:\code\Miniconda3\envs\icn\lib\site-packages\mne\io\meas_info.py&quot;, line 693, in _check_consistency<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp;&nbsp;&nbsp; % (prepend_error, repr(self['meas_date']),))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">RuntimeError: info[&quot;meas_date&quot;] must be a datetime object in UTC or None, got &quot;'datetime.datetime(2020, 1, 28, 15, 51, 37)'&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">C:\Program Files\JetBrains\PyCharm Community Edition 2019.3\plugins\python-ce\helpers\pydev\_pydevd_bundle\pydevd_thrift.py:321: RuntimeWarning: Could not
 get size for self.info<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red">&nbsp; value = format % v<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:red"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Any help is very much appreciated!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Best Julian from Berlin</span><span style="font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:#1000"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">____________<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">Prof. Dr. med. Wolf-Julian Neumann<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">Assistant Professor - Interventional and Cognitive Neuromodulation<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">Movement Disorder and Neuromodulation Unit<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">Department of Neurology &amp; Neuroradiology<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">Charité – Universitätsmedizin Berlin<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">T: &#43;49 30 450 660 359<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB">M: &#43;49 152 539 262 90<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:#1000"><a href="https://orcid.org/0000-0002-6758-9708"><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#0563C1;mso-fareast-language:EN-GB">https://orcid.org/0000-0002-6758-9708</span></a></span><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:#1000"><a href="https://osf.io/uyg8w/"><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#0563C1;mso-fareast-language:EN-GB">https://osf.io/uyg8w/</span></a></span><span lang="DE" style="font-size:8.0pt;font-family:&quot;Arial&quot;,sans-serif;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>