hetero chromatic flicker

Upload: mihai-bogdan

Post on 09-Jan-2016

285 views

Category:

Documents


0 download

DESCRIPTION

252981906-

TRANSCRIPT

HeterochromaticFlickerSimplified demonstration of heterochromatic flicker photometry on ArduinoUpdatedSep 3, [email protected] Introduction Details Arduino sketch (heterochromaticFlicker.ino) Counting the "button presses" during sampling period Limiting how often subject can confirm Arduino Debug ( heterochromaticFlickerExclIncrementDecrements.ino) Python GUI (heterochromaticFlicker.py) LabVIEW VI (heterochromaticFlicker.vi) Scientific References Heterochromatic flicker photometry Commercial products Critical Flicker Fusion (CFF) measurements Commercial productsIntroductionDemonstration how to alternate between different LED channels as is needed to implement psychophysical techniques such asheterochromatic flicker photometryorcritical flicker fusionmeasurement. Arduino had been used similarly in the work ofSun et al.(Hillman Lab, Columbia University) to control LED lights in their open-sourceSPLASSHframework for multispectralin vivoimage acquisition. SeeHeterochromaticFlicker#Scientific_Referencesfor further information.

Demonstration of heterochromatic flicker technique using our proposed Arduino-based system and LabVIEWDetailsThe basic idea for the heterochromatic flicker photometry implementation is that there aretwoLEDs of different color (heterochromatic) which are switched on in counter-phase.1. LED 1 is ON for first 500 ms of 1000 ms while LED 2 is OFF during this period2. LED 1 is OFF for the second 500 ms of 1000 ms while the LED 2 is ON during this periodThis is considered to flicker at a frequency of 2 Hz maybe counter-intuitively to people with engineering background that might take this scheme to have to rectangular signals having a frequency of 1 Hz to be phase-shifted 180 degrees in respect to each other.In our implementation, the subject of the experiment is faced with a flickering annulus (ring of light) and is asked to adjust the intensity of only the other LED, until theperceptionof flicker is eliminated or minimized. The other LED is set at fixed level by the experimenter.The subject responses are read using digital inputs of which 2 are needed for 1-axis joystick indicating subject's desire to increase or decrease light intensity, and 1 digital input is needed to read the "confirm"button that the subject is instructed to press when he perceives no flickering. Thus, the joystick and the button are connected to a 5V power supply and ground via pulldown resistors and when pressed the Arduino detects that digital pin to be HIGH.We don't want to change the light intensity during the 500ms/500ms flicker period, thus the digital inputs are buffered during the whole second cycle and decision of whether subject asked is done based on these buffered samples. Thus, a sampling rate of 1 Hz for digital input in theory would be sufficient if subject pressed long enough the buttons and joystick.In our application, Arduino need to return the intensity values (duty cycles in other words) of the both LEDs when the subject presses the confirm button (which can be combined with some other data if needed in the Python GUI and written to disk as a text file for example usingttylog)Arduino sketch (heterochromaticFlicker.ino)Compared to other examples (ControlPWMandCueLightTask), additional conditional rules need to be introduced to make sure that the system behaves as we like it to behave:Counting the "button presses" during sampling periodWe can count how many times the subject presses the button during the 1 sec sampling period. The resolution of counting depends on the digital sampling rate, in practice we get around 20 samples per second with current settings. We can then set a threshold of for counts that can be considered as a "real press", in our case only one was sufficient but in some other applications this check could be useful.For tutorial on debouncing the digital input (filter noise), see the tutorial ofLadyAdaor our other exampleCueLightTask.The variables are initialized as following: // i.e. the number of each channel pressed during // the 1 second period (2xflickerPeriod) int count_joystickUP = 0; int count_joystickDown = 0; int count_buttonPressed = 0; // if pressed or not int boolean_joystickUP = LOW; int boolean_joystickDown = LOW; int boolean_buttonPressed = LOW;The basicfor-loop in The Arduino sketch for the flickering scheme looks like the following: for (int i = 1; i = pressThreshold) { boolean_joystickUP = HIGH; // ledOut_ch1++; } // Evaluate whether the buttons are really pressed if (count_joystickDown >= pressThreshold) { boolean_joystickDown = HIGH; // ledOut_ch1--; }Now the user control of the LED is hard-wired only the 'ch1', but could be modified to be switch-controlled from the Python GUI for example. This was omitted from the example from the sake of simplicity.Python GUI (heterochromaticFlicker.py)The basic implementation of Python GUI is simple with only two sliders for adjusting the intensity of the flickering lights: def on_changed(self, widget): val = widget.get_value() name = widget.get_name() if name == "Channel1": self.ser.write("b" + chr(int(val))) elif name == "Channel2": self.ser.write("g" + chr(int(val))) else: print "ERROR: Invalid widget name, in on_changed function"The case conditional to identify which LED channel want to be modified is implemented similarly as for other examples (ControlPWMandCueLightTask)Screen capture of the heterochromatic flicker Python GUI.LabVIEW VI (heterochromaticFlicker.vi)As shown inControlPWM, LabVIEW can be used to control the LEDs using Arudino.Demonstration of how to use LabVIEW with Arduino is done using theLabVIEW Interface for Arduino(LIFA) package provided byNational Instruments(NI, the company behind LabVIEW and vast selection of data acquisition instruments). The example is modified from the example "Simple LED" provided by NI.You need to upload the Arduino sketchLVIFA_base.pdein order to make Arduino responsive to commands sent from LabVIEW:Screen capture of LVIFA_base.pde with its accompanying files.The LabVIEW Virtual Instrument block diagram for the heterochromatic flicker looks like that without user inputs (to increment/decrement LED intensity):

Screen capture of the block diagram of LabVIEW heterochromatic flicker photometry.The corresponding front panel GUI looks as following:

Scientific ReferencesHeterochromatic flicker photometry Wagner, Gunther, and Robert M. Boynton. Comparison of Four Methods of Heterochromatic Photometry.Journal of the Optical Society of America 62, no. 12 (December 1, 1972): 15081515.http://dx.doi.org/10.1364/JOSA.62.001508. Silver, Priscilla H. A Grey Squirrel Spectral Sensitivity by Heterochromatic Flicker and Its Implications.Vision Research16, no. 11 (1976): 1235 1239.http://dx.doi.org/10.1016/0042-6989(76)90047-X. Kelly, D. H., and D. van Norren. Two-band Model of Heterochromatic Flicker.Journal of the Optical Society of America67, no. 8 (1977): 10811091.http://dx.doi.org/10.1364/JOSA.67.001081. Werner, John S., Seaneen K. Donnelly, and Reinhold Kliegl. Aging and Human Macular Pigment Density.Vision Research 27, no. 2 (1987): 257268.http://dx.doi.org/10.1016/0042-6989(87)90188-X. Lee, B B, P R Martin, and A Valberg. The Physiological Basis of Heterochromatic Flicker Photometry Demonstrated in the Ganglion Cells of the Macaque Retina.The Journal of Physiology404, no. 1 (October 1, 1988): 323 347.http://www.ncbi.nlm.nih.gov/pubmed/3253435. van den Berg, Thomas J. T. P, J.K. Ijspeert, and P.W.T. de Waard. Dependence of Intraocular Straylight on Pigmentation and Light Transmission Through the Ocular Wall.Vision Research31, no. 78 (1991): 13611367.http://dx.doi.org/10.1016/0042-6989(91)90057-C. Kraft, James M., and John S. Werner. Spectral Efficiency Across the Life Span: Flicker Photometry and Brightness Matching.Journal of the Optical Society of America A11, no. 4 (April 1, 1994): 12131221.http://dx.doi.org/10.1364/JOSAA.11.001213. Bone, Richard A., and John T. Landrum. Heterochromatic Flicker Photometry.Archives of Biochemistry and Biophysics430, no. 2 (October 15, 2004): 137142.http://dx.doi.org/10.1016/j.abb.2004.04.003. Wooten, Billy R, Billy R Hammond, and Lisa M Renzi. Using Scotopic and Photopic Flicker to Measure Lens Optical Density.Ophthalmic & Physiological Optics27, no. 4 (July 2007): 321328.http://dx.doi.org/10.1111/j.1475-1313.2007.00489.x. Hagen, Stefan, Ilse Krebs, Carl Glittenberg, and Susanne Binder. Repeated Measures of Macular Pigment Optical Density to Test Reproducibility of Heterochromatic Flicker Photometry.Acta Ophthalmologica88, no. 2 (March 1, 2010): 207211.http://dx.doi.org/10.1111/j.1755-3768.2008.01418.x. Bartlett, Hannah, Olivia Howells, and Frank Eperjesi. The Role of Macular Pigment Assessment in Clinical Practice: a Review. Clinical and Experimental Optometry 93, no. 5 (September 1, 2010): 300308.http://dx.doi.org/10.1111/j.1444-0938.2010.00499.x. Barboni, Mirella Telles Salgueiro, Gobinda Pangeni, Dora Fix Ventura, Folkert Horn, and Jan Kremers. Heterochromatic Flicker Electroretinograms Reflecting Luminance and Cone Opponent Activity in Glaucoma Patients.Investigative Ophthalmology & Visual Science(July 21, 2011).http://dx.doi.org/10.1167/iovs.11-7538. OBrien, Kevin, Bill Smollon, Bill Wooten, and Billy Hammond. Determining Heterochromatic Flicker Photometry Frequency for Macular Pigment Optical Densitometry by Critical Flicker Fusion Frequency.Journal of Vision11, no. 15 (December 27, 2011): 5555.http://dx.doi.org/10.1167/11.15.55. van den Berg, Thomas J.T.P., Luuk Franssen, Bastiaan Kruijt, and Joris E. Coppens. Psychophysics, Reliability, and Norm Values for Temporal Contrast Sensitivity Implemented on the Two Alternative Forced Choice C-Quant Device.Journal of Biomedical Optics16, no. 8 (2011): 085004.http://dx.doi.org/10.1117/1.3613922. Brown, TimothyM., Sei-ichi Tsujimura, AnnetteE. Allen, Jonathan Wynne, Robert Bedford, Graham Vickery, Anthony Vugler, and RobertJ. Lucas. Melanopsin-Based Brightness Discrimination in Mice and Humans. Current Biology 22, no. 12 (June 19, 2012): 11341141.http://dx.doi.org/10.1016/j.cub.2012.04.039.Commercial products Oculus C-Quantstraylight meter, which was further modified byvan den Berg et al., 2011with custom Matlab code. PerimetersfromOptosforflicker perimetryapplications for example. Macuscope, The MacuScope is a "heterochromatic flicker photometer" - the gold standard for measuring macular protective pigment density (MPPD). SeeYouTube videoto see the Macuscope in action. MPS 9000 Macular Pigment Screener, commercially available? Evaluated in the following papers e.g.:Bartlett et al., 2010,Loughman et al., 2011andMurray et al., 2011Critical Flicker Fusion (CFF) measurements Porter, T. C. Contributions to the Study of Flicker. Paper II.Proceedings of the Royal Society of London70 (January 1, 1902): 313329. Ives, Herbert E. Critical Frequency Relations in Scotopic Vision.Journal of the Optical Society of America6, no. 3 (May 1, 1922): 254267.http://dx.doi.org/10.1364/JOSA.6.000254. Hecht, S, S Shlaer, and C D Verrijp. Intermittent Stimulation by Light: II. The Measurement of Critical Fusion Frequency for the Human Eye.The Journal of General Physiology17, no. 2 (November 20, 1933): 237249.http://www.ncbi.nlm.nih.gov/pubmed/19872776. Hecht, S, and S Shlaer. Intermittent Stimulation by Light: V. The Relation Between Intensity and Critical Frequency for Different Parts of the Spectrum.The Journal of General Physiology19, no. 6 (July 20, 1936): 965977.http://www.ncbi.nlm.nih.gov/pubmed/19872976. De Lange DZN, H. Relationship Between Critical Flicker-Frequency and a Set of Low-Frequency Characteristics of the Eye.Journal of the Optical Society of America44, no. 5 (May 1, 1954): 380388.http://dx.doi.org/10.1364/JOSA.44.000380. Truss, Carroll Vance. Chromatic Flicker Fusion Frequency as a Function of Chromaticity Difference.Journal of the Optical Society of America47, no. 12 (December 1, 1957): 11301134.http://dx.doi.org/10.1364/JOSA.47.001130. Brown, JL. Flicker an Intermittent Stimulation. In Vision and Visual Perception, edited by Clarence Henry Graham. New York: John Wiley & Sons Inc, 1965. Ong, J, and T Wong. Effect of Ametropias on Critical Fusion Frequency. American Journal of Optometry and Archives of American Academy of Optometry 48, no. 9 (September 1971): 736739.http://www.ncbi.nlm.nih.gov/pubmed/5292020. Conner, J D. The Temporal Properties of Rod Vision.The Journal of Physiology332 (November 1982): 139155.http://www.ncbi.nlm.nih.gov/pubmed/7153925. Nygaard, R.W., and T.E. Frumkes. Frequency Dependence in Scotopic Flicker Sensitivity.Vision Research25, no. 1 (1985): 115127.http://dx.doi.org/10.1016/0042-6989(85)90085-9. Raninen, Antti, and Jyrki Rovamo. Perimetry of Critical Flicker Frequency in Human Rod and Cone Vision.Vision Research26, no. 8 (1986): 12491255.http://dx.doi.org/10.1016/0042-6989(86)90105-7. Curran, Stephen, and John P. Wattis. Critical Flicker Fusion Threshold: a Useful Research Tool in Patients with Alzheimers Disease.Human Psychopharmacology: Clinical and Experimental13, no. 5 (1998): 337355.http://dx.doi.org/10.1002/(SICI)1099-1077(199807)13:53.0.CO;2-P. Diana Racene, "Computerized device for critical flicker fusion frequency determination",Proc. SPIE5123, 349 (2003);http://dx.doi.org/10.1117/12.517043 Vianya-Estop, Marta, William A Douthwaite, Konrad Pesudovs, Bruce A Noble, and David B Elliott. Development of a Critical Flicker/fusion Frequency Test for Potential Vision Testing in Media Opacities.Optometry and Vision Science81, no. 12 (December 2004): 905910.http://www.ncbi.nlm.nih.gov/pubmed/15592114. Hammond, Billy R Jr., and Billy R Wooten. CFF Thresholds: Relation to Macular Pigment Optical Density.Ophthalmic and Physiological Optics25, no. 4 (July 1, 2005): 315319.http://dx.doi.org/10.1111/j.1475-1313.2005.00271.x. Daetwyler, Kathleen; Borgmeier, Paul; Digre, Kathleen B; Warner, Judith; Creel, Donnell; Weinberg, David: Katz, Bradley J. "A Novel Device to Measure Critical Flicker Fusion Frequency" NANOS 2007: Poster Presentations,Link(accessed May 17 2012) Gregori, Bruno, Odysseas Papazachariadis, Alfonsa Farruggia, and Neri Accornero. A Differential Color Flicker Test for Detecting Acquired Color Vision Impairment in Multiple Sclerosis and Diabetic Retinopathy.Journal of the Neurological Sciences300, no. 12 (January 15, 2011): 130134.http://dx.doi.org/10.1016/j.jns.2010.09.002. OBrien, Kevin, Bill Smollon, Bill Wooten, and Billy Hammond. Determining Heterochromatic Flicker Photometry Frequency for Macular Pigment Optical Densitometry by Critical Flicker Fusion Frequency.Journal of Vision11, no. 15 (December 27, 2011): 5555.http://dx.doi.org/10.1167/11.15.55. Bowles, Kristen E, and Timothy W Kraft. ERG Critical Flicker Frequency Assessment in Humans.Advances in Experimental Medicine and Biology723 (2012): 503509.http://dx.doi.org/10.1007/978-1-4614-0631-0_63.Commercial products FLIM Flicker/Fusion Frequencydevice bySCHUHFRIED GmbH [www.lafayettelifesciences.com/product_detail.asp?ItemID=36 Flicker Fusion System Model 12021] fromLafayette Instrument