fNIRS / snirf_homer3

Repository for SNIRF reader/writer applications
6 stars 2 forks source link

undefined `key` under MetaDataTagsClass #2

Closed robertoostenveld closed 3 years ago

robertoostenveld commented 5 years ago

when executing the following in a clean MATLAB 2019b workspace

setpaths
demo_snirf
demo_snirf_readfile

the last one gives me the error

Read metaDataTags from /Users/roboos/Downloads/snirf_homer3-master/Snirf/Examples/neuro_run01.snirf.
Unrecognized method, property, or field 'key' for class 'MetaDataTagsClass'.
Error in demo_snirf_readfile (line 32)
    fprintf('metaDataTag(%d): {key = ''%s'', value = ''%s''}\n', ii,
    snirf.metaDataTags(ii).key, snirf.metaDataTags(ii).value); 

I cannot find key nor value in the structure.

K>> snirf.metaDataTags
ans = 
  MetaDataTagsClass with properties:

               tags: [1×1 struct]
           filename: '/Users/roboos/Downloads/snirf_homer3-master/Snirf/Examples/neuro_run01.snirf'
         fileformat: 'hdf5'
    supportedFomats: [1×1 struct]
                err: 0
K>> snirf.metaDataTags.tags
ans = 
  struct with fields:

          SubjectID: 'default'
    MeasurementDate: '2019-11-01'
    MeasurementTime: '05:11:57'
         LengthUnit: 'mm'
           TimeUnit: 'unknown'
robertoostenveld commented 5 years ago

If I comment out the fprintf line it seems to work fine. Btw, thanks for the easy entry into this with the examples.

dboas commented 4 years ago

@robertoostenveld , sorry for the long delay in responding. Everything has been overhauled now that SNIRF is launched AND implemented in many places. Can you check if this is still an issue that needs attention? Thanks

robertoostenveld commented 3 years ago

Sorry for my late reply. Cleaning up my email after this year's summer holiday, I noticed that I had not replied to your comment, which is now already from nearly a year ago. It seems we have a yearly schedule addressing this issue ;-)

After updating I cannot reproduce the initial issue, but still do get the error

>> setpaths
>> demo_snirf
>> demo_snirf_readfile
Unrecognized function or variable 'MenuBox'.
Error in demo_snirf_readfile>findfile (line 140)
    MenuBox(msg, 'OK');

That is due to the homer3 dependency missing on my computer. I am able to work around that error and realized that the test/demo file is missing. When I subsequently do

>> demo_snirf_readfile Simple_Probe.snirf

and work around another dependency that is missing on my computer (InitLogger), everything now seems to work.

So there is still some room for improving the demo, but nothing urgent for me. Hence I will close this issue.