Skip to content

BUG: Fix bug extracting meas_date - #10277

Merged
agramfort merged 2 commits into
mne-tools:mainfrom
larsoner:nirstar
Feb 1, 2022
Merged

agramfort merged 2 commits into
mne-tools:mainfrom
larsoner:nirstar

Conversation

@larsoner

@larsoner larsoner commented Jan 31, 2022 •

Copy link
Copy Markdown
Member

Closes #10147

Turns out that localized dates is a pain in Python, and solving it in a general way requires a lot of work and/or additional dependencies. This implements a simpler solution: use a script to make a dict of translations and try them all. It's quick to execute, and easy enough to generate the dict of translations that we need.

@mlrocca feel free to try this branch (or just wait until it's merged into main and try that), it should fix your bug.

@rob-luke feel free to review and merge if you're happy

@agramfort agramfort left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rob-luke merge if happy

thx @larsoner

@hoechenberger

Copy link
Copy Markdown
Member

This is crazy!

And what about all other locales? Like, there must be dozens more?

@larsoner

larsoner commented Feb 1, 2022

Copy link
Copy Markdown
Member Author

Yes, there are many, many more locales. But we can deal with that later if we need to

@agramfort
agramfort merged commit d53c5bb into mne-tools:main Feb 1, 2022
@agramfort

Copy link
Copy Markdown
Member

let's move on here. thx @larsoner

@hoechenberger

hoechenberger commented Feb 1, 2022 •

Copy link
Copy Markdown
Member

Thanks @larsoner!
My comment was not meant to urge you to add more locales now, I was merely interested to know if there'd maybe need to be more in the future :)

@larsoner
larsoner deleted the nirstar branch February 1, 2022 14:49
@rob-luke

rob-luke commented Feb 1, 2022

Copy link
Copy Markdown
Member

Awesome! Thanks @larsoner

@mlrocca

mlrocca commented Feb 1, 2022 via email

Copy link
Copy Markdown

@larsoner

larsoner commented Feb 2, 2022

Copy link
Copy Markdown
Member Author

The easiest thing to do now that this has been merged is something like

pip install --upgrade https://github.com/mne-tools/mne-python/zipball/main

it will install the latest version of the main branch (1.0.dev0), where this PR was merged.

@mlrocca

mlrocca commented Feb 15, 2022 via email

Copy link
Copy Markdown

@larsoner

Copy link
Copy Markdown
Member Author

@mlrocca

mlrocca commented Feb 16, 2022 via email

Copy link
Copy Markdown

@rob-luke

Copy link
Copy Markdown
Member

Hi @mlrocca,

Exporting as nirx format is not something that is planned. The nirx format has been superseded by SNIRF as larsoner mentioned. New NIRX devices actually export as SNIRF natively now. Further, the nirx format is not documented and does not support exporting as OD or haemoglobin.

@mlrocca

mlrocca commented Feb 17, 2022 via email

Copy link
Copy Markdown

larsoner referenced this pull request in mne-tools/mne-testing-data Feb 17, 2022
@larsoner

Copy link
Copy Markdown
Member Author

@mlrocca this sounds more like a usage question, and we try to stick to code bugs and enhancement requests on GitHub. Could you please post your question to https://mne.discourse.group/ instead?

@mlrocca

mlrocca commented Feb 17, 2022 via email

Copy link
Copy Markdown

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.

add support for NIRStar 14.2 files

5 participants