Skip to content

Commit

Permalink
unload iso2mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard2laire committed Jul 24, 2024
1 parent 1889ad5 commit 91c67bf
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions toolbox/io/in_data_snirf.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
% Authors: Edouard Delaire, Francois Tadel, 2020

% Install/load JSNIRF Toolbox (https://github.com/NeuroJSON/jsnirfy) as plugin

bst_plugin('Unload','iso2mesh');
if ~exist('loadsnirf', 'file')
[isInstalled, errMsg] = bst_plugin('Install', 'jsnirfy');
if ~isInstalled
Expand Down Expand Up @@ -102,15 +104,9 @@
if isempty(jnirs.nirs.probe.sourceLabels) || isempty(jnirs.nirs.probe.detectorLabels)
[ChannelMat.Channel(iChan).Name, ChannelMat.Channel(iChan).Group] = nst_format_channel(channel.sourceIndex, channel.detectorIndex, jnirs.nirs.probe.wavelengths(channel.wavelengthIndex));
else
if iscell( jnirs.nirs.probe.sourceLabels)
ChannelMat.Channel(iChan).Name = sprintf('%s%sWL%d', jnirs.nirs.probe.sourceLabels{channel.sourceIndex}, ...
jnirs.nirs.probe.detectorLabels{channel.detectorIndex}, ...
jnirs.nirs.probe.wavelengths(channel.wavelengthIndex));
else
ChannelMat.Channel(iChan).Name = sprintf('%s%sWL%d', jnirs.nirs.probe.sourceLabels(channel.sourceIndex), ...
jnirs.nirs.probe.detectorLabels(channel.detectorIndex), ...
jnirs.nirs.probe.wavelengths(channel.wavelengthIndex));
end
ChannelMat.Channel(iChan).Name = sprintf('%s%sWL%d', jnirs.nirs.probe.sourceLabels(channel.sourceIndex), ...
jnirs.nirs.probe.detectorLabels(channel.detectorIndex), ...
jnirs.nirs.probe.wavelengths(channel.wavelengthIndex));
ChannelMat.Channel(iChan).Group = sprintf('WL%d', jnirs.nirs.probe.wavelengths(channel.wavelengthIndex));

end
Expand Down

0 comments on commit 91c67bf

Please sign in to comment.