Skip to content
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

[MRG, IO] Persyst reader into Raw object #8176

Merged
merged 31 commits into from
Sep 6, 2020
Merged

Conversation

adam2392
Copy link
Member

@adam2392 adam2392 commented Aug 31, 2020

Reference issue

Closes: #8173

What does this implement/fix?

Adds a Persyst reader for .lay + .dat file combinations and unit tests.

Note:

  • birthdate and measurement date is not a strict adherence sometimes when output by Persyst. I am not sure why... but things like 16-Nov-199 obviously probably stands for nov 16th, 1992 based on the data, but not sure why it gets output funky. I'm assuming these things can change with Persyst versions without our knowing.

With that being said though, the data format and such seems like it shouldn't change all of a sudden.

Additional information

Updates the testing repo to: mne-tools/mne-testing-data#73

@adam2392 adam2392 changed the title Persyst [WIP] Persyst reader into Raw object Aug 31, 2020
@adam2392
Copy link
Member Author

adam2392 commented Sep 2, 2020

This is ready for review/merge on my end.

I am not sure why that final CI test failed. It says it has to do with unpacking the tar file(?)

@adam2392 adam2392 changed the title [WIP] Persyst reader into Raw object [MRG, IO] Persyst reader into Raw object Sep 2, 2020
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Looks like it's close to done, despite a number of comments/ideas I've written!

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

looks good !

@adam2392 you should also see then how mne-bids allows you to write such files in bids

@adam2392
Copy link
Member Author

adam2392 commented Sep 3, 2020

This should be good to go assuming the CIs turn green and @larsoner is okay with my changes to address his comments :). Thanks!

@adam2392
Copy link
Member Author

adam2392 commented Sep 3, 2020

Just wanted to confirm that this is "good to go", possibly waiting for some additional CI test from @larsoner in #8210?

I am a bit noob in understanding what _mult_cal_one does, but I presume it works since it passed the _test_raw tests :p.

@larsoner
Copy link
Member

larsoner commented Sep 4, 2020

Yes let's wait for #8210. I just got it working (I think!). Do you want me to push a merge commit once #8210 is in master so we can see if everything is good here?

@larsoner larsoner added this to the 0.21 milestone Sep 4, 2020
@larsoner
Copy link
Member

larsoner commented Sep 4, 2020

Looks like the channel with index 55 (name 'pol $tp9') has values all right around [-0.01200273], was this a bad channel during the recording or something?

@adam2392
Copy link
Member Author

adam2392 commented Sep 4, 2020

Looks like the channel with index 55 (name 'pol $tp9') has values all right around [-0.01200273], was this a bad channel during the recording or something?

That is a byproduct of some center's recording systems I work with. So a rule of thumb I've come to realize is that if there is a $ sign, then it most likely means its a dead channel (not connected, or used as REF, etc.)

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

@larsoner merge if you're happy

@larsoner larsoner merged commit 1cda89a into mne-tools:master Sep 6, 2020
@larsoner
Copy link
Member

larsoner commented Sep 6, 2020

Thanks @adam2392 !

larsoner added a commit to libertyh/mne-python that referenced this pull request Sep 9, 2020
* upstream/master: (489 commits)
  MRG, DOC: Fix ICA docstring, add whitening (mne-tools#8227)
  MRG: Extract measurement date and age for NIRX files (mne-tools#7891)
  Nihon Kohden EEG file reader WIP (mne-tools#6017)
  BUG: Fix scaling for src_mri_t in coreg (mne-tools#8223)
  MRG: Set pyvista as default 3d backend (mne-tools#8220)
  MRG: Recreate our helmet graphic (mne-tools#8116)
  [MRG] Adding get_montage for montage to BaseRaw objects (mne-tools#7667)
  ENH: Allow setting tqdm backend (mne-tools#8177)
  [MRG, IO] Persyst reader into Raw object (mne-tools#8176)
  MRG, BUG: Fix errors in IO/loading/projectors (mne-tools#8210)
  MAINT: vectorize _read_annotations_edf (mne-tools#8214)
  FIX : events_from_annotation when annotations.orig_time is None and f… (mne-tools#8209)
  FIX: do not project to sphere; DOC - explain how to get EEGLAB-like topoplots (mne-tools#7455)
  [MRG, DOC] Added linear algebra of transform to doc (mne-tools#7087)
  FIX: Travis failure on python3.8.1 (mne-tools#8207)
  BF: String formatting in exception message (mne-tools#8206)
  BUG: Fix STC limit bug (mne-tools#8202)
  MRG, DOC: fix ica tutorial (mne-tools#8175)
  CSP component order selection (mne-tools#8151)
  MRG, ENH: Add on_missing to plot_events (mne-tools#8198)
  ...
@larsoner larsoner mentioned this pull request Oct 10, 2020
marsipu pushed a commit to marsipu/mne-python that referenced this pull request Oct 14, 2020
* Initial commit.

* Initial persyst commit.

* Making reader work.

* Adding example.

* removing extra diff.

* removing white space?

* removing white space?

* Trying to fix flake8.

* Fix pydocstyle.

* fixing typo.

* Adding updated section for persyst.

* Fix pep.

* Fixing example docstring.

* Removing example.

* Unit testing passed.

* Fixing unit test.

* Adding updated tests.

* Making changes suggested by larsoner.

* Update mne/io/persyst/tests/test_persyst.py

Co-authored-by: Eric Larson <[email protected]>

* Update mne/io/persyst/tests/test_persyst.py

Co-authored-by: Eric Larson <[email protected]>

* Fixing cal.

* Adding updated persyst.

* Remove unused line.

* Update mne/io/persyst/persyst.py

Co-authored-by: Eric Larson <[email protected]>

* Fixing dictionary mapping.

* Adding updated doc.

* Fixing pep.

* Fixing subject map.

* Keeping channels upper case.

* Fixing coverage.

* Fix docstring.

Co-authored-by: Eric Larson <[email protected]>
@adam2392 adam2392 deleted the persyst branch October 30, 2020 16:06
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.

Reading in Persyst (.lay/.dat) files into Raw
3 participants