Skip to content

Conversation

@qian-chu
Copy link
Contributor

@qian-chu qian-chu commented Dec 30, 2025

Reference issue (if any)

Fixes #13555 and #13567.

What does this implement/fix?

Bug 1 (#13555):

When a recording block is completely empty, it seems that channel names cannot be parsed properly, leading to subsequent error in setting channel-specific annotations.

Solutions in progress (need to first understand how empty block data is handled).

Bug 2 (#13567)

When a recording block starts with missing data, the status column is not present until actual data is present:

889502	   .	   .	    0.0
889503	   .	   .	    0.0
889504	  916.5	  575.5	  655.0	...
889505	  916.3	  575.2	  655.0	...

While it does not prevent the block to be read into a DataFrame (with four columns, in this case), the status column would start with None instead of any subscriptable string, causing a TypeError.

The fix instead gets the first valid value to infer if the column is status or not. Further, it updates the method to infer if the first value is numeric by trying to convert it to float.

Question: If not len(first_value) in [3, 5, 13, 17], should the code emit a warning/error to contact MNE developers?

Minor fixes
  1. Correct typo ("occular" -> "ocular")
  2. if "PUPIL" in units, warn "Raw pupil position data detected" instead of "Raw eyegaze coordinates detected".

Additional information

Apparently, testing data that reflects such edge cases is needed. @scott-huberty suggested modiying _simulate_eye_tracking_data (which is already simulating multi-block data)

@qian-chu
Copy link
Contributor Author

Just noticed that #13550 and #13555 are also related. It seems the two problems are complementary - users will want to discard any empty recording block AND read blocks with an empty start

@qian-chu qian-chu changed the title Fix read_raw_eyelink() failure when status column starts with empty values Fix read_raw_eyelink() failure when recording blocks are empty or starting with empty values Jan 2, 2026
@qian-chu qian-chu marked this pull request as draft January 2, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants