Skip to content

Commit

Permalink
Bug fixes, feature lists, commenting.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswbishop committed May 16, 2014
1 parent 2aeba35 commit 1d4aad5
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 25 deletions.
9 changes: 9 additions & 0 deletions HINT_GUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
% false value means it will not be scored (scoring box
% invisible). (default = false for all elements)
%
% Development:
%
% 1) Need to add individual trial tracking data (e.g., id, words, etc.)
%
% Christopher W. Bishop (with help of GUIDE)
% University of Washington
% 5/14
Expand Down Expand Up @@ -119,6 +123,11 @@ function HINT_GUI_OpeningFcn(hObject, eventdata, handles, varargin)
% Quick check to make sure we have enough scoring information for all words
if length(p.isscored) ~= length(p.words), error('Scoring vector does not match number of words'); end

% Clear the current axes
% When test is restarted, it's important to clear the data stored on the
% axis from any previous text.
cla;

% Create axis labels
% Set XLabel, YLabel
set(get(handles.panel_plot, 'YLabel'), 'String', p.ylabel);
Expand Down
9 changes: 6 additions & 3 deletions HINT_modcheck_GUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
%
% Development:
%
% 1. Needs much faster initialization.
% 1. Need to store word information for quick access later. See variable
% 'w' below.
%
% 2. Reconfigure call to HINT_GUI so HINT_GUI just refreshes the plot.
% The modifier should populate the data in the axis.
%
% Christopher W. Bishop
% University of Washington
Expand Down Expand Up @@ -240,5 +244,4 @@
% Only close it down if we're done.
if trial==length(d.playback_list)
close(d.modcheck.figure);
end %

end %
28 changes: 11 additions & 17 deletions SIN_runTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ function SIN_runTest(testID, d, varargin)
% testID: cell containing the test ID. CWB opted to used a cell here
% in case he later wants to use a test list (meaning, running
% a sequence of tests in a specific order - perhaps a
% randomized order).
% randomized order). Alternatively, testID can be a string.
% This will be automatically converted to a cell within the
% function.
%
% d: SIN structure. See SIN_defaults. SIN_defaults will not be loaded if
% d is omitted.
%
% Parameters:
%
% 'play_list': cell array, stimulus play_list. ALternatively, this can
% be a cell array of directories from which all sounds
% are to be added to the playlist.
% 'play_list': cell array, stimulus play_list.
%
% 'randomize': bool, randomize play_list. (true | false ). Must be set
% in SIN_defaults.
Expand All @@ -45,6 +45,11 @@ function SIN_runTest(testID, d, varargin)
% o is a structure with additional options set by user
o=varargin2struct(varargin{:});

% Convert char to cell
if ischar(testID)
testID={testID};
end % if ischar

% Input checks
if numel(testID)~=1, error('Incorrect number of testIDs'); end
if ~isfield(o, 'play_list') || isempty(o.play_list), error('No play list specified'); end
Expand All @@ -54,17 +59,6 @@ function SIN_runTest(testID, d, varargin)

clear o; % clear o to remove temptation

%% RANDOMIZE PLAY LIST
% Randomize play list if specified by user
if randomize

% Seed random number generator
rng('shuffle', 'twister');

play_list=play_list{randperm(length(play_list))};

end % if o.randomize

% Loop through all tests (eventually)
for t=1:length(testID)

Expand All @@ -81,14 +75,14 @@ function SIN_runTest(testID, d, varargin)
% Seed random number generator
rng('shuffle', 'twister');

play_list=play_list{randperm(length(play_list))};
play_list={play_list{randperm(length(play_list))}};

end % if o.randomize



% Now, launch HINT (SNR-50)
portaudio_adaptiveplay(play_list, opts);
r = portaudio_adaptiveplay(play_list, opts);

case {'ANL'}
case {'PPT'}
Expand Down
6 changes: 1 addition & 5 deletions SIN_stiminfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@
list_name{i}=list_dir{i}(regexp(list_dir{i}, opts.list_filt):end-1);
wavfiles{i}= regexpdir(list_dir{i}, '.wav$', false);
end % for i=1:length(list_id)

% Assign to return variable
% varargout{1}=list_dir;
% varargout{2}=list_name;
% varargout{3}=wavfiles;

case {'ANL'}
warning('ANL SIN_stiminfo not well vetted');
opts=d.anl;
Expand Down
6 changes: 6 additions & 0 deletions modifier_dBscale.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
% worth moving it to the modifier field ... makes more intuitive sense to
% have it here.
%
% 4. Need a smarter way to store xdata and ydata. Perhaps provide an
% optional axis handle where the data can be written and stored for
% plotting purposes.
% - Working with the figure handle will allow us to simplify and
% isolate how data are passed between modifier and modcheck.
%
% Christopher W. Bishop
% University of Washington
% 5/14
Expand Down

0 comments on commit 1d4aad5

Please sign in to comment.