mne.
Dipole
(times, pos, amplitude, ori, gof, name=None)¶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__ () |
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 as arrows |
save (fname) |
Save dipole in a .dip file |
__getitem__
(item)¶Get a time slice
Parameters: | item : array-like or slice
|
---|---|
Returns: | dip : instance of Dipole
|
__hash__
() <==> hash(x)¶__len__
()¶The number of dipoles
Returns: | len : int
|
---|
Examples
This can be used as:
>>> len(dipoles)
10
copy
()¶Copy the Dipoles object
Returns: | dip : instance of Dipole
|
---|
crop
(tmin=None, tmax=None)¶Crop data to a given time interval
Parameters: | tmin : float | None
tmax : float | None
|
---|
plot_amplitudes
(color='k', show=True)¶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='cone', scale_factor=0.01, colors=None, verbose=None)¶Plot dipole locations as arrows
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 : tuple of length 2
fig_size : tuple of length 2
mode : str
scale_factor : float
colors: list of colors | None
verbose : bool, str, int, or None
|
---|---|
Returns: | fig : instance of mlab.Figure
|
save
(fname)¶Save dipole in a .dip file
Parameters: | fname : str
|
---|