Commit 0957156a authored by jayd1860's avatar jayd1860
Browse files

v1.35.4

-- Fix SNIRF file probe - which does not have 2D optodes - not loading correctly because 3D-to-2D default projection was not being called due to incorrect condition check.
-- Remove fsolve warnings and print statements from project_3D_to_2D.
-- MainGUI No Sessions view not selcting correct current element when selecting from Group level to Run level in data tree listbox display.
-- Fix issue in StimEditGUI with a dataset that has NO stims or conditions at all and where a) selecting Syncronize Browsing menu option b) switch to another run in MainGUI which atriggers StimEditGUI Update function to display the newly selcted run c) set stim causes error. Fix by adding call to current element Load() method to load the acquired data. This needs to when using distributed storage scheme for DataTree which is the default.
parent 6405dbc5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -126,7 +126,7 @@ classdef ProbeClass < FileLoadSaveClass
        
        
        % -------------------------------------------------------
        % -------------------------------------------------------
        function Project_3D_to_2D(obj) 
        function Project_3D_to_2D(obj) 
            if isempty(obj.landmarkPos3D)
            if isempty(obj.landmarkPos2D) || isempty(obj.landmarkPos3D)
                
                
                % When 3D landmarks aren't available use crude default 3D-to-2D projection algorithm 
                % When 3D landmarks aren't available use crude default 3D-to-2D projection algorithm 
                if isempty(obj.sourcePos2D)
                if isempty(obj.sourcePos2D)
+2 −8
Original line number Original line Diff line number Diff line
@@ -79,15 +79,9 @@ else
            maingui.dataTree.SetCurrElem(iGroup);
            maingui.dataTree.SetCurrElem(iGroup);
        end
        end
    elseif viewSetting == views.NOSESS
    elseif viewSetting == views.NOSESS
        if listboxGroupTreeMap == maingui.rid && procLevelSelect==maingui.eid       % Case 4: Input  - List Entry maps to run(iGroup, iSubj, iRun); Proc level setting: Subj
        if listboxGroupTreeMap == maingui.rid                                 % Case 4: Input  - List Entry maps to run(iGroup, iSubj, iRun); Proc level setting: Subj
            set(handles.radiobuttonProcTypeSess, 'value',1);                 %         Output - Proc level setting: Run;     currElem: subj(iGroup, iSubj)
            maingui.dataTree.SetCurrElem(iGroup, iSubj, iSess);
        elseif listboxGroupTreeMap == maingui.rid && procLevelSelect==maingui.sid   % Case 7: Input  - List Entry maps to run(iGroup, iSubj, iRun);   Proc level setting: Group
            set(handles.radiobuttonProcTypeRun, 'value',1);                 %         Output - Proc level setting: Run;    currElem: group(iGroup)
            set(handles.radiobuttonProcTypeRun, 'value',1);                 %         Output - Proc level setting: Run;    currElem: group(iGroup)
            maingui.dataTree.SetCurrElem(iGroup, iSubj, iSess, iRun);
            maingui.dataTree.SetCurrElem(iGroup, iSubj, iSess, iRun);
        elseif listboxGroupTreeMap == maingui.rid && procLevelSelect==maingui.gid   % Case 7: Input  - List Entry maps to run(iGroup, iSubj, iRun);   Proc level setting: Group
            set(handles.radiobuttonProcTypeGroup, 'value',1);                 %         Output - Proc level setting: Run;    currElem: group(iGroup)
            maingui.dataTree.SetCurrElem(iGroup);
        end
        end
    elseif viewSetting == views.SESS
    elseif viewSetting == views.SESS
        if listboxGroupTreeMap == maingui.rid && procLevelSelect==maingui.eid       % Case 4: Input  - List Entry maps to run(iGroup, iSubj, iRun); Proc level setting: Subj
        if listboxGroupTreeMap == maingui.rid && procLevelSelect==maingui.eid       % Case 4: Input  - List Entry maps to run(iGroup, iSubj, iRun); Proc level setting: Subj
@@ -122,7 +116,7 @@ end




% --------------------------------------------------------------------
% --------------------------------------------------------------------
function SaveChildGuis(handles)
function SaveChildGuis()
global maingui
global maingui
if isempty(maingui.childguis)
if isempty(maingui.childguis)
    return;
    return;
+5 −1
Original line number Original line Diff line number Diff line
@@ -285,7 +285,7 @@ figure(handles.figure);




%---------------------------------------------------------------------------
%---------------------------------------------------------------------------
function axes1_ButtonDownFcn(hObject, eventdata, handles)
function axes1_ButtonDownFcn(~, ~, handles)
global stimEdit
global stimEdit


[point1, point2, err] = extractButtondownPoints();
[point1, point2, err] = extractButtondownPoints();
@@ -789,8 +789,12 @@ end
SetTextFilename(handles);
SetTextFilename(handles);


% Try to keep the same condition as old run
% Try to keep the same condition as old run
stimEdit.dataTreeHandle.currElem.Load();
conditions =  stimEdit.dataTreeHandle.currElem.GetConditions();
conditions =  stimEdit.dataTreeHandle.currElem.GetConditions();
[icond, conditions] = GetConditionIdxFromPopupmenu(conditions, handles);
[icond, conditions] = GetConditionIdxFromPopupmenu(conditions, handles);
if isempty(conditions)
    return;
end
set(handles.popupmenuConditions, 'value',icond);
set(handles.popupmenuConditions, 'value',icond);
set(handles.popupmenuConditions, 'string',conditions);
set(handles.popupmenuConditions, 'string',conditions);
SetUitableStimInfo(conditions{icond}, handles);
SetUitableStimInfo(conditions{icond}, handles);
+13 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,19 @@ function p2 = project_3D_to_2D(p3)
d = distmatrix(p3);
d = distmatrix(p3);
p2_0 = p3(:,1:2);
p2_0 = p3(:,1:2);
fun = @(x)myfunc(x,d);
fun = @(x)myfunc(x,d);
p2 = fsolve(fun, p2_0);

warnid = {'optim:fsolve:NonSquareSystem'};
for ii = 1:length(warnid)
    warning('OFF', warnid{ii});
end

p2 = fsolve(fun, p2_0, optimset('Display','off'));

for ii = 1:length(warnid)
    warning('ON', warnid{ii});
end






% -------------------------------------------------------
% -------------------------------------------------------
+1 −1
Original line number Original line Diff line number Diff line
1.35.3
1.35.4