mne.Dipole(times, pos, amplitude, ori, gof, name=None)[source]¶Dipole class for sequential dipole fits.
Note
This class should usually not be instantiated directly,
instead mne.read_dipole() should be used.
Used to store positions, orientations, amplitudes, times, goodness of fit of dipoles, typically obtained with Neuromag/xfit, mne_dipole_fit or certain inverse solvers. Note that dipole position vectors are given in the head coordinate frame.
| Parameters: | times : array, shape (n_dipoles,)
pos : array, shape (n_dipoles, 3)
amplitude : array, shape (n_dipoles,)
ori : array, shape (n_dipoles, 3)
gof : array, shape (n_dipoles,)
name : str | None
|
|---|
See also
Notes
This class is for sequential dipole fits, where the position
changes as a function of time. For fixed dipole fits, where the
position is fixed as a function of time, use mne.DipoleFixed.
Methods
__getitem__(item) |
Get a time slice. |
__hash__() <==> hash(x) |
|
__len__() |
Return the number of dipoles. |
copy() |
Copy the Dipoles object. |
crop([tmin, tmax]) |
Crop data to a given time interval. |
plot_amplitudes([color, show]) |
Plot the dipole amplitudes as a function of time. |
plot_locations(trans, subject[, …]) |
Plot dipole locations in 3d. |
save(fname) |
Save dipole in a .dip file. |
__getitem__(item)[source]¶Get a time slice.
| Parameters: | item : array-like or slice
|
|---|---|
| Returns: | dip : instance of Dipole
|
__hash__() <==> hash(x)¶__len__()[source]¶Return the number of dipoles.
| Returns: | len : int
|
|---|
Examples
This can be used as:
>>> len(dipoles)
10
copy()[source]¶Copy the Dipoles object.
| Returns: | dip : instance of Dipole
|
|---|
crop(tmin=None, tmax=None)[source]¶Crop data to a given time interval.
| Parameters: | tmin : float | None
tmax : float | None
|
|---|
plot_amplitudes(color=’k’, show=True)[source]¶Plot the dipole amplitudes as a function of time.
| Parameters: | color: matplotlib Color
show : bool
|
|---|---|
| Returns: | fig : matplotlib.figure.Figure
|
plot_locations(trans, subject, subjects_dir=None, bgcolor=(1, 1, 1), opacity=0.3, brain_color=(1, 1, 0), fig_name=None, fig_size=(600, 600), mode=None, scale_factor=0.01, colors=None, coord_frame=’mri’, idx=’gof’, show_all=True, ax=None, block=False, show=True, verbose=None)[source]¶Plot dipole locations in 3d.
Warning
Using mode with option ‘cone’ or ‘sphere’ will be deprecated in version 0.15.
| Parameters: | trans : dict
subject : str
subjects_dir : None | str
bgcolor : tuple of length 3
opacity : float in [0, 1]
brain_color : tuple of length 3
fig_name : str
fig_size : tuple of length 2
mode : str
scale_factor : float
colors: list of colors | None
coord_frame : str
idx : int | ‘gof’ | ‘amplitude’
show_all : bool
ax : instance of matplotlib Axes3D | None
block : bool
show : bool
verbose : bool, str, int, or None
|
|---|---|
| Returns: | fig : instance of mlab.Figure or matplotlib Figure
|
Notes
New in version 0.9.0.