Closed kdarti closed 5 months ago
this should have also been fixed by the updated sample files in https://github.com/fNIRS/snirf-samples/commit/3a8505f19a21749bd35f37d8ac988d5e75ca1047, after the jsnirfy patch committed last year https://github.com/NeuroJSON/jsnirfy/commit/e196ebdd12733feb43d0033b95e6d1b53fc5706a
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
Thanks for the quick reply and for the information about the possible change!
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.