MCPcopy
hub / github.com/mne-tools/mne-python / _raw_annot

Function _raw_annot

mne/utils/_testing.py:194–207  ·  view source on GitHub ↗
(meas_date, orig_time)

Source from the content-addressed store, hash-verified

192
193
194def _raw_annot(meas_date, orig_time):
195 from .._fiff.meas_info import create_info
196 from ..annotations import Annotations, _handle_meas_date
197 from ..io import RawArray
198
199 info = create_info(ch_names=10, sfreq=10.0)
200 raw = RawArray(data=np.empty((10, 10)), info=info, first_samp=10)
201 if meas_date is not None:
202 meas_date = _handle_meas_date(meas_date)
203 with raw.info._unlock(check_after=True):
204 raw.info["meas_date"] = meas_date
205 annot = Annotations([0.5], [0.2], ["dummy"], orig_time)
206 raw.set_annotations(annotations=annot)
207 return raw
208
209
210def _get_data(x, ch_idx):

Calls 6

create_infoFunction · 0.85
RawArrayClass · 0.85
_handle_meas_dateFunction · 0.85
AnnotationsClass · 0.85
_unlockMethod · 0.80
set_annotationsMethod · 0.45

Tested by

no test coverage detected