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

Function _sync_onset

mne/annotations.py:1657–1662  ·  view source on GitHub ↗

Adjust onsets in relation to raw data.

(raw, onset, inverse=False)

Source from the content-addressed store, hash-verified

1655
1656
1657def _sync_onset(raw, onset, inverse=False):
1658 """Adjust onsets in relation to raw data."""
1659 offset = (-1 if inverse else 1) * raw._first_time
1660 assert raw.info["meas_date"] == raw.annotations.orig_time
1661 annot_start = onset - offset
1662 return annot_start
1663
1664
1665def _annotations_starts_stops(raw, kinds, name="skip_by_annotation", invert=False):

Callers 11

test_raw_rejectFunction · 0.90
_annotation_helperFunction · 0.90
_export_raw_edf_bdfFunction · 0.90
_check_bad_segmentMethod · 0.85
appendMethod · 0.85
_buttonpressMethod · 0.85
_modify_annotationMethod · 0.85
_export_rawFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_raw_rejectFunction · 0.72
_annotation_helperFunction · 0.72