I had a similar problem, where NWB wouldn’t recognize “unit”. I got the following error:
Error using types.util.checkUnset
Properties {unit} are not valid property names.
After much pain and debugging someone else’s uncommented code, I found a work-around. If you add the following code to line 12 of \matnwb+types+util\checkUnset.m it will ignore the extra property of mean_waveform that causes the error:
if any(contains(argin,‘unit’))
anonNames = [anonNames;argin{contains(argin,‘unit’)}];
end
In case you’re looking for a quick fix and don’t want to dive into the code: I also made a fork of the 2.2.2 NWB branch here: https://github.com/JorritMontijn/matnwb. Note that the above does NOT solve the problem, it merely ignores it. I also won’t be updating the above fork, as I assume either the Allen Brain Institute or the NWB people (or both) will eventually solve the problem.
Also note that I haven’t done any tests wrt the actual data you retrieve. The only thing I can say with certainty is that nwbRead() now returns an object.