Differences

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

Link to this comparison view

mgl:taskreferencehowtos [2014/11/07 13:57]
mgl:taskreferencehowtos [2015/01/21 15:31]
Line 161: Line 161:
  
 See instructions on using [[:​mgl:​moncalib|moncalib]]. See instructions on using [[:​mgl:​moncalib|moncalib]].
- 
-===== Moncalib ===== 
- 
-To calibrate a monitor, you can use the program moncalib.m in the utils directory. It is set up to work with the PhotoResearch PR650 photometer/​colorimeter (which the Lennie lab has) and a serial port adaptor (use the one from the Carrasco lab it is a white Keyspan USA-28 and says Carrasco Lab on it--the one that is in the bag with the photometer is a white translucent Keyspan USA-28X B and doesn'​t seem to work properly). It can also be used with a Minolta or TopCon photometer/​colorimeter. The serial port interface for matlab is included in the mgl distribution but can also be found on the Mathworks website [[http://​www.mathworks.com/​matlabcentral/​fileexchange/​loadFile.do?​objectId=4952&​objectType=file|[1]]]. To use the Keyspan USA-28 adaptor you will need to download a driver from [[http://​www.keyspan.com/​downloads/​homepage_pn_usa28.spml|[2]]]. 
- 
-There are a few points that you should pay special attention to: 
- 
-  * When using the automated calibration via the serial port, the program will ask you to turn on the PR650 and then press '​return'​ within 5 secs. You might not want to press '​return'​ right away, or you may get something like this on the photometer: 
- 
-  PR650 REMOTE MODE  
-  (XFER) s/w ver 1.02  
-  CMD 51 NAK 
- 
-This indicates that you pressed the return while the photometer is waiting for a transfer signal (not sure what it is), and hence entered the XFER mode. If you wait another 2 secs or so it will enter the control mode, now press '​return'​ you should see this: 
- 
-  PR650 REMOTE MODE  
-  (CTRL) s/w ver 1.19  
-  CMD B 
- 
-Basically there is about 2-3 secs time window you should press '​return'​ to get to this state. 
- 
-  * When doing the automated calibration,​ turn off screensavers and energysaver,​ otherwise the screen will go blank after a while and you'll be measuring luminance of blank sreens. 
- 
-If you cannot install the serial port interface or don't want to automatically calibrate using the USB cable you can also use the program to run manually with any photometer by typing in the luminance measurements yourself. 
- 
-The program moncalib will save a calibration file in the local directory. For you to use this calibration file, you can store it in one of two places. Either in your own program directory under a directory called displays: 
- 
-  ./displays 
- 
-Or you can store it in the general displays directory 
- 
-  mgl/​task/​displays 
- 
-InitScreen should automatically find the correct table by checking your computer name and looking for the file in these two places. If you do not use the standard filename, or have multiple calibrations for the same computer (like if you have multiple monitors calibrated),​ you can use a specific file by setting myscreen.calibFilename 
- 
-  myscreen.calibFilename = '​mycalibrationfile.mat';​ 
-  myscreen = initScreen(myscreen);​ 
- 
-Note that the calibFilename can be a literal filename as in the above, or you can specify a portion of the name that will get matched in a file from the displays directory (e.g. computername_displayname would matcha any file in the displays directory that looks like *computername_displayname*.mat). 
- 
-The name of the file usually created by moncalib will be: 
- 
-  xxxx_computername_yymmdd.mat 
- 
-Where xxxx is a sequential number starting at 0001 and yymmdd is the date of the calibration. This stores a variable called calib which contains all the information about the calibration. You can quickly plot the data in calib by doing: 
- 
-  load 0001_stimulus-g5_LCD_061004 
-  moncalib(calib);​ 
- 
-The most important field of calib is the table field which holds the inverse lookup table to linearize the monitor. 
- 
-===== 10 bit gamma tables ===== 
- 
-The NVIDIA GeForce series of video cards have 10 bit gamma tables (these are the only ones we have tested): 
- 
-  * NVIDIA GeForce FX 6600 (In the G5 in the magnet room) 
-  * NVIDIA GeForce FX 7300 GT (brownie Mike Landy'​s psychophysics room) 
-  * NVIDIA GeForce FX ????? (Jackson the G5 in the psychophysics room) 
- 
-ATI 10 bit cards: 
- 
-  * any Randeon card for desktop computers above series 7000 has 10-bits DAC resolution (laptop cards don't have it necessarely or drivers do not access it) 
-  * some more information about this can be found on Denis Pelli webpage [[http://​vision.nyu.edu/​Tips/​VideoCards.html#​morebits|[3]]] and on the Psychtoolbox.org discussion group [[http://​psychtoolbox.org/​PTB-2/​mac.html#​drivers|[4]]]. 
- 
-It is always the best to use the bit test in moncalib because some drivers do not allow 10-bit control on 10-bit DAC cards. You can also query the display card to see if it says that it supports a 10 bit gamma: 
- 
-  displayInfo = mglDescribeDisplays 
- 
-Check the field gammaTableWidth to see if it is 10. 
- 
-===== Calibration devices ===== 
- 
-Moncalib can talk directly through the USB/serial port to the PhotoResearch PR650, Topcon SR-3A, Minolta CS-100a or Minolta LS-100. If you want to use another photometer you can input the readings manually or consider writing a few lines of code in moncalib to support your photometer type. 
- 
-Note that there are some commercially available devices to calibrate monitor screens which create color profiling information (e.g. [[http://​usa.gretagmacbethstore.com/​index.cfm/​act/​Catalog.cfm/​catalogid/​1861/​Subcategory/​Eye-One%20Solutions/​category/​Eye-One/​browse/​null/​MenuGroup/​_Menu%20USA%20New/​desc/​Eye-One%20Display%202.htm|[5]]] [[http://​www.xritephoto.com/​product/​optixxr/​|[6]]] [[http://​www.colorvision.com/​|[7]]]. We have tested one of these called Spyder2Pro which allows you to linearize the monitor output but found that is not yet suitable for psychophysics purposes. The calibration program crashes when you use the default settings to linearize the monitor (an email to the tech support confirmed this is a bug in their software). Using advanced settings it worked but it could only test luminance at 5 output levels. The linearization that it achieved was not accurate enough when tested with the PR650 (it looked like they are doing some sort of spline fit of the points and the luminance as a function of monitor output level looked like a wavy line around the ideal). 
  
 ====== How to run an experiment with the same random sequence as a previous one ====== ====== How to run an experiment with the same random sequence as a previous one ======
Line 271: Line 196:
 You can use a National Instruments card for digital I/O with mgl by doing the following: You can use a National Instruments card for digital I/O with mgl by doing the following:
  
-  -Download [[http://joule.ni.com/nidu/cds/​fn/​p/​sn/​n23:​3478.41.181.5994/lang/​en|NI-DAQmx Base]]. You may need to make a free account with NI.+  -Download [[http://www.ni.com/download/ni-daqmx-base-3.7/4272/en/|NI-DAQmx Base]]. You may need to make a free account with NI.
   -Make sure that the device (NI USB-6501) has up-to-date firmware, by running FWUpdate (included in Ni-DAQmx Base/bin)   -Make sure that the device (NI USB-6501) has up-to-date firmware, by running FWUpdate (included in Ni-DAQmx Base/bin)
   -Restart matlab if you have already run readDigPort (the program has to reinit the driver)   -Restart matlab if you have already run readDigPort (the program has to reinit the driver)