fNIRS/snirf

Multiple aux streams each with their own sampling rates and properties

Closed this issue · 3 comments

What is your recommendation for the cases where more than one type of aux data is present? For example, you can imagine a scenario where there are eeg channels, analog TTLs, digital TTLs and imu data.. i.e. both discrete (e.g., digital TTLs) and continuous data types (each with their own sampling frequency). Is it required to resample everything to a common frequency then (which is not ideal)? I couldn't find much info [here].(https://github.com/fNIRS/snirf/blob/master/snirf_specification.md#nirsiauxj).
image

dboas commented

aux is an indexed group where each item has 3 sub-fields: name, dataTImeSeries, and time. As such, each aux data has its own time vector. I think this resolves your issue.

Where did your code snippet above come from? That clearly won't work if each aux item has a different time vector. If that came from Homer3, then we know that we have to fix that issue and have essentially just been waiting for a dataset to come along that broke it and thus push us to fix it.

Perfect, that would fix the issue.
And you're right that it is from Homer3, that is why I got the wrong impression that they need to have the same length.
Thank you!

dboas commented

I am closing this issue. Thanks