gwexpy.interop.mne_

Functions

from_mne(cls, data, **kwargs)

Convert an MNE object to a gwexpy object.

from_mne_raw(cls, raw[, unit_map])

Create a TimeSeriesDict from mne.io.Raw.

to_mne(data[, info])

Convert a gwexpy object to an MNE object.

to_mne_rawarray(tsd[, info, picks])

Convert a TimeSeries-like object to an mne.io.RawArray.

gwexpy.interop.mne_.to_mne_rawarray(tsd, info=None, picks=None)[source]

Convert a TimeSeries-like object to an mne.io.RawArray.

Parameters:
  • tsdTimeSeriesDict-like mapping (multi-channel) or a single TimeSeries.

  • info – Optional MNE Info. If omitted, a minimal Info is created.

  • picks – Optional channel selection (names or indices). Only supported for mapping inputs.

gwexpy.interop.mne_.from_mne_raw(cls, raw, unit_map=None)[source]

Create a TimeSeriesDict from mne.io.Raw.

gwexpy.interop.mne_.to_mne(data, info=None, **kwargs)[source]

Convert a gwexpy object to an MNE object.

Parameters:
  • data (FrequencySeries, Spectrogram, or TimeSeries (or dicts)) – The data object to convert.

  • info (mne.Info, optional) – Measurement info to use. If None, one is created.

  • **kwargs – Additional arguments passed to MNE constructors.

Returns:

The converted MNE object (e.g. RawArray, SpectrumArray, EpochsTFRArray).

Return type:

mne_object

gwexpy.interop.mne_.from_mne(cls, data, **kwargs)[source]

Convert an MNE object to a gwexpy object.

Parameters:
  • cls (type) – The target class (e.g. FrequencySeries, Spectrogram, TimeSeries).

  • data (mne object) – The MNE object to convert.

  • **kwargs – Additional arguments passed to from_mne_* helpers.

Return type:

gwexpy object