<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Hi Katarina,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
The fread command advances the file pointer. Therefore the 4 lines are reading consecutive values from the EDF file.</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<a href="https://www.mathworks.com/help/matlab/ref/fread.html?searchHighlight=fread&s_tid=doc_srchtitle#d122e421874:~:text=and%20positions%20the%20file%20pointer%20after%20the%20last%20value%20read">https://www.mathworks.com/help/matlab/ref/fread.html?searchHighlight=fread&s_tid=doc_srchtitle#d122e421874:~:text=and%20positions%20the%20file%20pointer%20after%20the%20last%20value%20read</a><br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
With that being said, some EDF export software (for better or for worse) set identical physical values if channels are switched off or for channels without physical units (ie. trigger channels or misc channels).</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
All the best,</div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
Simeon</div>
<div>
<div style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:10pt; color:#000000; font-family:Helvetica,Arial,sans-serif">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont; font-size:15px; margin:0px">
<br>
<table style="border-collapse:collapse; border:none">
<tbody>
<tr style="">
<td width="174" style="width:130.25pt; border:none; border-right:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt">
<div align="center" style="margin:0px 0cm 0.000133333px; font-size:11pt; font-family:Calibri,sans-serif; text-align:center">
<img class="EmojiInsert" style="max-width:100%" data-outlook-trace="F:1|T:1" src="cid:a581ee8a-f956-4ec0-896f-a88e64846b6f"><br>
</div>
</td>
<td width="346" style="width:259.6pt; border:none; padding:0cm 5.4pt 0cm 5.4pt">
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<b><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black">Simeon Wong</span></b><span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black"></span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black">Ibrahim Lab</span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black">Neurosciences & Mental Health</span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black"></span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<br>
</p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black">686 Bay Street, Toronto ON<span style="">
</span>M5G 0A4</span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:11pt; font-family:Calibri,sans-serif; margin-left:8.1pt; line-height:120%; text-autospace:none">
<span style="font-size:9.0pt; font-family:"Arial",sans-serif; color:black">P 416.813.7654<span style="">
</span>x303697</span></p>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> fieldtrip <fieldtrip-bounces@science.ru.nl> on behalf of Katarina Bendtz <katarina.bendtz@gmail.com><br>
<b>Sent:</b> November 18, 2020 12:50<br>
<b>To:</b> fieldtrip@science.ru.nl <fieldtrip@science.ru.nl><br>
<b>Subject:</b> [FieldTrip] Warning OPENEDF: Physical Minimum larger than Maximum\n</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">Dear experts:
<div class="">Me and my colleague at another university idependently I get this warning when we try to open an edf file:</div>
<div class=""><br class="">
</div>
<div class=""><span class="" style="color:rgb(3,47,98); font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-variant-ligatures:normal; orphans:2; white-space:pre; widows:2; background-color:rgb(255,255,255)">Warning OPENEDF: Physical
Minimum larger than Maximum</span><span class="x_pl-cce" style="box-sizing:border-box; color:rgb(3,47,98); font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-variant-ligatures:normal; orphans:2; white-space:pre; widows:2; background-color:rgb(255,255,255)">\n</span></div>
<div class=""><span class="x_pl-cce" style="box-sizing:border-box; color:rgb(3,47,98); font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-variant-ligatures:normal; orphans:2; white-space:pre; widows:2; background-color:rgb(255,255,255)"><br class="">
</span></div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div dir="auto" class="" style="text-align:start; text-indent:0px; word-wrap:break-word; line-break:after-white-space">
<div style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
I’m using fieldtrip 2020113. Looking at the source code
<blockquote type="cite" class=""><a href="https://urldefense.com/v3/__https://github.com/fieldtrip/fieldtrip/blob/master/private/openedf.m__;!!D0zGoin7BXfl!tHOzBhC87IDZICVPmzh1QeJQI1pBz7wzlyRm7uCUqe_WlgHxjVh2sShWYk0yjAhO9UAo$" class="">https://github.com/fieldtrip/fieldtrip/blob/master/private/openedf.m</a></blockquote>
<div><br class="">
</div>
I read:</div>
<div style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
<div>
<blockquote type="cite" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
</blockquote>
<div class="">
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)">if (any(EDF.PhysMin
>= EDF.PhysMax))</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)"><br class="">
</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)">fprintf(2,'Warning
OPENEDF: Physical Minimum larger than Maximum\n');</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)"><br class="">
</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)"><span class="x_Apple-tab-span" style="white-space:pre"></span>EDF.PhysMin
= EDF.DigMin;</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)"><br class="">
</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)">
EDF.PhysMax = EDF.DigMax;</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)"><br class="">
</span></font></div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)">end</span></font></div>
</div>
<div class="" style="orphans:2; widows:2"><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji" class=""><span class="" style="font-size:14px; background-color:rgb(255,255,255)"><br class="">
</span></font></div>
<div class="" style="orphans:2; widows:2">but then a couple of lines up, I see both EDF.PhysMin and EDF.PhysMax, (and also EDF.DigMin and EDF.DigMax) being set to the same thing:</div>
<div class="" style="orphans:2; widows:2"><br class="">
</div>
<div class="" style="orphans:2; widows:2">
<div class="">EDF.PhysMin= str2num(char(fread(EDF.FILE.FID,[8,EDF.NS],'char')'));</div>
<div class="">EDF.PhysMax= str2num(char(fread(EDF.FILE.FID,[8,EDF.NS],'char')'));</div>
<div class="">EDF.DigMin = str2num(char(fread(EDF.FILE.FID,[8,EDF.NS],'char')')); %</div>
<div class="">EDF.DigMax = str2num(char(fread(EDF.FILE.FID,[8,EDF.NS],'char')')); %</div>
<div class=""><br class="">
</div>
<div class="">So it is quite reasonable that I will get this warning. I’m puzzled. </div>
<div class=""><br class="">
</div>
<div class="">1. What’s purpose of this warning?</div>
<div class="">2. Why are the variables set to the same value?</div>
<div class="">3. Can I safely ignore this warning?</div>
<div class="">4. Or is there something I misunderstood.</div>
<div class=""><br class="">
</div>
<div class="">Thanks a lot,</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Kat</div>
</div>
<div class="" style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
</div>
<div style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
<br class="">
<b class="">Katarina Bendtz</b>, PhD<br class="">
Research Fellow<br class="">
Kreiman Lab<br class="">
Boston Children's Hospital<br class="">
Harvard University<br class="">
<br class="">
+1 (617) 390 45 16<br class="">
3 Blackfan Circle <br class="">
Boston, USA</div>
<div class="" style="color:rgb(0,0,0); letter-spacing:normal; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<br class="">
</div>
</div>
<br class="x_Apple-interchange-newline">
<br class="x_Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than
the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.<br>
</font>
</body>
</html>