diff --git a/CITATION.cff b/CITATION.cff index f17d661fd..8da27d636 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -175,6 +175,10 @@ authors: family-names: Wolter orcid: 'https://orcid.org/0000-0002-6785-9886' affiliation: 'Centre for Integrative Neuroscience, Tübingen, Germany' + - given-names: Julius + family-names: Welzel + affiliation: 'Department of Neurology, Kiel University, Germany' + orcid: 'https://orcid.org/0000-0003-4782-5360' - given-names: Alexandre family-names: Gramfort affiliation: 'Université Paris-Saclay, Inria, CEA, Palaiseau, France' diff --git a/doc/authors.rst b/doc/authors.rst index efad72dbf..a1d5bbe6e 100644 --- a/doc/authors.rst +++ b/doc/authors.rst @@ -45,3 +45,4 @@ .. _Ford McDonald: https://github.com/fordmcdonald .. _Pierre Guetschel: https://github.com/PierreGtch .. _Mara Wolter: https://github.com/marakw +.. _Julius Welzel: https://github.com/JuliusWelzel diff --git a/doc/whats_new.rst b/doc/whats_new.rst index 66eea1fc8..317860aad 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -19,6 +19,7 @@ The following authors contributed for the first time. Thank you so much! 🤩 * `Daniel McCloy`_ * `Mara Wolter`_ +* `Julius Welzel`_ The following authors had contributed before. Thank you for sticking around! 🤘 @@ -34,7 +35,7 @@ Detailed list of changes 🚀 Enhancements ^^^^^^^^^^^^^^^ -- nothing yet +- Including a description for ``onset`` and ``duration`` in the ``events.json`` file, by `Julius Welzel`_ (:gh:`1255`) 🧐 API and behavior changes ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/mne_bids/write.py b/mne_bids/write.py index eb989dc2d..be0a15012 100644 --- a/mne_bids/write.py +++ b/mne_bids/write.py @@ -338,7 +338,28 @@ def _events_json(fname, overwrite=False): Whether to overwrite the output file if it exists. """ new_data = { - "sample": {"Description": "The event onset time in number of sampling points."}, + "onset": { + "Description": ( + "Onset (in seconds) of the event from the beginning of the first data" + "point. Negative onsets account for events before the first stored " + "data point." + ), + "Units": "s", + }, + "duration": { + "Description": ( + "Duration of the event in seconds from onset. " + "Must be zero, positive, or 'n/a' if unavailable. " + "A zero value indicates an impulse event. " + ), + "Units": "s", + }, + "sample": { + "Description": ( + "The event onset time in number of sampling points." + "First sample is 0." + ), + }, "value": { "Description": ( "The event code (also known as trigger code or event ID) "