-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update values to int64 #13548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update values to int64 #13548
Conversation
|
To read your file it needs a few more fixes actually... I'll push |
|
@teonbrooks I'm done pushing/looking for now, I hope the changes I made help debugging a bit more. Something is wrong with |
|
thanks @larsoner! came across this post and adding it here for reference in the future |
according to the link above, it looks like this is not an uncommon occurrence:
it looks like n_samples should be calculated as: |
|
Great, can you add some comments / links in the code for the next time we dig into this, and try the suggested fix? |
|
added a note. after trying it out and I look more closely at the code, it looks as though the n_samples logic is already there starting at https://github.com/mne-tools/mne-python/blob/main/mne/io/cnt/cnt.py#L339. |
a5c1f92 to
603dd01
Compare
|
I actually don't know what to do about the |
603dd01 to
66c24ca
Compare
|
@teonbrooks do you want me to take a look?
So we have two potential sources of truth:
In If so, maybe we should prefer to use (2) if it's available, since it's more likely to be correct. We could add some parameter to control which of these to prefer, too, if needed. We can even make it like |
|
@larsoner, yes, that would be a great help if you could take a look at it. and yep, I agree with your assessment on the number of samples |
66c24ca to
74d66ba
Compare
* upstream/main: BUG: Fix bug with error message check (mne-tools#13579) Add QC + Full MNE Report tutorial (mne-tools#13532) FIX: adding kit_system_id info to forward solution (mne-tools#13520) MAINT: Update code credit (mne-tools#13572) MAINT: Fix Circle (mne-tools#13574) DOC: Clarify read_raw_nirx expects directory path, not file path (mne-tools#13541)
|
Yikes this is a bit of a nightmare. Looks like in the header for
So when I said before:
I'm no longer convinced this is a good idea, given it's not even the case for our test datasets! To make things worse, all of this stuff interacts with
Also, looking at the docs from https://paulbourke.net/dataformats/eeg/, their example file has the data offset (SETUP+ELECTLOC) at @withmywoessner you've worked on this stuff a bit recently... WDYT? |
this was exactly where I got stumped as well! trying to understand this gave me a massive headache 🤕 For setting the |
Yeah I think so. It's not great but I think it's probably better that they be explicit. Hopefully it's pretty obvious by eye, your data looked completely wrong for |

Fix attempt as fixing the overflow issue in the
read_raw_cntreader. This error has manifested with numpy upgrade.Reference issue
Fixes #13547.
What does this implement/fix?
This follows a pattern suggested in #12907 to cast the integer to int64.