Skip to content

Handling data with 3D locations for sources and detectors #5

@rob-luke

Description

@rob-luke

Hi all,

Thanks for the great package. I have been converting my data to snirf and run in to what I believe is a bug. Could you please let me know if this is an issue or if it is expected behaviour?

I have converted my data from a NIRX device to .nirs using the HomerOfflineConverter provided on the NIRX website. I then load this data using the code snippet from the README of this repo. I then save and load the data as described in the README. The .nirs data that I read has 3 dimensional locations for the source and detect positions. However, the snirf data is written as 2 dimensional data, so when I read it back I only have two of the three dimensions I started with.

I have provided a minimum working example below. The raw NIRX data I am using can be downloaded from https://osf.io/dj3eh/

nirs = load('Participant-1/NIRS-2019-11-02_002.nirs','-mat')

snirf1 = SnirfClass(nirs)
snirf1.Save('Participant-1.snirf')
snirf1.Info()

snirf2 = SnirfClass();
snirf2.Load('Participant-1.snirf');
snirf2.Info();
>> snirf1.probe.sourcePos2D
ans =

   -2.4810    1.0702    4.3366
   -6.4240    4.8954    4.8502
   -6.6257   -2.4181    4.3792
  -10.3412    1.6660    4.0343
    2.3877    1.2580    4.3585
    6.4382    5.0176    4.7415
    6.4641   -2.3230    4.6840
   10.2646    1.7367    4.1666


>> snirf2.probe.sourcePos2D
ans =

   -2.4810    1.0702         0
   -6.4240    4.8954         0
   -6.6257   -2.4181         0
  -10.3412    1.6660         0
    2.3877    1.2580         0
    6.4382    5.0176         0
    6.4641   -2.3230         0
   10.2646    1.7367         0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions