Skip to content

[BUG]: Incorrectly determining the length of auxiliary time series data leads to loading errors. #186

@nidadu

Description

@nidadu

Version of Homer3 you are using

Homer3, v1.80.2

Your environment (MATLAB environment and OS)

OS and MATLAB independent

Description of the issue

Homer3 assumes that the number of time points is greater than the number of channels. This is not always the case, especially using high density data. As a consequence, Homer3 fails to load some high density data. This issue has been addressed before (#79) but was not fully fixed.

Homer3 checks the time series when loading aux data. If the channel count is greater than the number of time points, length(dataTimeSeries) will return the channel count instead of the time count. Thus, the code will throw an error and the aux data will be incorrectly rejected.

if length(obj.dataTimeSeries) ~= length(obj.time)
err = -4;
return

Steps to reproduce:
Attempt to load a SNIRF file where the channel count is greater than the number of time points.

Expected behavior:
Load without error.

Actual behavior:
Homer3 indicates an error (-4) claiming "aux" field is invalid and could not be loaded. The aux data is not loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions