Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neuro_run01.snirf and Simple_Probe.snirf both have a single measurementList for multichannel data #10

Closed
kdarti opened this issue Jun 5, 2024 · 2 comments

Comments

@kdarti
Copy link

kdarti commented Jun 5, 2024

neuro_run01.snirf and Simple_Probe.snirf both have multiple channels, but only a single measurementList, this means all of the items, e.g. detectorgain are arrays instead of scalar. As far as I can tell, this is not according to spec.
image

@fangq
Copy link
Member

fangq commented Jun 6, 2024

this should have also been fixed by the updated sample files in 3a8505f, after the jsnirfy patch committed last year NeuroJSON/jsnirfy@e196ebd

I see the measurementList field is now a group array matching the width of dataTimeSeries.

>> a=loadh5('Simple_Probe.snirf');
>> a.nirs.data1

ans = 

  struct with fields:

      dataTimeSeries: [1200×8 double]
    measurementList1: [1×1 struct]
    measurementList2: [1×1 struct]
    measurementList3: [1×1 struct]
    measurementList4: [1×1 struct]
    measurementList5: [1×1 struct]
    measurementList6: [1×1 struct]
    measurementList7: [1×1 struct]
    measurementList8: [1×1 struct]
                time: [1200×1 double]

Please be aware that snirf users had reported significant space overhead by using "arrays of struct" form for measurementList(k) in HDF5, and there is currently a drafted PR to change this to "struct of arrays" form as a new field name measurementLists, which effectively reverts back to the sample form that you reported

fNIRS/snirf#115

@fangq fangq closed this as completed Jun 6, 2024
@kdarti
Copy link
Author

kdarti commented Jun 7, 2024

Thanks for the quick reply and for the information about the possible change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants