Skip to content

MRG: Clearer compensation - #3440

Merged
agramfort merged 6 commits into
mne-tools:masterfrom
larsoner:comp
Jul 21, 2016
Merged

agramfort merged 6 commits into
mne-tools:masterfrom
larsoner:comp

Conversation

@larsoner

Copy link
Copy Markdown
Member

Closes #3071.

Makes our compensation a bit clearer, and should fix a couple of small bugs related to it in maxwell_filter and some mne.layout functions.

Also deprecates the compensation parameter of read_raw_fif in favor of raw.apply_gradient_compensation, since really it 1) should be done separately, 2) should be able to be applied multiple times, and 3) be doable both for Raw and RawCTF (i.e., moved to _BaseRaw as a method).

@codecov-io

codecov-io commented Jul 19, 2016 •

Copy link
Copy Markdown

Current coverage is 86.73%

Merging #3440 into master will increase coverage by 0.02%

@@             master      #3440   diff @@
==========================================
  Files           339        339          
  Lines         58400      58512   +112   
  Methods           0          0          
  Messages          0          0          
  Branches       8889       8908    +19   
==========================================
+ Hits          50640      50751   +111   
  Misses         5079       5079          
- Partials       2681       2682     +1   

Sunburst

Powered by Codecov. Last updated by ca0ded3...543efcd

@larsoner

Copy link
Copy Markdown
Member Author

I'm killing the CIs because this will need rebase (again) after #3439, but they passed before

@larsoner larsoner added this to the 0.13 milestone Jul 19, 2016
@larsoner larsoner changed the title MRG: Clearer compensation WIP: Clearer compensation Jul 20, 2016
@larsoner

Copy link
Copy Markdown
Member Author

@agramfort I realized that we currently un-do any gradient compensation that was applied while writing, but I don't really think we should. mne_process_raw allows you to write out files with new compensation grades applied, so we might as well, too. I think it's an okay backward-incompatible change to make, since I doubt it has been widely used. Any reason it was done that way originally? It took some extra coding to get it that way...

@larsoner larsoner changed the title WIP: Clearer compensation MRG: Clearer compensation Jul 20, 2016
if inst.comp is not None:
current_comp = inst.compensation_grade
if current_comp not in (0, None):
raise RuntimeError('Maxwell filter cannot be done on compensated '

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.

indent pb

@agramfort

Copy link
Copy Markdown
Member

please update what's new

besides LGTM

@agramfort

Copy link
Copy Markdown
Member

oups you did it already.

merging

@agramfort
agramfort merged commit 90e9e9c into mne-tools:master Jul 21, 2016
@larsoner
larsoner deleted the comp branch July 21, 2016 18:46
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.

Bug in ctf readers

3 participants