Mercurial > hg > map
comparison multithreshold 1.46/multiThreshold.m @ 38:c2204b18f4a2 tip
End nov big change
author | Ray Meddis <rmeddis@essex.ac.uk> |
---|---|
date | Mon, 28 Nov 2011 13:34:28 +0000 |
parents | 3ea506487b3b |
children |
comparison
equal
deleted
inserted
replaced
37:771a643d5c29 | 38:c2204b18f4a2 |
---|---|
44 % | 44 % |
45 % See also: GUIDE, GUIDATA, GUIHANDLES | 45 % See also: GUIDE, GUIDATA, GUIHANDLES |
46 | 46 |
47 % Edit the above text to modify the response to help multiThreshold | 47 % Edit the above text to modify the response to help multiThreshold |
48 | 48 |
49 % Last Modified by GUIDE v2.5 20-Sep-2011 11:47:22 | 49 % Last Modified by GUIDE v2.5 25-Oct-2011 07:51:14 |
50 | 50 |
51 % Begin initialization code - DO NOT EDIT | 51 % Begin initialization code - DO NOT EDIT |
52 gui_Singleton = 1; | 52 gui_Singleton = 1; |
53 gui_State = struct('gui_Name', mfilename, ... | 53 gui_State = struct('gui_Name', mfilename, ... |
54 'gui_Singleton', gui_Singleton, ... | 54 'gui_Singleton', gui_Singleton, ... |
91 function initializeGUI(handles) | 91 function initializeGUI(handles) |
92 % Populate the edit boxes and popup menus on the GUI | 92 % Populate the edit boxes and popup menus on the GUI |
93 % Then wait for user action | 93 % Then wait for user action |
94 global stimulusParameters experiment betweenRuns | 94 global stimulusParameters experiment betweenRuns |
95 global targetTypes maskerTypes backgroundTypes | 95 global targetTypes maskerTypes backgroundTypes |
96 global variableNames paradigmNames threshEstNames cueNames | 96 global variableNames paradigmNames threshEstNames cueNames betweenRunsVariables |
97 | 97 |
98 % Specify order of fields in main structures | 98 % Specify order of fields in main structures |
99 % identify as empty values or empty strings only | 99 % identify as empty values or empty strings only |
100 orderGlobals | 100 orderGlobals |
101 | 101 |
104 | 104 |
105 % specify all variables that need to be set on the GUI | 105 % specify all variables that need to be set on the GUI |
106 variableNames={'stimulusDelay','maskerDuration','maskerLevel',... | 106 variableNames={'stimulusDelay','maskerDuration','maskerLevel',... |
107 'maskerRelativeFrequency', 'targetFrequency', 'gapDuration',... | 107 'maskerRelativeFrequency', 'targetFrequency', 'gapDuration',... |
108 'targetDuration','targetLevel','rampDuration',... | 108 'targetDuration','targetLevel','rampDuration',... |
109 'cueTestDifference', 'WRVstartValues', 'WRVsteps', 'WRVlimits'}; | 109 'cueTestDifference', 'WRVstartValues', 'WRVsteps', 'WRVlimits',... |
110 'OHIOnTones'}; | |
110 | 111 |
111 % Variable variables | 112 % Variable variables |
112 % (names of variable that can changed between runs) | 113 % (names of variable that can changed between runs) |
113 betweenRunsVariables={'stimulusDelay','maskerDuration','maskerLevel',... | 114 betweenRunsVariables={'stimulusDelay','maskerDuration','maskerLevel',... |
114 'maskerRelativeFrequency','targetFrequency', 'gapDuration',... | 115 'maskerRelativeFrequency','targetFrequency', 'gapDuration',... |
115 'targetDuration','targetLevel','numOHIOtones'}; | 116 'targetDuration','targetLevel','OHIOnTones'}; |
116 % populate the 'between runs variable' menus | 117 % populate the 'between runs variable' menus |
117 set(handles.popupmenuVaryParameter1,'string',betweenRunsVariables) | 118 set(handles.popupmenuVaryParameter1,'string',betweenRunsVariables) |
118 set(handles.popupmenuVaryParameter2,'string',betweenRunsVariables) | 119 set(handles.popupmenuVaryParameter2,'string',betweenRunsVariables) |
119 | 120 |
120 % Trial presentation order - randomize at startup | 121 % Trial presentation order - randomize at startup |
141 set(handles.editBackgroundLevel,'string', '0') | 142 set(handles.editBackgroundLevel,'string', '0') |
142 | 143 |
143 % Establish available paradigms by scanning paradigms folder | 144 % Establish available paradigms by scanning paradigms folder |
144 paradigmNames= what('paradigms'); | 145 paradigmNames= what('paradigms'); |
145 paradigmNames= paradigmNames.m; % select m files only | 146 paradigmNames= paradigmNames.m; % select m files only |
147 idx=strmatch('paradigm_', paradigmNames); % with 'paradigm_' | |
148 paradigmNames=paradigmNames(idx); | |
146 for i=1:length(paradigmNames) % strip off file extension | 149 for i=1:length(paradigmNames) % strip off file extension |
147 paradigmNames{i}=paradigmNames{i}(10:end-2); | 150 paradigmNames{i}=paradigmNames{i}(10:end-2); |
148 end | 151 end |
149 set(handles.popupmenuParadigm,'string', paradigmNames) | 152 set(handles.popupmenuParadigm,'string', paradigmNames) |
150 | 153 |
181 % threshold assessment method - value must be set in paradigm | 184 % threshold assessment method - value must be set in paradigm |
182 threshEstNames={'oneIntervalUpDown', 'MaxLikelihood', ... | 185 threshEstNames={'oneIntervalUpDown', 'MaxLikelihood', ... |
183 '2I2AFC++', '2I2AFC+++'}; | 186 '2I2AFC++', '2I2AFC+++'}; |
184 set(handles.popupmenuThreshEst, 'string', threshEstNames); | 187 set(handles.popupmenuThreshEst, 'string', threshEstNames); |
185 experiment.stopCriteria2IFC=[75 3 5]; | 188 experiment.stopCriteria2IFC=[75 3 5]; |
186 experiment.stopCriteriaSI=[20]; | 189 experiment.stopCriteriaSI=20; |
187 | 190 |
188 % ** editBoxes that are only set by hand | 191 % ** editBoxes that are only set by hand |
189 % music (relative) level, 'tada!' (manual setting only) | 192 % music (relative) level, 'tada!' (manual setting only) |
190 % increase for the hard of hearing | 193 % increase for the hard of hearing |
191 set(handles.editMusicLevel,'string','0') | 194 set(handles.editMusicLevel,'string','0') |
192 | 195 |
193 % Catch Trial Rate | 196 % Catch Trial Rate |
194 set(handles.editCatchTrialRate,'string','0.2 0.1 2 '); | 197 set(handles.editCatchTrialRate,'string','0.2 0.1 '); |
195 | 198 |
196 % calibration | 199 % calibration |
197 stimulusParameters.restoreCalibration=7; | 200 stimulusParameters.restoreCalibration=7; |
198 set(handles.editcalibrationdB,'string',... | 201 set(handles.editcalibrationdB,'string',... |
199 stimulusParameters.restoreCalibration) | 202 stimulusParameters.restoreCalibration) |
203 set(handles.editMAPplot,'string',num2str(experiment.MAPplot)) | 206 set(handles.editMAPplot,'string',num2str(experiment.MAPplot)) |
204 | 207 |
205 % saveData | 208 % saveData |
206 experiment.saveData=1; | 209 experiment.saveData=1; |
207 set(handles.editSaveData,'string',num2str(experiment.saveData)) | 210 set(handles.editSaveData,'string',num2str(experiment.saveData)) |
211 set(handles.pushbuttonSave,'visible','off') | |
208 | 212 |
209 % printTracks | 213 % printTracks |
210 experiment.printTracks=0; | 214 experiment.printTracks=0; |
211 set(handles.editPrintTracks,'string',num2str(experiment.printTracks)) | 215 set(handles.editPrintTracks,'string',num2str(experiment.printTracks)) |
212 | 216 |
334 end | 338 end |
335 % backgroundLevel is not a variableName (?!) | 339 % backgroundLevel is not a variableName (?!) |
336 set(handles.editBackgroundLevel,'string', num2str... | 340 set(handles.editBackgroundLevel,'string', num2str... |
337 (stimulusParameters.backgroundLevel)) | 341 (stimulusParameters.backgroundLevel)) |
338 | 342 |
339 % on RUN the sample rate will be picked from the text box | 343 % values related to assessment method |
340 % However, MAP overrules the sample rate and sets its own | |
341 aSetSampleRate(stimulusParameters.subjectSampleRate, handles); | |
342 | |
343 | |
344 % used for plotting functions (NB affected by paradigm settings) | |
345 experiment.predictionLevels=stimulusParameters.WRVlimits(1):... | |
346 experiment.meanSearchStep:stimulusParameters.WRVlimits(2); | |
347 experiment.possLogSlopes=abs(experiment.possLogSlopes)*... | |
348 sign(experiment.psyFunSlope); | |
349 | |
350 aResetPopupMenus(handles) | |
351 | |
352 % ------------------------------------------------------ aResetPopupMenus | |
353 function aResetPopupMenus(handles) | |
354 global stimulusParameters betweenRuns variableNames | |
355 global targetTypes maskerTypes experiment backgroundTypes | |
356 | |
357 switch experiment.threshEstMethod | 344 switch experiment.threshEstMethod |
358 case {'MaxLikelihood','oneIntervalUpDown'} | 345 case {'MaxLikelihood','oneIntervalUpDown'} |
359 set(handles.editstopCriteriaBox, 'string', ... | 346 set(handles.editstopCriteriaBox, 'string', ... |
360 num2str(experiment.singleIntervalMaxTrials)) | 347 num2str(experiment.singleIntervalMaxTrials)) |
361 | |
362 case {'2I2AFC++','2I2AFC+++'} | 348 case {'2I2AFC++','2I2AFC+++'} |
363 set(handles.editstopCriteriaBox, 'string', ... | 349 set(handles.editstopCriteriaBox, 'string', ... |
364 num2str(experiment.stopCriteria2IFC)) | 350 num2str(experiment.stopCriteria2IFC)) |
365 otherwise | 351 otherwise |
366 error([' aResetPopupMenus: threshEstMethod not recognised -> ' ... | 352 error([' aResetPopupMenus: threshEstMethod not recognised -> ' ... |
367 experiment.threshEstMethod]) | 353 experiment.threshEstMethod]) |
368 end | 354 end |
355 % assessment method popup may be changed between paradigms | |
356 % e.g. SRT must be one interval | |
357 x=get(handles.popupmenuThreshEst, 'string'); | |
358 set(handles.popupmenuThreshEst, 'value', ... | |
359 strmatch(experiment.threshEstMethod, x)); | |
360 | |
361 | |
362 % on RUN the sample rate will be picked from the text box | |
363 % However, MAP overrules the sample rate and sets its own | |
364 aSetSampleRate(stimulusParameters.subjectSampleRate, handles); | |
365 | |
366 | |
367 % used for plotting functions (NB affected by paradigm settings) | |
368 experiment.predictionLevels=stimulusParameters.WRVlimits(1):... | |
369 experiment.meanSearchStep:stimulusParameters.WRVlimits(2); | |
370 experiment.possLogSlopes=abs(experiment.possLogSlopes)*... | |
371 sign(experiment.psyFunSlope); | |
372 | |
373 aResetPopupMenus(handles) | |
374 | |
375 % ------------------------------------------------------ aResetPopupMenus | |
376 function aResetPopupMenus(handles) | |
377 global stimulusParameters betweenRuns variableNames | |
378 global targetTypes maskerTypes experiment backgroundTypes betweenRunsVariables | |
379 | |
380 switch experiment.threshEstMethod | |
381 case {'MaxLikelihood','oneIntervalUpDown'} | |
382 set(handles.editstopCriteriaBox, 'string', ... | |
383 num2str(experiment.singleIntervalMaxTrials)) | |
384 | |
385 case {'2I2AFC++','2I2AFC+++'} | |
386 set(handles.editstopCriteriaBox, 'string', ... | |
387 num2str(experiment.stopCriteria2IFC)) | |
388 otherwise | |
389 error([' aResetPopupMenus: threshEstMethod not recognised -> ' ... | |
390 experiment.threshEstMethod]) | |
391 end | |
369 | 392 |
370 % forced noCue | 393 % forced noCue |
371 switch experiment.paradigm | 394 switch experiment.paradigm |
372 case 'discomfort' | 395 case 'discomfort' |
373 set(handles.popupmenuCueNoCue,'value', 2) | 396 set(handles.popupmenuCueNoCue,'value', 2) |
374 end | 397 end |
375 | 398 |
376 %set variables popupmenus as specified in betweenRuns | 399 %set variables popupmenus as specified in betweenRuns |
377 variableParameter1ID=0; variableParameter2ID=0; | 400 variableParameter1ID=0; variableParameter2ID=0; |
378 for i=1:length(variableNames) | 401 for i=1:length(betweenRunsVariables) % variableNames |
379 if strcmp(variableNames{i},betweenRuns.variableName1) | 402 if strcmp(betweenRunsVariables{i},betweenRuns.variableName1) |
380 variableParameter1ID=i; | 403 variableParameter1ID=i; |
381 end | 404 end |
382 if strcmp(variableNames{i},betweenRuns.variableName2) | 405 if strcmp(betweenRunsVariables{i},betweenRuns.variableName2) |
383 variableParameter2ID=i; | 406 variableParameter2ID=i; |
384 end | 407 end |
385 end | 408 end |
386 if variableParameter1ID==0 || variableParameter2ID==0; | 409 if variableParameter1ID==0 || variableParameter2ID==0; |
387 Error('a ResetPopMenu: variableParameter not identified') | 410 Error('a ResetPopMenu: variableParameter not identified') |
413 % called from aShowRelevantObjects | 436 % called from aShowRelevantObjects |
414 % always on | 437 % always on |
415 set(handles.edittargetLevel, 'visible', 'on') | 438 set(handles.edittargetLevel, 'visible', 'on') |
416 set(handles.edittargetDuration, 'visible', 'on') | 439 set(handles.edittargetDuration, 'visible', 'on') |
417 set(handles.edittargetFrequency, 'visible', 'on') | 440 set(handles.edittargetFrequency, 'visible', 'on') |
441 | |
442 switch experiment.paradigm(1:3) | |
443 case 'OHI' | |
444 set(handles.editOHIOnTones, 'visible', 'on') | |
445 set(handles.textOHIOnTones, 'visible', 'on') | |
446 otherwise | |
447 set(handles.editOHIOnTones, 'visible', 'off') | |
448 set(handles.textOHIOnTones, 'visible', 'off') | |
449 end | |
418 | 450 |
419 switch experiment.ear | 451 switch experiment.ear |
420 case {'statsModelLogistic', 'statsModelRareEvent'} | 452 case {'statsModelLogistic', 'statsModelRareEvent'} |
421 set(handles.editStatsModel, 'visible', 'on') | 453 set(handles.editStatsModel, 'visible', 'on') |
422 set(handles.textStatsModel, 'visible', 'on') | 454 set(handles.textStatsModel, 'visible', 'on') |
686 | 718 |
687 function run (handles) | 719 function run (handles) |
688 global experiment expGUIhandles stimulusParameters | 720 global experiment expGUIhandles stimulusParameters |
689 tic | 721 tic |
690 expGUIhandles=handles; | 722 expGUIhandles=handles; |
723 set(handles.pushbuttonSave,'visible','off') | |
724 | |
691 set(handles.pushbuttonStop, 'backgroundColor', [.941 .941 .941]) | 725 set(handles.pushbuttonStop, 'backgroundColor', [.941 .941 .941]) |
692 % set(handles.editparamChanges,'visible','off') | 726 % set(handles.editparamChanges,'visible','off') |
693 | 727 |
694 % message box white (removes any previous error message) | 728 % message box white (removes any previous error message) |
695 set(handles.textMSG,... | 729 set(handles.textMSG,... |
716 experiment.justInitialized=0;% prevents moving subjectGUI | 750 experiment.justInitialized=0;% prevents moving subjectGUI |
717 toc | 751 toc |
718 | 752 |
719 % --- Executes on button press in pushbuttonSingleShot. | 753 % --- Executes on button press in pushbuttonSingleShot. |
720 function pushbuttonSingleShot_Callback(hObject, eventdata, handles) | 754 function pushbuttonSingleShot_Callback(hObject, eventdata, handles) |
721 global experiment | 755 global experiment paradigmNames |
722 experiment.singleShot=1; | 756 experiment.singleShot=1; |
757 | |
758 % startup paradigm, 'training' (could be anywhere on the list) | |
759 startupParadigm='training'; | |
760 idx= find(strcmp(paradigmNames,startupParadigm)); | |
761 set(handles.popupmenuParadigm,'value', idx) | |
762 aParadigmSelection(handles); | |
723 | 763 |
724 % special test for spontaneous activity | 764 % special test for spontaneous activity |
725 x=get(handles.editWRVstartValues, 'string'); | 765 x=get(handles.editWRVstartValues, 'string'); |
726 y=get(handles.edittargetDuration, 'string'); | 766 y=get(handles.edittargetDuration, 'string'); |
727 set(handles.editWRVstartValues, 'string', '-20') | 767 set(handles.editWRVstartValues, 'string', '-20') |
738 set(handles.edittargetDuration, 'string', y) | 778 set(handles.edittargetDuration, 'string', y) |
739 | 779 |
740 % ------------------------------------------aReadAndCheckParameterBoxes | 780 % ------------------------------------------aReadAndCheckParameterBoxes |
741 function errorMsg=aReadAndCheckParameterBoxes(handles) | 781 function errorMsg=aReadAndCheckParameterBoxes(handles) |
742 global experiment stimulusParameters betweenRuns statsModel | 782 global experiment stimulusParameters betweenRuns statsModel |
743 global variableNames LevittControl paramChanges | 783 global variableNames LevittControl paramChanges betweenRunsVariables |
744 % When the program sets the parameters all should be well | 784 % When the program sets the parameters all should be well |
745 % But when the user changes them... | 785 % But when the user changes them... |
746 | 786 |
747 errorMsg=''; | 787 errorMsg=''; |
748 | 788 |
799 if isempty(variableValues), errorMsg=[ variableNames{i} ... | 839 if isempty(variableValues), errorMsg=[ variableNames{i} ... |
800 ' is an empty box']; return, end | 840 ' is an empty box']; return, end |
801 end | 841 end |
802 | 842 |
803 chosenOption=get(handles.popupmenuVaryParameter1,'value'); | 843 chosenOption=get(handles.popupmenuVaryParameter1,'value'); |
804 betweenRuns.variableName1=variableNames{chosenOption}; | 844 betweenRuns.variableName1=betweenRunsVariables{chosenOption}; |
805 eval(['betweenRuns.variableList1 = stimulusParameters.' ... | 845 eval(['betweenRuns.variableList1 = stimulusParameters.' ... |
806 betweenRuns.variableName1 ';']); | 846 betweenRuns.variableName1 ';']); |
807 | 847 |
808 chosenOption=get(handles.popupmenuVaryParameter2,'value'); | 848 chosenOption=get(handles.popupmenuVaryParameter2,'value'); |
809 betweenRuns.variableName2=variableNames{chosenOption}; | 849 betweenRuns.variableName2=variableNames{chosenOption}; |
889 < stimulusParameters.catchTrialRates(2) | 929 < stimulusParameters.catchTrialRates(2) |
890 errorMsg=... | 930 errorMsg=... |
891 'catch trial base rates must be less than catch trial start rate'; | 931 'catch trial base rates must be less than catch trial start rate'; |
892 return, | 932 return, |
893 end | 933 end |
934 % force the decay rate for catchTrialRate | |
935 % to avoid having to explain it to the user | |
936 stimulusParameters.catchTrialRates(3)=2; | |
894 | 937 |
895 % sample rate | 938 % sample rate |
896 % The sample rate is set in the paradigm file. | 939 % The sample rate is set in the paradigm file. |
897 % Normally this is set in the startUp paradigm file and then left | 940 % Normally this is set in the startUp paradigm file and then left |
898 % When the model is used, the multiThreshold sample rate | 941 % When the model is used, the multiThreshold sample rate |
1038 end | 1081 end |
1039 | 1082 |
1040 % identify model parameter changes if any | 1083 % identify model parameter changes if any |
1041 paramChanges=get(handles.editparamChanges,'string'); | 1084 paramChanges=get(handles.editparamChanges,'string'); |
1042 if ~strcmp(paramChanges, ';'), paramChanges=[paramChanges ';']; end | 1085 if ~strcmp(paramChanges, ';'), paramChanges=[paramChanges ';']; end |
1086 try | |
1043 eval(paramChanges); | 1087 eval(paramChanges); |
1088 catch | |
1089 error('Problems with suggested parameter changes') | |
1090 end | |
1091 | |
1044 | 1092 |
1045 % -------------------------------------------- aSetSampleRate | 1093 % -------------------------------------------- aSetSampleRate |
1046 function aSetSampleRate(sampleRate, handles) | 1094 function aSetSampleRate(sampleRate, handles) |
1047 global stimulusParameters | 1095 global stimulusParameters |
1048 stimulusParameters.sampleRate=sampleRate; | 1096 stimulusParameters.sampleRate=sampleRate; |
1097 | 1145 |
1098 case {'MAPmodelListen', 'MAPmodelMultiCh', 'MAPmodelSingleCh'} | 1146 case {'MAPmodelListen', 'MAPmodelMultiCh', 'MAPmodelSingleCh'} |
1099 stimulusParameters.includeCue=0; % no cue | 1147 stimulusParameters.includeCue=0; % no cue |
1100 set(handles.popupmenuCueNoCue,'value', 2) | 1148 set(handles.popupmenuCueNoCue,'value', 2) |
1101 | 1149 |
1102 set(handles.editCatchTrialRate,'string','0 0 2 ');%no catch trials | 1150 set(handles.editCatchTrialRate,'string','0 0');%no catch trials |
1103 set(handles.editName,'string', 'Normal') % force name | 1151 set(handles.editName,'string', 'Normal') % force name |
1104 experiment.name=get(handles.editName,'string'); % read name back | 1152 experiment.name=get(handles.editName,'string'); % read name back |
1105 set(handles.editcalibrationdB,'string','0') | 1153 set(handles.editcalibrationdB,'string','0') |
1106 | 1154 |
1107 set(handles.popupmenuRandomize,'value',2) % fixed sequence | 1155 set(handles.popupmenuRandomize,'value',2) % fixed sequence |
1108 set(handles.editstimulusDelay,'string','0') | 1156 set(handles.editstimulusDelay,'string','0') |
1109 | 1157 |
1110 set(handles.editSaveData,'string', '0') | 1158 set(handles.editSaveData,'string', '0') |
1111 set(handles.editSubjectFont,'string', '10'); | 1159 set(handles.editSubjectFont,'string', '10'); |
1112 experiment.MacGThreshold=0; % num MacG spikes to exceed threshold | 1160 experiment.MacGThreshold=0; % num MacG spikes to exceed threshold |
1161 otherwise | |
1162 set(handles.editCatchTrialRate,'string','0.2 0.1');%no catch trials | |
1163 | |
1113 end | 1164 end |
1114 aResetPopupMenus(handles) | 1165 aResetPopupMenus(handles) |
1115 | 1166 |
1116 % --------------------------------------------- popupmenuCueNoCue_Callback | 1167 % --------------------------------------------- popupmenuCueNoCue_Callback |
1117 function popupmenuCueNoCue_Callback(hObject, eventdata, handles) | 1168 function popupmenuCueNoCue_Callback(hObject, eventdata, handles) |
1118 cueSetUp(handles) | 1169 cueSetUp(handles) |
1119 | 1170 |
1120 % ------------------------------------------------------------- cueSetUp | 1171 % ------------------------------------------------------------- cueSetUp |
1121 function cueSetUp(handles) | 1172 function cueSetUp(handles) |
1122 global stimulusParameters | 1173 global stimulusParameters experiment |
1123 | 1174 |
1124 chosenOption=get(handles.popupmenuCueNoCue,'value'); | 1175 switch experiment.threshEstMethod |
1125 if chosenOption==1 | 1176 case {'oneIntervalUpDown', 'MaxLikelihood'} |
1126 stimulusParameters.includeCue=1; | 1177 chosenOption=get(handles.popupmenuCueNoCue,'value'); |
1127 set(handles.editcueTestDifference,'visible', 'on') | 1178 if chosenOption==1 |
1128 set(handles.textcueTestDifference,'visible', 'on') | 1179 stimulusParameters.includeCue=1; |
1129 stimulusParameters.subjectText=stimulusParameters.instructions{2}; | 1180 set(handles.editcueTestDifference,'visible', 'on') |
1130 else | 1181 set(handles.textcueTestDifference,'visible', 'on') |
1131 stimulusParameters.includeCue=0; | 1182 stimulusParameters.subjectText=stimulusParameters.instructions{2}; |
1132 set(handles.editcueTestDifference,'visible', 'off') | 1183 else |
1133 set(handles.textcueTestDifference,'visible', 'off') | 1184 stimulusParameters.includeCue=0; |
1134 stimulusParameters.subjectText= stimulusParameters.instructions{1}; | 1185 set(handles.editcueTestDifference,'visible', 'off') |
1186 set(handles.textcueTestDifference,'visible', 'off') | |
1187 stimulusParameters.subjectText= stimulusParameters.instructions{1}; | |
1188 end | |
1135 end | 1189 end |
1136 | 1190 |
1137 % -------------------------------------------- popupmenuThreshEst_Callback | 1191 % -------------------------------------------- popupmenuThreshEst_Callback |
1138 function popupmenuThreshEst_Callback(hObject, eventdata, handles) | 1192 function popupmenuThreshEst_Callback(hObject, eventdata, handles) |
1139 aThresholdAssessmentMethod(handles); | 1193 aThresholdAssessmentMethod(handles); |
1759 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) | 1813 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
1760 set(hObject,'BackgroundColor','white'); | 1814 set(hObject,'BackgroundColor','white'); |
1761 end | 1815 end |
1762 | 1816 |
1763 | 1817 |
1818 | |
1819 | |
1820 function pushbuttonSave_Callback(hObject, eventdata, handles) | |
1821 global experiment | |
1822 | |
1823 subjectName=experiment.name; | |
1824 if ~isdir(['savedData' filesep subjectName ]) | |
1825 mkdir(['savedData' filesep subjectName ]) | |
1826 end | |
1827 | |
1828 % date and time and replace ':' with '_' | |
1829 date=datestr(now);idx=findstr(':',date);date(idx)='_'; | |
1830 fileName=[subjectName ' ' date '.mat']; | |
1831 movefile(['savedData' filesep 'mostRecentResults.mat'], ... | |
1832 ['savedData' filesep subjectName filesep fileName]) | |
1833 set(handles.pushbuttonSave,'visible','off') | |
1834 | |
1835 | |
1836 | |
1837 function editOHIOnTones_Callback(hObject, eventdata, handles) | |
1838 | |
1839 | |
1840 function editOHIOnTones_CreateFcn(hObject, eventdata, handles) | |
1841 | |
1842 % Hint: edit controls usually have a white background on Windows. | |
1843 % See ISPC and COMPUTER. | |
1844 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) | |
1845 set(hObject,'BackgroundColor','white'); | |
1846 end | |
1847 | |
1848 |