% ContrastThreshDemo
%
% Demonstration of measuring contrast thresholds in noise.
%
% Subprograms end with suffix "CT" to help keep the name
% space unpolluted.
%
% BUGS: Student Matlab 5.0 sometimes hangs up in a call to CmdWinToUpperLeft(),
% and continues if you hit Command-Period. Matlab 5.1 and 5.2 are ok.

% 6/24/96  dgp  Wrote it.
% 3/8/97   dhb  Vastly simplified dgp's version.  This makes it
%               much less close to a real experiment but
%               correspondingly easier to read.
% 1/12/98  dgp  Noted problem with Student Matlab.

% Set parameters
imageSize = 64;			  			% Image size in pixels
expandSize = 2;							% Amount to expand image for display
cyclesPerImage = 3;					% Spatial freq, c/image.
spaceConstant=imageSize/4;	% Gaussian grating envelope
durationMs = 200;						% Trial duration 	 	
nTrials = 20;								% Number of trials
noiseRmsContrast=0.2;				% Noise contrast
screenNumber = 0;						% Which screen are we running on?

% Run the experiment.
RunExperimentCT;


