Skip to content

Commit

Permalink
DOC
Browse files Browse the repository at this point in the history
  • Loading branch information
christianbrodbeck committed Nov 5, 2021
1 parent bd156cf commit fb0454e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
4 changes: 3 additions & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ Changes
New in 0.37
-----------

* ICA-GUI (:func:`gui.select_components`): Sort noisy epochs by dominant components - makes it easier to find components that capture specific artifacts
* ICA-GUI (:func:`gui.select_components`): Sort noisy epochs by dominant components - makes it easier to find components that capture specific artifacts.
* API: :func:`load.fiff.events` now loads events from all stim-channels. To use a subset, use the ``stim_channel`` parameter.
* New plot: :class:`plot.SensorMap3d`.
* New function :func:`set_connectivity` to set the neighborhood structure of an :class:`NDVar`.
* :class:`MneExperiment`:

- :meth:`MneExperiment.plot_evoked`: plot sensor data with corresponding source estimates
Expand Down
48 changes: 27 additions & 21 deletions doc/experiment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ to delete them automatically without interrupting initialization.
:class:`MneExperiment` caches various intermediate results. By default, if a
change in the experiment definition would make cache files invalid, the outdated
files are automatically deleted. Set :attr:`auto_delete_cache` to ``'ask'`` to
files are automatically deleted. Set :attr:`.auto_delete_cache` to ``'ask'`` to
ask for confirmation before deleting files. This can be useful to prevent
accidentally deleting files that take long to compute when editing the pipeline
definition.
Expand All @@ -371,6 +371,15 @@ When using this option, set :attr:`MneExperiment.screen_log_level` to
Determines the amount of information displayed on the screen while using
an :class:`MneExperiment` (see :mod:`logging`).

.. py:attribute:: MneExperiment.defaults : Dict[str, str]
The defaults dictionary can contain default settings for
experiment analysis parameters (see :ref:`state-parameters`), e.g.::

defaults = {'epoch': 'my_epoch',
'cov': 'noreg',
'raw': '1-40'}


Finding files
-------------
Expand All @@ -385,40 +394,30 @@ Folder name for the raw data directory. By default, this is ``meg``, i.e., the e

.. py:attribute:: MneExperiment.subject_re : str
Subjects are identified on initialization by looking for folders in the data directory (``meg`` by default) whose name matches the :attr:`MneExperiment.subject_re` regular expression. By default, this is ``'(R|A|Y|AD|QP)(\d{3,})$'``, which matches R-numbers like ``R1234``, but also numbers prefixed by ``A``, ``Y``, ``AD`` or ``QP`` (for information about how to define a different regular expression, see :mod:`re`).
Subjects are identified on initialization by looking for folders in the data directory (``meg`` by default) whose name matches the :attr:`.MneExperiment.subject_re` regular expression. By default, this is ``'(R|A|Y|AD|QP)(\d{3,})$'``, which matches R-numbers like ``R1234``, but also numbers prefixed by ``A``, ``Y``, ``AD`` or ``QP`` (for information about how to define a different regular expression, see :mod:`re`).


Reading files
-------------

.. note::
Gain more control over reading files through adding a :class:`RawPipe` to :attr:`MneExperiment.raw`.

.. py:attribute:: MneExperiment.stim_channel : str | Sequence of str
By default, events are loaded from all stim channels; use this parameter to restrict events to one or several stim channels.

.. py:attribute:: MneExperiment.merge_triggers : int
Use a non-default ``merge`` parameter for :func:`load.fiff.events`.
Use a non-default ``merge`` parameter for :func:`.load.fiff.events`.

.. py:attribute:: MneExperiment.trigger_shift : float | Dict[str, float]
Set this attribute to shift all trigger times by a constant (in seconds). For example, with ``trigger_shift = 0.03`` a trigger that originally occurred 35.10 seconds into the recording will be shifted to 35.13. If the trigger delay differs between subjects, this attribute can also be a dictionary mapping subject names to shift values, e.g. ``trigger_shift = {'R0001': 0.02, 'R0002': 0.05, ...}``.

.. py:attribute:: MneExperiment.meg_system : str
Specify the MEG system used to acquire the data so that the right sensor neighborhood graph can be loaded. This is usually automatic, but is needed for KIT files convert with with :mod:`mne` < 0.13. Equivalent to the ``sysname`` parameter in :func:`load.fiff.epochs_ndvar` etc. For example, for data from NYU New York, the correct value is ``meg_system="KIT-157"``.


Defaults
--------

.. py:attribute:: MneExperiment.defaults : Dict[str, str]
The defaults dictionary can contain default settings for
experiment analysis parameters (see :ref:`state-parameters`), e.g.::

defaults = {'epoch': 'my_epoch',
'cov': 'noreg',
'raw': '1-40'}
Specify the MEG system used to acquire the data so that the right sensor neighborhood graph can be loaded. This is usually automatic, but is needed for KIT files convert with with :mod:`mne` < 0.13. Equivalent to the ``sysname`` parameter in :func:`.load.fiff.epochs_ndvar` etc. For example, for data from NYU New York, the correct value is ``meg_system="KIT-157"``.


Pre-processing (raw)
Expand Down Expand Up @@ -469,8 +468,11 @@ To use ``raw --> TSSS --> 1-40 Hz band-pass --> ICA``, select ``e.set(raw="ica")
>>> e.rm('cached-raw-file', True, raw='1-40')


Event variables
---------------
Events
------

.. note::
Gain more control over events through overriding :meth:`MneExperiment.fix_events` and :meth:`MneExperiment.label_events`.

.. py:attribute:: MneExperiment.variables
Expand Down Expand Up @@ -741,7 +743,7 @@ the targets, you would use
-------------------------

By default, the analysis uses all epochs marked as good during rejection.
Set ``equalize_evoked_count='eq'`` to discard trials to make sure the same number of epochs goes into each cell of the model (see ``equal_count`` parameter to :meth:`Dataset.aggregate`).
Set ``equalize_evoked_count='eq'`` to discard trials to make sure the same number of epochs goes into each cell of the model (see ``equal_count`` parameter to :meth:`.Dataset.aggregate`).

'' (default)
Use all epochs.
Expand All @@ -765,7 +767,11 @@ The method for correcting the sensor covariance.
'reg'
Use the default regularization parameter (0.1).
'auto'
Use automatic selection of the optimal regularization method.
Use automatic selection of the optimal regularization method, as described in :func:`mne.compute_covariance`.
`empty_room`
Empty room covariance; for required setup, see `Empty room covariance <https://github.com/christianbrodbeck/Eelbrain/wiki/MneExperiment-analysis-options#empty-room-covariance>`_.
'ad_hoc'
Use diagonal covariance based on :func:`mne.cov.make_ad_hoc_cov`.


.. _state-src:
Expand Down
1 change: 1 addition & 0 deletions doc/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ functions. See also :class:`NDVar` methods.
psd_welch
resample
segment
set_connectivity
set_parc
set_time
set_tmin
Expand Down

0 comments on commit fb0454e

Please sign in to comment.