Skip to content

Missing duration condition in line 179 is not reached. #210

@neuromechanist

Description

@neuromechanist

When all events in a task do not have a duration ("instantaneous" events or onsets/offsets), it might be best to remove the EEG.event.duration field and then have n/a for all rows in BIDS _events.tsv.

The following line should be modified to implement this feature:
https://github.com/sccn/bids-matlab-tools/blob/b53c87f624373f1c0bc02b85278a4c888e38a7be/bids_writeeventfile.m#L112

The second condition should be removed. The line should looklike:

        if ~any(strcmp(bids_fields,'duration')), opt.eInfo(end+1,:) = { 'duration' 'duration' }; end

Then the code would put n/a for duration:

https://github.com/sccn/bids-matlab-tools/blob/b53c87f624373f1c0bc02b85278a4c888e38a7be/bids_writeeventfile.m#L179-L183

I tested this feature in RC3 of the HBN dataset: /home/sshirazi/yahya/cmi_bids_R3_RC3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions