Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mgl:taskreferenceoverview [2013/01/10 17:16]
mgl:taskreferenceoverview [2015/01/28 17:32]
Line 49: Line 49:
 This call will handle opening up of the screen with appropriate parameters and setting the gamma table. This call will handle opening up of the screen with appropriate parameters and setting the gamma table.
  
-If you want to add specific parameters for your computer in [[mgl:​beta|mgl 2.0]] just use [[mgl:​taskReferenceFunctionReference#​mglEditScreenParams|mglEditScreenParams]]. ​In earlier versions of mgl you add a line like the following (while this way of specifying screen parameters still works it is basically obsolete, so its just written here as a reference). +If you want to add specific parameters for your computer in [[mgl:​beta|mgl 2.0]] just use [[mgl:​taskReferenceFunctionReference#​mglEditScreenParams|mglEditScreenParams]].
- +
-<code matlab>​ +
- myscreen.screenParams{1} = {'​yoyodyne.cns.nyu.edu',​[],​2,​1280,​1024,​57,​[31 23],​60,​1,​1,​1.8,'​calibFilename.mat',​[0 0]};  +
- myscreen = initScreen(myscreen);​ +
-</​code>​ +
- +
-This will set parameters for your screen. The parameters in order are +
- +
- * computerName +
- * displayName (optional--for computers with multiple displays like lcd and projector) +
- * displayNumber +
- * screenWidth (in pixels) +
- * screenHeight (in pixels) +
- * displayDistances (in cm) +
- * displaySize (in cm) +
- * framesPerSecond (in Hz) +
- * autoCloseScreen (1 to close screen at end of experiment, 0 to leave it open) +
- * saveData (1 to save data file, 0 not to save data file,n>1 saves a data file only if you exceed n number of volumes) +
- * monitorGamma (The monitor gamma to correct for if you do not have a calibration file. Macs are supposed to have a gamma of 1.8) +
- * calibFilename (the name of the calibration file--usually just the computer name--see below under moncalib) +
- * flipHV (Whether to flip the screen horizontally and/or vertically--an array of length two 0=no flip, 1 = flip)+
  
 ===== Setup the task structure ===== ===== Setup the task structure =====
Line 170: Line 149:
 </​code>​ </​code>​
  
-What it does is it looks in the "​thistrial"​ structure for what segment we are on, if we are not in segment one (i.e. the intertrial intervalit sets the motion coherence to 0otherwise ​it sets it to whatever the parameter coherence is set to (defined in the task.parameter.coherence field). It also sets the direction of motion of the dots.+What it does is it looks in the "​thistrial"​ structure for what segment we are on, if we are in segment one (the stimulus segment), it sets it to whatever the parameter coherence is set to (defined in the task.parameter.coherence field). Otherwise, we are in segment two (the intertrial interval), so we set coherence to 0 (random movement). It also sets the direction of motion of the dots.
  
 The second (and most important) callback is the one used to draw the stimulus to the screen: The second (and most important) callback is the one used to draw the stimulus to the screen: