Commit e6ef7f6a authored by jayd1860's avatar jayd1860
Browse files

Merge branch 'development' of https://github.com/jayd1860/Homer3 into development

parents 29f268ad 0957156a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ classdef ProbeClass < FileLoadSaveClass
        
        % -------------------------------------------------------
        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 
                if isempty(obj.sourcePos2D)
+2 −8
Original line number Diff line number Diff line
@@ -79,15 +79,9 @@ else
            maingui.dataTree.SetCurrElem(iGroup);
        end
    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
            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
        if listboxGroupTreeMap == maingui.rid                                 % Case 4: Input  - List Entry maps to run(iGroup, iSubj, iRun); Proc level setting: Subj
            set(handles.radiobuttonProcTypeRun, 'value',1);                 %         Output - Proc level setting: Run;    currElem: group(iGroup)
            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
    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
@@ -122,7 +116,7 @@ end


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


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

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

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