Short-Channel info
Clear all

Short-Channel info

3 Posts
2 Users
0 Reactions
Posts: 4
Topic starter
Active Member
Joined: 2 years ago

Hi everyone,

It seems that both datasets should contain short channels (based on the cited papers) but I can not find which channels are assigned as a short channel in the imported datasets. So am I missing something in the dataset information?

Topic Tags
2 Replies
Meryem Yücel
Posts: 219
Joined: 4 years ago

Hi Ali,


Most software should automatically detect short channels given a threshold for source-detector distance (e.g. 10 mm). Are you using your own scripts? If so, the info can be "extracted" from the snirf files. You need to check these fileds below and calculate the distance of each channel and assign the channels shorter than 10 mm as short-separation channels.


If you add Homer3 to your matlab path, you can also use the script below to find the short channels. The script depends on some homer functions but will make your life much easier. The obj ist the snirf obj and can be loaded using SnirfLoad function in homer.

I hope this helps! And let me know if not!


function [lstLong, lstShort, ml] = get_lstSS_LL(obj, rhoSD_ssThresh)

%% find list of long and short separation channels
SrcPos = obj.probe.GetSrcPos();
DetPos = obj.probe.GetDetPos();
ml     =;

lst = 1:size(ml,1);
rhoSD = zeros(length(lst),1);
posM = zeros(length(lst),3);
for iML = 1:length(lst)
    rhoSD(iML) = sum((SrcPos(ml(lst(iML),1),:) - DetPos(ml(lst(iML),2),:)).^2).^0.5;
    posM(iML,:) = (SrcPos(ml(lst(iML),1),:) + DetPos(ml(lst(iML),2),:)) / 2;
lstLong = lst(find(rhoSD>rhoSD_ssThresh));
lstShort = lst(find(rhoSD<=rhoSD_ssThresh));
Posts: 4
Topic starter
Active Member
Joined: 2 years ago

Thank you, Meryem. Very helpful! 

I am using the BrainAnalyZIR toolbox. So the toolbox did not extract the short channel labels but based on the calculation of the short distances that you explained, I added the information. Thanks!