Skip to content

Commit 1f48b05

Browse files
committed
Merge remote-tracking branch 'upstream/main' into rename
* upstream/main: MNT: BackgroundPlotter has no attribute named image (mne-tools#9318) [MRG, DOC] Remove CSD average reference note (mne-tools#9320)
2 parents e518c81 + 0afbf07 commit 1f48b05

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

examples/simulation/simulate_evoked_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
print(__doc__)
2323

2424
###############################################################################
25-
# Load real data as templates
25+
# Load real data as templates:
2626
data_path = sample.data_path()
2727

2828
raw = mne.io.read_raw_fif(data_path + '/MEG/sample/sample_audvis_raw.fif')

mne/preprocessing/_csd.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ def compute_current_source_density(inst, sphere='auto', lambda2=1e-5,
8383
8484
Notes
8585
-----
86-
This function applies an average reference to the data if copy is False.
87-
Do not transform CSD data to source space.
88-
8986
.. versionadded:: 0.20
9087
9188
References
@@ -98,6 +95,7 @@ def compute_current_source_density(inst, sphere='auto', lambda2=1e-5,
9895
if inst.info['custom_ref_applied'] == FIFF.FIFFV_MNE_CUSTOM_REF_CSD:
9996
raise ValueError('CSD already applied, should not be reapplied')
10097

98+
_validate_type(copy, (bool), 'copy')
10199
inst = inst.copy() if copy else inst
102100

103101
picks = pick_types(inst.info, meg=False, eeg=True, exclude=[])
@@ -143,8 +141,6 @@ def compute_current_source_density(inst, sphere='auto', lambda2=1e-5,
143141
raise ValueError('sphere radius must be greater than 0, '
144142
'got %s' % radius)
145143

146-
_validate_type(copy, (bool), 'copy')
147-
148144
pos = np.array([inst.info['chs'][pick]['loc'][:3] for pick in picks])
149145
if not np.isfinite(pos).all() or np.isclose(pos, 0.).all(1).any():
150146
raise ValueError('Zero or infinite position found in chs')

mne/viz/backends/_qt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ def show(self):
507507
with self._window_ensure_minimum_sizes():
508508
self.plotter.app_window.show()
509509
self._update()
510+
for plotter in self._all_plotters:
511+
plotter._render()
510512
self._process_events()
511513

512514

tutorials/forward/20_source_alignment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def add_head(renderer, points, color, opacity=0.95):
268268
# images. Here's what that would look like (we'll use the nasion landmark as a
269269
# representative example):
270270

271-
# Get the nasion
271+
# Get the nasion:
272272
nasion = [p for p in raw.info['dig'] if
273273
p['kind'] == FIFF.FIFFV_POINT_CARDINAL and
274274
p['ident'] == FIFF.FIFFV_POINT_NASION][0]

tutorials/inverse/90_phantom_4DBTi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
print("errors (mm) : %s" % errors)
6565

6666
###############################################################################
67-
# Plot the dipoles in 3D:
67+
# Plot the dipoles in 3D
6868
actual_amp = np.ones(len(dip)) # misc amp to create Dipole instance
6969
actual_gof = np.ones(len(dip)) # misc GOF to create Dipole instance
7070
dip = mne.Dipole(dip.times, pos, actual_amp, ori, actual_gof)

0 commit comments

Comments
 (0)