Help File for LSM (Little Stimulus Maker)

by John Kelly, PhD.

 

Help topics denoted by '*' are Menu Items you would see when running LSM

 

*Theory of operation

Stimuli are created using "256-color" screen modes in VGA compatible video boards. This screen mode allows for rapid changes in screen color but at the cost of a fixed "image." The image will have a maximum of 256 different colors per frame, but each color can be rapidly changed for each frame. Why do this? Imagine that the monitor refresh rate is 85 Hz at a resolution of 800 x 600 pixels. Now try drawing a flickering grating at 42.5 hz. That means you need to change 800 x 600 x 3 colors = 1.44 million operations in 24 milliseconds and that is not very high resolution! You would need a video memory speed of 60 Mhz plus the overhead calculations needed to linearize the non-linear intensity output of the monitor, vary the contrast, color, drift, etc. of the stimulus. In addition, all of this would have to be timed to the vertical blanking of the screen during a refresh (also called 'flyback'). The vertical blanking period is typically shorter than 1 millisecond, so in theory, you would need a video bandwidth of 1.44 x10^9 Hz. The common alternative is to have all possible screens in video memory and simply switch between screens during the vertical blanking period. The problem with memory switching is that you would need lots of memory if you allow the user to vary contrast, color, drift, etc in real time.

In summary, 256 color mode is the fastest and simplest way to dynamically modulate the entire screen during the vertical blanking period. This is because 256 color mode uses a palette or look-up table that encodes the color for each pixel value (0..255) on the screen. Now the screen can be modulated by 256 x 3 colors = 768 operations. LSM has a maximum resolution 1280 horizontal by 1024 vertical pixels, but it will still be able to modulate a pattern of the entire screen every vertical refresh even at 85 Hz refresh.

 

*Generating a stimulus

LSM generates stimuli by independently defining functions for spatial, temporal, color, and drift. Currently, the program is limited to modulations about a mean level or background adaptation state.

The equation for resulting modulation is:

C = LUC (B (r,g,b) + M * A* spatial ( x + drift ) * temporal ( t ) * color vector (r,g,b))

Where r, g, b are Color Vectors for red, green, blue

C is the net modulation in contrast

M is the the starting / overall modulation

B() is the red, green, blue background vector, ranging from 0 to 1.0

A is 1.0 - B() (or mininum difference from Background)

spatial (x) is a function defining the stimulus intensity profile across x pixels, from 1 to 255 pixels

drift is a relative offset of the spatial function

Temporal (t) is a function defining the modulation of contrast over time in t vertical frame refreshes

Color Vector (r,g,b) defines the color of the stimulus by coefficients for the red, green, blue colors.

Note: Values for the spatial and temporal functions, and the color vectors range from -1.0 to 1.0

and LUC is the look-up table correction for the non-linear relationship between the 0-255 DAC values and the calibrated monitor luminance output (see next section).

 

Making a linear screen intensity with DAC output from 0 to 255

In order to properly construct a sine-wavegrating on the screen, the program must know how the intensity of each 0..255 grey level at the monitor. Typically, the monitor has an exponential non-linear relationship between the video boards output (0..255) and the resulting intensity on the monitor. The slope of the exponential increase is called the gamma given by the equation Luminance = (VOLTAGEin + epsilon )^ gamma, where epsilon relates to the offset level (black level when the Vin is 0). Most computer monitors typically run a gamma between 2.3 and 2.6 but can be very different for LCD or LED type displays. More information about gamma correction can be found at Charles Poynton's page:
http://www.inforamp.net/~poynton/GammaFAQ.html

Additional information about gamma correction can be found at:
http://www.parc.xerox.com/red/members/stone/vrml-cfwg/gamma/default.html

I also recommend visiting D. Pelli's page on non-linear properties of CRT displays at:
http://vision.nyu.edu/VideoToolbox/PixelIndependence.html

The LSM program uses another program called CalibRGB.exe that serially runs through all 0..255 grey levels for each red, green and blue output and measures the intensity of the monitor. However, there are special considerations in calibrating a monitor (see Brainard, 1989; Color Res. & Appl, 14, 23-34). In practice, you will need a photometer (cd/m2) or radiometer (microW/cm2). You won't need absolute calibation values for CalibRGB, but you will probably at some point need to know the absolute luminance of the screen. The photometer or radiometer should have a low pass analog filter (integrates light over a long time period) since the video output is actually flickering. For adequate calibration, the output of the photometer or radiometer should appear as a steady d.c. voltage at the 'voltage out' connector (or similar, if present).

The program can automatically calibrate the monitor at each of the 0..255 grey levels for each red, green, and blue output. You must install a National Instruments Lab PC+ board and connect the voltage output to channel 0 on the PC+. Otherwise, you will have to manually enter in numbers from the photometer/radiometer.
(**Note** the Lab PC+ board is no longer offered by National instruments, if possible try their PCI-1200 board, part # 777386-01).

BE SURE the gain on your photometer/radiometer is fixed (not on auto/variable gain). The CalibRGB program will help you find the optimal gain for the A/D conversion of your Lab PC+ board. First you must cycle through Red, Green, Blue screens at their maximum intensity to see if the photometer/radiometer is clipping (reached its maximal level). If possible, do this without the low pass filter. After you are sure the signal is not clipped then, initiate the low pass filter for all subsequent measurements. You will know if there is a low-pass filter if the photometer/radiometer output appears smooth, without any individual raster peaks. CalibRGB simultaneously graphs the input signal at channel 0 during the setup process so that you can monitor if any clipping is occuring.

You can then set a software gain on the Lab PC+ at its lowest (1) using the keyboard, then increase the gain on the photometer/radiometer up to the point where is no saturation for ANY of the red, green, blue screens. Do not use separate gains for each R,G,B as a common photometer gain will be used for all. The program uses a software gain on the Lab PC+ board to improve sensitivity at low intensity levels. Furthermore, a black screen is shown so that you can set the zero OFFSET of the photometer/radiometer. For the zero offset, set the gain on the Lab PC+ at its highest value (100) and completely block the light detector -- the program will measure the zero level and adjust the values accordingly.

If you do not have a National Instruments Lab PC+ (or PCI-1200) board, then you will have to manually enter the values into the program. This will take considerable amount of time since there are 256 * 3 = 768 individual measurements. You can enter a null value for any individual measurement and LSM will linearly interpolate missing values.

Once the program is setup correctly, it will run through each red/green/blue screen at each 0..255 grey level. It will plot the data on a graph, and then ask you if you want to save the data. The data will be saved in ASCII text, delimited by white spaces into four columns (DAC value 0..255, red, green , blue intensities). Note that if you want to calibrate the screen using a specific LSM configuration, you can choose that configuration from the file selection screen (default folder is \LSM\Configur.LSM).

*Bitmaps, screens, and spatial organization

LSM can save any screen in 256 color PCX format. This essentially saves a compressed digital copy of the entire screen in a file. Since LSM only works in 256 color mode, pixels in the bitmap will only have values from 0 to 255. A value of 0 is reserved for the background (which can be turned off). The remaining pixels ('palette attributes') are defined by the spatial period defined in the menu item Change the spatial period in (pixels) . Therefore, if you set the spatial period to 6 then the PCX file will have bitmap values of 0 to 6. LSM then uses the palette (look-up table) to paint the 0....6 pixels with a color vector and spatial and temporal functions. If the spatial function is a sqare, then the spatial function applied to the pixels will be in the order:

spatial function 1 1 1 -1 -1 -1

bitmap 1 2 3 4 5 6

bitmap 0 = adaptation color vector

LSM does not keep track of the spatial period of the bitmap files. Therefore, if you save your screens to a file you should keep track of the spatial period for that file. Why would you want to save the screen in a file? This allows you edit/customize the stimulus with a 256 color PCX graphics editor such as MS photo editor or Lview Pro. You must be certain that these programs treat the file as a 256-color or 256 palette image. The standard MS 'paint' programs as this will save graphics pictures in '.BMP' format. You will need to convert them into 256-color PCX files. Important! Do not save the file in 'True-color format.' It is recommend that you do not use any 'dithering' options either. If your video board supports 256 grey levels (such as the Matrox Millennium/Mystique line), then you will see the color scrambled in the PCX editor program. This is because most PC graphics programs expect the 256-color image to be in 63 grey level format. Yes, the PC standard was 63 grey levels per red, green, and blue, not 256! One solution is to temporarily define a custom luminance calibration file as the file 'GUNCAL.63'. Now the PCX editor program will process the colors correctly, but will have no effect when you reset the calibration file to 'GUNCAL.255'

Another advantage to PCX files is sequential presentation of complex stimuli. If you list more than 1 PCX file (up to 24 files if allowed by your current screen resolution setting and video board memory), then the program can serially run through the PCX file bitmaps by the menu item Set the number of vertical frames per PCX file and by the menu item Mouse varies the PCX file sequence . Note that the program may not be able to switch between bitmaps at the the frame rate or may be slower than the vertical blanking period. The later condiiton produces an artifact in which portions of two bitmaps to be present on the screen at the same time. Currently there is no fix for this problem. The solution might be to use a slower frame rate (if possible by the program varyH&V.exe).

 

*Vertical Frame rates

The monitor is actually paints the image on the screen about 60 times a second, or more. This is called the vertical refresh and all changes to the screen must be made during a very brief period when the screen is completely blank (the vertical blanking period). How often the monitor image is repainted (top to bottom, from left to right) is dependent upon many things. Currently, there are absolutely no standards in the PC world for the vertical refresh rate. Therefore, you can run LSM on two different machines and one program will run at 59.95 Hz and the other will run at 85 Hz. Amazing? To add to the confusion, the frame rate may also vary depending upon whether Windows is running in the background, what programs are already loaded into memory, and what programs are active in the background. For instance, after running LSM, then switching to Windows, you might find that the frame rate has changed. The simplest work around is to find the environment that best suits your frame rate and always stick to that protocol (i.e., running Windows only without program X, Y running in the background). In general, if you run exclusively under DOS, LSM is very well behaved and stable. You can get a close estimate of the frame rate with the menu item Check if the monitor Frame Rate . This estimate (in Hz) will be accruate to about +/- 0.5 Hz.

 

*Main Menu

Select the submenus (see below). Any item highlighted under the mouse pointer will become active with a button press. You can also use the cursor arrow keys to move through menu items. The screen will turn black when the mouse pointer when placed on top of the small square at the lower left of the screen. Like a screen saver, this is handy if you do not want the menus to be visible when you are not operating LSM.

 

*Run all stimulus chain files in sequence

if you have specified a number of configuration files, LSM will then serially run through all of the configuration files in their respective order. (You can always pick an individual configuration file from the main menu.) There will be a slight delay between running of each configuration. The program minimzes processing time between files when possible. Options that will slow down the program with each chain file include setting the resolution and prompts. You can setup LSM to continually run through all of the configuration files by setting the menu item Continually loop through Chain Files to "on." See Pixel Resolution,PCX,Trigger, Calib.,Chain Options Menu to select configuration files to add to the current configuration. Use the <Esc> key to quit out of a continual stimulus chain loop. Then you can save the configuration so that next time you will have all of the chained files ready to run. In order to keep track of which configuration files have chained files, you might put a different extension on the filename such as .exp. Note that any setting for a configuration file with chained files will be altered each time a chained confignuration file is loaded.

 

*Run Current Setup of configfile

This will run the stimulus configuration including any changes that you have made since you loaded a configuration file. You must Save the Current Configuration in a File if you want to keep the changes.

 

*Save Psychophysical data in file

When you have Open a subject data file for test sessions, this will save the data on disk in the Subjects folder under the LSM folder. The file will be an ASCII text file and will include the stimulus settings for each run and the relevant data for a method of adjustment or a 2-alternative forced choice experiment type. You can use Windows NOTEPAD or similar program to veiw and edit these files.

 

*Open a subject data file for test sessions

This will start a data file on disk in the Subjects folder under the LSM folder. The file is an ASCII text and will contain the stimulus settings for each run and the relevant data for a method of adjustment or a 2-alternative forced choice experiment type. If a file already exists, then the data will be appended on the end of the existing file. Currently, there is no data file output for epoch and VEP experiment types. Be sure to use Save Psychophysical data in file at the end of the experiment.

 

*OPTIONS- change settings, Stimulus parameters, etc. menu

runs the submenu OPTIONS- change settings, Stimulus parameters menuAllows you to change many options, see each individual menu item.

 

*Load a Configuration File

You will be shown a list of all files in the Configur.LSM folder under the LSM folder. This is the default folder where configuration files are saved (see Save the Current Configuration in a File) for more information. If the mouse pointer highlights a filename, the configuration file description is shown on the bottom line of the screen (if available). If there is no description for the file, the bottom line will report press <Esc> key to quit. You can select " .. <DIR.>" to move back one folder (directory) and select " . <DIR.>" to refresh the list of files (in the event you changed the folder contents under Windows and then switched to LSM). Move the mouse pointer to the bottom to scroll down and move the mouse pointer to the top to scroll up.

 

*OPTIONS- change settings, Stimulus parameters menu

*Change the number of trials

This sets the number of trials to run for a method-of adjustment or a 2-alternative forced choice experiment. If the experiment type is Epoch then this is the number of temporal cycle periods to show the stimulus. The maximum number is 255.

 

*Change the starting / overall modulation

This is the 'master' contrast coefficient, and will be the multiplier for all contrasts specified by the color vectors. Valid values are -1.0 to 1.0, where 1.0 is full (100%) contrast modulation. A negative number inverts (phase reverses) the contrast. As an example, if overall modulation is 0.5 and the Color Vectors are 1.0 (Red), 1.0 (Green), and 1.0 (Blue), then the resulting contrast will be white/black of 50% contrast. You can enter 999 to have LSM start each trial (or entire epoch period) to a random contrast coefficient.

 

*Change the temporal characteristics

This specifies how the contrast of the stimulus will be modulated over time. See Help item Generating a stimulus for more information. How long the modulation is per cycle is determined by Change the temporal cycle time (in vertical refreshes). Choices are:

*pulse -Pattern appears half of temporal period then homogeneous background the other half temporal period. Min period = 2
*square -square-wave contrast reversal, a full cycle is white-to-black. Minimum period = 2. Specifies 100% on then 100% off and always will be symmetric. If you set the temporal cycle time to 6 the values would be 1 1 1 -1 -1 -1
*sine -sinusoidal contrast reversal. Temporal period should be larger than 5 frames for adequate sinewave modulation.
*gaussian - gaussian modulation of fixed standard deviation. Stimulus appears to slowly increase then decrease in contrast over time.
*Random - dynamic modulation over time (randomly assigns overall contrast to -1 or 1). You can vary contrast by menu item Change the starting / overall modulation.
*Constant - no contrast modulation, the spatial pattern is stationary with constant contrast, but can be modulated by menu item Change the starting / overall modulation.
*TextFile - Temporal modulation per frame that you specify in an ASCII file. For temporal modulation, valid values range from -1 to 1. The file should be in the LSM\Waveform folder. For example, you can make a sawtooth contrast modulation of a temporal period of 5 vertical frames by creating an ASCII file with the following values:

; Put a comment after a semicolon on the fist line for a description (for selecting files)
.2
.4
.6
.8
1

 

*Change the temporal cycle time (in vertical refreshes)

Sets the duration of each "temporal cycle" For instance if the temporal characteristic is a square wave of 4 cycles then the pattern will have two screen refreshes bright and two screen refreshes dark. The minimum is 2 frames per cycle (this will basically provide square wave modulation under most conditions). The minimum should be 2 in most applications since a cycle time of 1 would produce the same modulation each frame. The fastest you can make a screen flicker is during one frame relative to another frame, therefore, the minimum is 2. The maximum cycle time is 1024 frames, which for a 60Hz refresh rate will be a total of (1/60 sec * 1024 = 17 seconds). Temporal cycle time does not apply to modulation by TextFile , which is fixed by the number of entries in the ASCII text file.

 

*Change the spatial characteristics from xxxxxx

This specifies how the contrast of the stimulus will be modulated over space, or, what the pattern will look like. See Help item Generating a stimulus for more information. Choices for xxxxxx are Square, Check, Grating, Gaussian, SineGrat, Gabor, Random, TextFile

*Square - creates a square centered on the screen of Screen Size X and Screen Size Y. In practice the spatial period need only be 1, but the program will automatically make a random array of dots and in the square and 'dither' contrast if spatial period is greater than 1. Dithering allows you to make finer adjustments in contrast than the 0-255 intensity levels at the expense of spatial resolution.

*Check - creates a checkerboard pattern in which the size of the square is determined by the spatial period (1-255). You can specify horizontal or vertical orientation for drifting and size considerations in the menu item Change the orientation. Screen Size X and Screen Size Y will set the overall size of the checkerboard. The Spatial period should be integer multiple of Screen Size so that you do not introduce an overall intensity offset

*Grating - creates a square-wave (sharp edge) grating in which the size of the square is determined by the spatial period (1-255). You can specify horizontal or vertical orientation for drifting and size considerations in the menu item Change the orientation. Screen size X and Screen Size Y will set the overall size of the grating, for instance if the orientation is horizontal, Screen Size Y =480, and period = 20, then the grating will have 24 full cycles. The Spatial period should be integer multiple of Screen Size so that you do not introduce an overall intensity offset

*Gaussian - creates a circular bitmap which has a gaussian intensity profile (looks like a fuzzy blob). This is good for measuring sensitivity to spots without the sharp edge effects. Screen size X and Screen Size Y can alter the circular bitmap to an ellipse shape.

*SineGrat - creates a sinewave grating pattern in which the size of each grating cycle is determined by the spatial period (1-255). You can specify horizontal or vertical orientation for drifting and size considerations in the menu item Change the orientation. Screen size X and Screen Size Y will set the overall size of the grating, for instance if the orientation is horizontal, Screen Size Y =480, and period = 20, then the grating will have 24 full cycles. The Spatial period should be integer multiple of Screen Size so that you do not introduce an overall intensity offset

*Gabor - creates a sinewave grating multiplied by a gaussian pattern. There are four grating cycles in each gaussian cycle. The entire cycle is determined by the spatial period (1-255). You can specify horizontal or vertical orientation for drifting and size considerations in the menu item Change the orientation. The Spatial period should be integer multiple of screen size so that you do not introduce an overall intensity offset

*Random - creates a square of randomly positioned pixels centered on the screen of screen size X and Screen Size Y. In practice the spatial period should be 255 for the least amount of spatial correlation. This is used for a random dot screen and can be made dynamic random dot by setting the Temporal modulation to random (you can also set a constant drift rate as well) . Note that this creates a fixed bitmap of random dots and is not truly a dynamic random dot since specific dots will be correlated. The best way to acheive a dynamic random dot screen is to load multiple PCX files of a random dot screen. See the menu item Load Stimulus Bitmaps from PCX File.

*Radial- creates a radial fan centered on the screen of Screen Size X and Screen Size Y. Setting orientation to horizontal or vertical has no effect. In addition, you need to set the spatial period to a mulitple of 8 of Screen Size X or Screen Size Y, whichever is larger. Currently, the only spatial luminance profile is a square wave. If you would like to have a different luminance profile, such as a sinewave, then save the bitmap as a PCX and define your luminance profile in a TextFile. Remember to match the spatial period of the PCX file for your TextFile!

*TextFile - creates an arbitrary spatial intensity profile that you specify in an ASCII file to the bitmap. Each value in the ASCII file is assigned to the bitmap values in the order of the file. That is, value 1 in the ASCII file is assigned to any bitmap pixel of value 1, value 2 in the ASCII file is assigned to any bitmap pixel of value 2, etc. The bitmap should be defined by using the menu item Load Stimulus Bitmaps from PCX File, otherwise, LSM defaults to a square centered on the screen. For spatial modulation, valid values range from -1 to 1. All basic stimulus modulation parameters (Change the starting / overall modulation modulation, drift, Color Vectors, temporal modulation, etc.) will apply to the arbitrary spatial intensity profile. However, Spatial Frequency Sweep Factor does not apply and the spatial period will be fixed by the number of entries in the file. The file should be in the LSM\Waveform folder. For example, you can make a single line centered within a black background of 5 pixels by creating an ASCII file with the following values:

; a comment after a semicolon on the fist line will be the description you see when you select files
-1
-1
1
-1
-1

 

*Change the spatial period in (pixels

Sets the full spatial cycle of the spatial pattern. The values are limited from 2 to 255 since the bitmap can only have values up to 255 in 256 color mode. For example, you cannot have a single sinewave of a grating larger than 255 pixels. For very large patterns, the best option is to use the lowest screen resolution (640x480) or use a square or gaussian pattern. Be careful to set the spatial period appropriately when using a bitmap from a PCX file. If the bitmap has values up to 255 and you set the spatial period to 128, then only half of the bitmap will be modulated according to the bitmap values. See Help item Generating a stimulus and Bitmaps, screens, and spatial organization for more information.

 

*Set the Spatial Frequency Sweep Factor

For Epoch Experiment types, this will dynamically reduce the spatial period at the end of each temporal period. Enter a value of 0 to turn off spatial frequency sweep. For Method of Adjustment Experiment types the spatial period can be dynamically changed by the menu item Set how the Mouse controls the stimulus with Method of Adjustment. If the Spatial Frequency Sweep Factor is between 0.1 and 0.9 then the Spatial Frequency Sweep Factor works as a multiplier of the spatial frequency. A value of 0.5 will reduce the spatial period by half at the end of each temporal cycle period. A value of 0.25 will reduce the spatial period by one quarter at the end of each temporal cycle period, etc. If the Spatial Frequency Sweep Factor is between 1 and n then the Spatial Frequency Sweep Factor linearly decreases the spatial frequency by that amount at the end of each temporal cycle period. For example A value of 2 will reduce the spatial period by 2 pixels at the end of each temporal cycle period. A file called 'Sweep_sf.dat' is created in the LSM\Subjects folder that contains an ASCII printout of the spatial periods used in the experiment.

 

*Change the orientation

sets the orientation of the bitmap on the screen, that is to horizontal or vertical bars etc.

*Horizontal - sets the orientation of the bitmap on the screen to horizontal lines, works with spatial patterns defined as Square, Check, Grating, Gaussian, SineGrat, Gabor, also works for spatial patterns with asymmetrical Screen size X and Screen Size Y dimensions.

*Vertical - sets the orientation of the bitmap on the screen to vertical lines, works with spatial patterns defined as Square, Check, Grating, Gaussian, SineGrat, Gabor, also works for spatial patterns with asymmetrical Screen size X and Screen Size Y dimensions.

 

*Set contstant drift or custom velocity options Menu

Allows you to set two independent drift parameters

 

*Add a constant drift rate (pixels/frame)

The stimulus pattern specified by Change the spatial characteristics from, is drifted by the number of pixels you specify. This drift is a constant velocity and is updated each vertical frame refresh. The maximum drift is the spatial period in pixels determined by the item Change the spatial period. If you enter a negative number, the drift will be in the opposite direction. The higher the number the faster the drift velocity (and vice versa). This works with any repeating pattern. Remember the direction can be affected by the orientation of the stimulus.

 

*Load drift values (per frame) from text file

The stimulus pattern specified by Change the spatial characteristics ,is drifted by the number of pixels/frame that you specify in an ASCII file. The file should be in the LSM\Drifts folder. See Add a constant drift rate (pixels/frame) for general rules for pattern drifting. For example, you can make a sawtooth drift (fast drift right followed by a slow drift left) by creating an ASCII file with the following values:

; a comment after a semicolon on the fist line will be the description you see when you select files
-5
1
1
2
2
3
3
4
4
5
5

This drift pattern will repeat itself according to the length of the ASCII file.The maximum number of entries is 1024, and no entry should be larger than 255 or smaller than -255. You should carefully pick the values with respect to the spatial period that you specify under the item Change the spatial period. Note that his drift pattern is superimposed on top of any constant drift set under the item Add a constant drift rate (pixels/frame).

 

*Clear the drift values from a text file

Turns off any drift that was specified by a text file under the item Load drift values (per frame) from text file. You must reselect a file from the LSM\Drifts folder to turn it back on.

 

*Change the Stimulus size (x by y )

Sets the size of the spatial pattern to X horizontal pixels by Y vertical pixels. This help file refers to these parameters as 'Screen Size X' and 'Screen Size Y' It will have no effect on PCX bitmaps loaded by the menu item Load Stimulus Bitmaps from PCX File as these will already have a fixed Screen Size X and Screen Size Y. When you create a bitmap with the menu item Save Stimulus Screen to .PCX File, the bitmap will already set to Screen Size X and Screen Size Y. You can enter any number up to 1280 x 1024 regardless of the screen resolution -- the picture will be clipped.

 

*Change the RGB Background vectors

This sets the mean luminance (the color adaptation state for the observer) for all color vectors and sets the background color (bitmap with value 0). Valid values range from 0 to 1.0. See Help item Generating a stimulus for more information. This is a scalar of the maximum relative intensity for each of the red, green and blue outputs. LSM has restrictions on the method of modulation - all modulation is about the adaptation level. If the adaptation is set at 0.0 then there will be no modulation of the stimulus. Typically, the RGB Background vectors will be set to half of its full range (0.5) for each red, green and blue. If you want a lower intensity background then you can enter a value less than 0.5 and greater than 0, but your modulation in michelson contrast can still be 0 to 100%. (Michelson contrast = (Lum max - Lum min) / (Lum max + Lum min). Likewise, if you want a higher intensity background then you can enter a value greater than 0.5 and less than 1.0 Note that a value of 0.5 maximizes the utility of the 0..255 grey levels. A value of 0 does not allow any modulation - this is handy if you want to completely turn off one of the red, green, or blue outputs.

If you want a bright stimulus on a black background, Change the spatial characteristics, to a TextFile where the bright colors are represented by 1.0 and the black background by -1. Leave the RGB Background vectors to (0.5 , 0.5, 0.5) and set Toggle Background fieldto Off.

 

*Change the Number of Color Vectors

Defines the color of your stimulus. A color vector ranges from -1.0 to 1.0. A white/black modulation is color vectors (1.0, 1.0, 1.0) and a red/green modulation is (1.0, -1.0, 0), and a blue yellow modulation is (-1.0, -1.0, 1.0), etc. The equation for resulting modulation is:

C = B (r,g,b) + M * A* spatial (x+drift) * temporal(t) * color vector (r,g,b)

Where r, g, b are color vectors for red, green, blue, and C is the net modulation in contrast, M is the the starting / overall modulation, B() is the RGB background vectors, A is 1.0 - B() (or mininum difference from Background), spatial(x in pixels) and temporal(time in vertical frame refreshes) are the spatial and temporal characteristic functions (ranging from -1 to 1), and color vector() determines color. Note that you can also use color vector to define contrast as well. For a 40% contrast white/black grating, the color vectors are (0.4, 0.4, 0.4). Use this technique to make a contrast sweep stimulus (see the C_sweep.lsm configuration file for a demo of a contrast sweep).

 

*Set the color vector presentation sequence

Lets you randomly or serially present different colors of your stimulus.

*Random - will randomly assign a color vector to each trial

*Serial - will present each color vector in the order that they were entered under the menu item Change the Number of Color Vectors

 

*Toggle Background field

Allows you to turn On/Off the background. When the background is On, any pixel with a bitmap value of 0 will be set to the color defined by the menu item Change the RGB Background vectors. When the background is off, any pixel with a bitmap value of 0 will be black.

 

*Check if the monitor Frame Rate

Determines the frame rate (in vertical refreshes) with the currently defined screen resolution. The program prompts you to hit a key/mouse button to continue then computes the frame rate for a 3 second period (the screen is black). The value it reports will only be accurate to +/- 0.5 Hz. For accurate calibration of the frame rate, measure the monitor with a photometer/radiometer detector and an oscilloscope. See Help item Vertical Frame rates for more information.

 

*Pixel Resolution/ PCX/ Trigger/ Calib./ Chain Options Menu

Runs submenu of items that affect pixel resolution, Bitmaps from PCX Files , external triggering via the parallel printer port (LPT:), luminance calibration files, and chaining together a series of configuration files into one configuration. See Help item Bitmaps, screens, and spatial organization for more information.

*Change screen resolution in horizontal pixels

Allows you to set the screen pixel resolution to 1 of 4 possibilities

*640 x 480
640 horizontal by 480 vertical resolution. Allows the highest vertical frame rate. Provides the most number of PCX files to be loaded.

*800 x 600
800 horizontal by 600 vertical resolution. Allows fewer number of PCX files to be loaded

*1024 x 768
1024 horizontal by 768 vertical resolution. Allows only few PCX files to be loaded with most video cards. You must have at least 1 megabyte of video memory.

*1280 x 1024
1280 horizontal by 1024 vertical resolution. Allows very few PCX files to be loaded with most video cards and vertical frame rate will be slower. You must have at least 2 megabytes of video memory.

 

*Load Stimulus Bitmaps from PCX File

Allows you to create a list of bitmap files (256 color PCX format) that provide the stimulus pattern.Once a PCX bitmap is loaded, that PCX bitmap stays active until you clear it. A bitmap is basically a digital copy of the pixels across the entire screen. Since LSM only works in 256 color mode, pixels in the bitmap will only have values from 0 to 255. A value of 0 is reserved for the background (which can be turned off) and the values 1 ... x define the spatial characteristics, of the stimulus in sequential order and x is the spatial period defined in the menu item Change the spatial period in (pixels) . The color of pixels 1 ... x is determined by the color vectors and spatial and temporal functions.
See Help item Bitmaps, screens, and spatial organization for more information.

The program does not keep track of the spatial period of the bitmap files. If you list more than 1 PCX file (up to 24 files, which is limited by your current screen resolution setting and video board memory), then the program can serially run through the PCX file bitmaps by the menu item Set the number of vertical frames per PCX file and by the menu item Mouse varies the PCX file sequence . Note that the program may not be able to switch between bitmaps at the the frame rate or may be slower than the vertical blanking period. The later condition produces an artifact in which portions of two bitmaps to be present on the screen at the same time. Currently there is no fix for this problem.

 

*Save Stimulus Screen to .PCX File

Will allow you to save the current stimulus bitmap to a file. This file can then be edited or customized by a 256 color PCX graphics editor such as MS photo editor, Lview Pro, Paint Shop Pro, Matlab. Do not use 'paint' programs as this will save them in BMP format. Important! Do not save the file in 'True-color format.' It is recommend that you do not use any 'dithering' options either. See Help item Bitmaps, screens, and spatial organizationfor more information.

 

*Clear the list of all Stimulus Bitmap PCX Files

If you have defined a list of bitmap files this will clear the list of files created by Load Stimulus Bitmaps from PCX File. The stimulus will default to the previously defined spatial pattern.

 

*Set the number of vertical frames per PCX file

If a list of more than one PCX file is created by Load Stimulus Bitmaps from PCX File, then you can specifiy the number of vertical frames (in vertical refeshes) that each PCX file is shown in the list.

 

*Set Stimulus Trigger Codes (output to LPT1) for each color vector

LSM allows external triggering via the parallel printer port (LPT:) for each different Color Vector you define. The pulse occurs at the end of each temporal cycle that is timed to the vertical blanking onset (see menu item Change the temporal cycle time (in vertical refreshes)). The experiment type should be set to Epoch. The codes you enter will be binary codes that will be pulsed (about 100 microseconds depending upon the speed of your computer) at the end of each temporal cycle at pins 2 to 9, representing binary digits 0 to 7 respectively. For instance, if you want a trigger code of 1, then pin 2 will have a TTL high pulse of about 100 microseconds at the end of y (temporal cycles) vetical refereshes. If you want a trigger code of 255, then pins 2 to 9 will all have a TTL high pulse of about 100 microseconds at the end of y (temporal cycles) vetical refereshes. If you want the trigger to occur at a different timing than the temporal cycle time, you can define a custom trigger cycle time by the menu item Set a custom length in vertical frames for Stimulus Trigger Cycle. The number of codes you enter will be assigned in serial order to the order of the Color Vectors defined by the menu item Change the Number of Color Vectors.

 

*Set a custom length in vertical frames for Stimulus Trigger Cycle

Allows you to change the trigger timing to any number of vertical refreshes from 1 to 32766 vertical frames. A TTL high pulse of about 100 microseconds will occur at the vertical blanking onset. The pulse is output to pins 2 to 9 via the parallel printer port (LPT:), which is coded for each Color Vector by the menu item Set Stimulus Trigger Codes (output to LPT1) for each color vector.

 

*Select an custom RGB luminance calibration file

Allows you to load a luminance calibration file created by the CalibRGB program. This way, you can use two different monitors, or different display devices each with its own calibration. See Help item Making a linear screen intensity with DAC output from 0 to 255 for more information.

 

*Select stimulus configuration files to Chain together

Allows you to load multiple configuration files from the folder LSM\Configur.LSM and run them in serial order or individually.

 

*Clear all stimulus configuration Chain files

Clears the list of any chained configuration files created by the menu item Select stimulus configuration files to Chain together.

 

*Continually loop through Chain Files

Allows you to continually loop through the configuration files defined by the menu item Select stimulus configuration files to Chain together. You will have to press the Esc key to quit out of the loop.

 

 

*Set the Experiment type

runs submenu items Psychophysics: Method of Adjustment, Psychophysics: 2-Alternative Forced Choice Method, Basic Stimuli Epochs: Run Set Stimulus Periods, Visual Evoked Potential Electrophysiology <not available>

 

*PsychoPhysics: Method of Adjustment

use this setting if you would like to continuously adjust the stimulus to a threshold, or adjust the stimulus to some specific criterion. For example, you would adjust the contrast of a grating until it is just visible. Use the mouse to vary the stimulus characteristic until the threshold/criterion has been met then hit the <Enter> key. Use the mouse buttons for discrete steps and roll the mouse for large adjustments. The stimulus will be continuously running until the <Enter> key has been pressed.

When you select Method of Adjustment (MOA):

Number of trials determines how many trials will run for each adjustment.

You can select how the mouse adjusts the stimulus under the menu item Select How the Mouse Controls the Method of Adjustment.

There will be no trigger pulses put out on the printer port LPT1.

 

 

*Psychophysics: 2-Alternative Forced Choice Method

The basic 2-AFC task is to choose which of 2 trials contained a specific stimulus of interest. The program will generate a "beep" then show one trial, then beep again and show the next trial. One of the trials show have a blank stimulus or a "control" stimulus. There is a .5 sec pause between trials. What is shown on each trial depends on how you have configured the stimulus options. You can vary contrast levels by setting the number of Color Vectors. You can also vary stimulus patterns on each trial by loading up a series of PCX images. Here are typical examples of a 2-AFC experiment:

1) You want to measure a contrast threshold to a 12 Hz flickering sinewave grating:

- Change the spatial characteristics, to SineGrat (sinewave grating pattern)

- Change the spatial period to how many pixels you want each cycle of the grating.

- Change the temporal characteristics to SineGrat (sinewave contrast modulation)

- Change the temporal cycle time to how many vertical frames for a full temporal cycle. If you have already measured the frame rate of the monitor then the program will inform you of the temporal frequency in Hz. This also sets the duration of stimulus presentation for each trial to only one cycle. You can always create an ASCII file with many sinewave cycles for a longer presentation period.

- Change the Number of Color Vectors to how many contrast levels you want to measure. You will be asked for each color vector (red, green, blue) in order.

- Change background vectors to the appropriate baseline level (usually 0.5 for red, green, blue).

- Change the number of trials (N) to how many trials you want to run at each Color Vector. The total number of double trials = Number of Color Vectors * N

- Set the color vector presentation sequence to Random.

When you run the configuration, one of the two trials will be randomly assigned a grating of one temporal cycle in duration. If you have opened a subject data file, the printout will include on a trial by trial basis the contrast, the trial with the grating and the the user’s response (usually Left Mouse Button for stimulus on the first trial, Right Button for second trial).

 

2) You want to measure a positional offset threshold to a bisected vertical line:

-Change the spatial characteristics , to SineGrat (sinewave grating pattern)

- Change orientation to Vertical.

- Change the Stimulus size in Horizontal pixels to the width you want the vertical line.

- Change the spatial period to the same number of pixels.

Then through the Pixel Resolution/ PCX/ Trigger/ Calib./ Chain Options Menu, choose Save the stimulus to PCX file. This file then should be edited with a PCX editing program (such as Lview Pro), where the Vertical pattern can be cut and moved into specific offsets. Create separate files for each offset. These files should remain in the LSM\Pictures folder. When you configure your experiment, to the Pixel Resolution/ PCX/ Trigger/ Calib./ Chain Options Menu, choose Load Stimulus Bitmaps from PCX File and select all of the files with the offset. The first file in the list will be used in all trials as the "control" comparison. Be sure to keep the spatial period the same with any configuration file that reads the PCX file, or else only a portion of the bitmap will be modulated.

When you run the configuration, one of the two trials will be randomly assigned the first image in the PCX file list and the other trial will randomly assign one of the remaining PCX files. Again, the duration of each trial is determined by the temporal cycle time (in vertical refreshes). If you have opened a subject data file, the printout will include on a trial by trial basis the PCX file name on the first and the second trial respectively, and the the user’s response (usually Left Mouse Button for stimulus on the first trial, Right Button for second trial).

Note that all other configuration options (e.g., drift, Change the starting / overall modulation, color vectors) remain in effect for any 2-AFC experiment.

 

*Basic Stimuli Epochs: Run Set Stimulus Periods

This will make LSM create a stimulus for a specific amount of time, which cannot be varied by the user. The duration of the stimulus in total vertical refreshes is determined by

temporal cycle time * Number of Trials/Epoch Periods

The temporal cycle time is limited to 1024 and the number of epoch periods is limited to 255, which results in a maximum of 261120 frames. Even at 85 Hz this will be 3072 seconds.

 

*Visual Evoked Potential Electrophysiology <not available>

This option is for future expansion of concurrent recording of an electrical signal.

 

*Set how the Mouse controls the stimulus with Method of Adjustment

runs a submenu with items Mouse varies the overall Contrast, Mouse varies the Color Vector Sequence, Mouse varies the continuous drift Rate, Mouse varies the Spatial Frequency, Mouse varies the PCX file sequence .

 

*Mouse varies the overall Contrast

In a method of adjustment experiment type, rolling the mouse will dynamically increase or decrease the contrast. Use the left or right mouse button to increase or decrease the contrast in discrete steps. This actually varies the overall modulation

 

*Mouse varies the Color Vector Sequence

In a method of adjustment experiment type, rolling the mouse will dynamically run through the Color Vectors. The left or right mouse button will step through the Color Vectors in discrete steps. The maximum number of Color Vectors is 18. This is useful for heterochromatic flicker matching or general color matching.

 

*Mouse varies the continuous Drift Rate

In a method of adjustment experiment type, rolling the mouse will dynamically increase or decrease the rate of drift. The left or right mouse button will step through discrete steps in drift rate. This is useful if you want to measure velocity thresholds. The drift rate will be limited to +/- the spatial period of the pattern.

 

*Mouse varies the Spatial Frequency

In a method of adjustment experiment type, rolling the mouse will dynamically increase or decrease the the spatial period of the pattern contrast depending on the value entered in the Set the Spatial Frequency Sweep Factor. The left or right mouse button will step through discrete steps in spatial period. This is useful for measuring acuity or spatial resolution thresholds.

 

*Mouse varies the PCX file sequence

In a method of adjustment experiment type, rolling the mouse will dynamically run through the list of PCX.files specified under the Load Stimulus Bitmaps from PCX File menu item. The left or right mouse button will step through each bitmap screen in discrete steps. This allows rapid variation of the screen pattern.

 

*Prompts before each experiment

When On, allows you to pause the program and wait for a key press /mouse button press before running. If Off, the program will immediately start running the stimulus configuration.

 

*Run auxillary DOS programs (i.e., Calibration etc.) menu

Runs a submenu Choose a program to run, you will return back to this program

 

*Choose a program to run, you will return back to this program Menu

This allows you to run programs while LSM is still running in the background.

 

*Temporarily go to MS-DOS prompt (type Exit to return to LSM)

Pops you into the DOS operating system (MS-DOS Prompt). Type ‘exit’ at the DOS prompt to return to LSM. The program will automatically set the default folder to LSM.

 

*Vary and set the video board timing with 'varyh&v'

Runs a program called VaryH&V.EXE in the LSM folder. This program comes with LSM. It gives you limited control over the horizontal and vertical timings of the monitor by directly varying the VGA CRTC registers and the 640/720 dot clock. YOU MUST HAVE A VGA COMPATIBLE VIDEO BOARD TO PROPERLY RUN THIS PROGRAM. Most video boards do follow the VGA standard to some extent but not always. It is a simple program that lets you see a sample screen and test the vertical frame rate while varying the CRTC registers. There are no checks that the settings you enter will be valid. If the screen goes blank, hit the Esc key to cancel. You can setup for all valid screen resolutions and save the settings. If you have saved your settings then LSM will automatically read and then set the video to those settings each time the program runs the specified resolution.

 

*Run RGB luminance calibration with a photometer

Runs a program called CalibRGB.EXE in the LSM folder. This program comes with LSM. See the section entitled Making a linear screen intensity with DAC output from 0 to 255.

 

*Run the MS-DOS text editor

Runs the default DOS text editor ‘Edit.exe’ if the program is installed on your machine. Useful for editing ASCII files in the LSM\Waveform, LSM\Subjects, LSM\Configur.LSM, and LSM\Drifts folders. You will return to LSM after exiting Edit.

 

*Run NOTEPAD (if running Windows in the background)

If Windows is running in the background (you double clicked on LSM from a Windows folder), you will pop back into Windows with the default text editor. Useful for editing ASCII files in the LSM\Waveform, LSM\Subjects, LSM\Configur.LSM, and LSM\Drifts folders. You must select MS-PROMPT (LSM) from windows to return to LSM.

 

*Check the Calibration of your monitor

Runs through red, green, blue and white screens (of the currently defined Screen Size X and Screen Size Y values) in steps of DAC values from 0 to 255. The values are from the luminance calibration file and may represent relative analog-to-digital values.

 

*Save the Current Configuration in a File

Saves the configuration in the LSM\Configur.LSM folder. The text you enter for the Stimulus Description, will be printed out at the bottom of the screen when you select menu item: Load a Configuration File.