def test_events_from_annot_onset_alingment(): """Test events and annotations onset are the same.""" raw = _raw_annot(meas_date=1, orig_time=1.5) # sec 0 1 2 3 # raw . |--------XXXXXXXXX # annot . |---XX # raw.annot . |--------XX # latency . 0 1 2 # . 0 0 assert raw.annotations.orig_time == 1 assert raw.annotations.onset[0] == 1 assert raw.first_samp == 10 event_latencies, event_id = events_from_annotations(raw) assert event_latencies[0, 0] == 10 assert raw.first_samp == event_latencies[0, 0]