[Homer-users] nasty bug with changing spatial units
David Boas
dboas at nmr.mgh.harvard.edu
Thu Aug 15 18:29:49 EDT 2013
Dear All,
We implemented the SD.SpatialUnit field a few months ago so that it is
explicitly stated in the data structure what the spatial units are. It
became necessary to implement this as we prepare to roll out the
atlasViewer for using a brain structure to guide interpretation of the
fNIRS data. We just found a nasty little error that we have fixed. It is
likely that this error has affected some of you and I wanted to tell you
what it does.
Please note, that Homer2 prefers to work with mm spatial units. This is
the convention that we are using for atlasViewer.
If you run Homer2 to process a group of .nirs files that have not yet
been initialized with SD.SpatialUnit, then Homer2 indicates such and
asks you for the spatial units. If you indicate that SD is currently in
cm units and agree to convert it to mm units then the first file
converted is correct, the second file converted gets a number 10x larger
making it units of 0.1mm, the third file gets another 10x making it
units of 0.01 mm, and so on. The result is that in your conversion to
concentration units you are likely to see smaller and smaller responses
depending on which file you are looking at.
If you suspect that you have this problem, you can easily verify it by
loading the .nirs file in matlab and examine SD.SrcPos and SD.DetPos and
SD.SpatialUnit. Presumably SD.SpatialUnit = 'mm'. In that case, does
SD.SrcPos and SD.DetPos also appear to be in mm units. If not, you can
correct the numbers by dividing by 10 or 100 or whatever it takes to
make it mm units. You can then save the .nirs file with the corrected SD.
Please let me know if you are having problems with this.
Thanks and sorry for the trouble.
David Boas
More information about the Homer-users
mailing list