Sharing with Python

Researchers changing scientific fields are often surprised to discover how different the cultures in their new and old fields are. While the neuroscience culture is vibrant and stimulating in many ways, neuroscience is not a field with the strongest tradition for sharing or division of labor. In physics there has effectively been a division of labor between experimentalists and modelers for about 100 years. It was realized that it is simply too difficult for a single person or a single research group to master all techniques necessary to do the best science. Ever since, experimentalists and modelers have happily shared credit and Nobel prizes for discoveries that have only been made possible by their joint collaborative efforts. The World Wide Web was invented at CERN in Switzerland to allow for efficient sharing of the large amounts of data generated by this international particle-physics research facility. 
 
A traditional neuroscience laboratory has been a more self-contained entity. Data has been recorded and analyzed within the group, typically with tools bought from a commercial vendor or made as side projects by the group members themselves, all under the guidance and control of a single laboratory leader. Similar to how we may imagine the operation of a 19th century physics laboratory. 
 
But things are slowly changing also in our community. Public databases of neurobiological data have been established, the most famous probably being the Allen Brain Atlas1 set up by the philanthropist of Microsoft wealth. The Organisation for Economic Co-operation and Development (OECD) even concluded that neuroinformatics is so important that it established the International Neuroinformatics Coordinating Facility (INCF)2 in 2005 in order to promote a coordinated global development of this new field, and the open-access Frontiers Journal Series with an aim to facilitate better scientific communication between researchers was recently established with neuroscience as the pioneering field. Further, due to persistent efforts by enthusiastic individuals, neuroscientists have for 20 years or so already enjoyed free access to neural simulators such as NEURON3 and Genesis4, tailor-made for biophysically detailed neuron modeling. Lately, simulators such as NEST5, optimized for simulations of large neuronal networks, have been added to the pool of free public resources. The use of these simulators is now an integral part of the curriculum at several research schools, further contributing to the fostering of a more cohesive research community, particularly within computational neuroscience. 
 
Free software packages tailored for experimental neuroscientists have been scarcer, and the three new packages described in the paper by Spacek et al. (2009) are thus most welcome. The packages, all developed to suit needs in the authors’ laboratory, are used for (i) generation of visual stimuli for in vivo recordings, (ii) visualization of extracellular potentials recorded by silicon multielectrodes and spike-sorting based on such data, and (iii) analysis of the extracted spike trains. 
 
All software packages were made using the Python programming language6, and the paper of Spacek and collaborators was part of a recent special-topic issue on “Python in neuroscience” in Frontiers in Neuroinformatics. Python appears to be the new programming language of choice in many communities both inside and outside science. For outsiders the shift towards a new programming language, Python in this case, may sometimes appear to be faddish and have elements akin to a religious revival. However, Python appears to have qualities that likely will lead to a further strengthening of its position in the years to come. 
 
For one it is “open source,” so unlike for products from commercial competitors like MATLAB, one doesn't have to worry about licensing costs. Like the operating system Linux, or scientific knowledge for that matter, Python is largely developed by dedicated individuals who are standing on each other's shoulders. Already a large number of Python packages have been made available, and Spacek and his collaborators say that they in fact were introduced to Python via one of its many packages. But such sharing is not unique to Python. What makes Python stand out from the crowd is that it has a clear and simple syntax which, according to the authors, “fits your brain.” The first author even states in the paper that for his part “the switch to Python has made programming a much more enjoyable and productive experience, and has resulted in greatly improved programming skills.” 
 
The requirements for the three packages developed by Spacek and collaborators differed greatly. The visual stimulus package required, for example, real-time control over the display monitor and communication via a digital output board, controlled by specific drivers, between the stimulus and acquisition computers. The package visualizing extracellular waveforms required construction of a comprehensive graphical user interface, while the spike-train analysis package required access to efficient numerical routines established by the scientific computation community. The authors nevertheless found Python to be well suited for all three. 
 
In the final paragraph of their paper, Spacek and collaborators trumpet: “We encourage others in neuroscience to consider Python for their programming needs(…). Rallying around a common open-source language may help foster efforts to increase sharing of data and code, efforts deemed necessary to push forward progress in systems neuroscience.” It is likely that more of us will unite behind this rallying cry as we all, experimentalists and modelers alike, realize that a closer collaboration is needed to move our science forward. We will have more fun as well. 
 
Maybe a scientist switching to neuroscience from another field in, say, 10 or 20 years will be pleasantly surprised to discover how vigorously and efficiently we collaborate?

www.frontiersin.org FRONTIERS COMMENTARY Nikolenko et al. present an elegant technique, which they call "SLM microscopy," that combines both of these strategies into a single system. Their system targets twophoton excitation simultaneously to up to several tens of points within the fi eld of view. The authors achieve this feat using a spatial light modulator (SLM), which alters the oscillation phase of the incoming light. A shift in phase does not in itself alter the intensity of the light; however, because of constructive and destructive interference, a change in phase can lead, upon propagation, to a dramatic re-distribution of intensity. For example, a microscope objective can be thought of as a device that simply adds a spatially-varying phase to the incident illumination; constructive and destructive interference then causes the phenomenon that we usually think of as focusing to a diffraction-limited point. Nikolenko et al. (and related work Lutz et al., 2008;Papagiakoumou et al., 2008), following in the footsteps of holography pioneer Gabor (1948), deliberately perturb the phase of the input light to the objective. The result, of course, is a microscope that no longer focuses all the incoming light to a single, diffraction-limited spot. Ordinarily, this would not be taken as a step forward. However, the SLM consists of more than a million individually-addressable elements, and thus allows phase to be precisely manipulated in nearly arbitrary spatial patterns. The authors employed a computational algorithm to calculate a phase pattern that, after passage through the objective, illuminated many distinct spots. Crucially, the position of these spots is under the control of the user, and thereby allows one to direct light to many specifi c targets, even ones that are above or below the objective's plane of focus. Rather than the usual photomultiplier tube used when scanning a single point, the emitted light is focused onto a CCD camera, which preserves spatial information about the emission source.
Nikolenko et al. demonstrated SLM microscopy's utility with two applications. The fi rst is photostimuluation with caged glutamate. The authors were able to simultaneously stimulate multiple spines on the same neuron, or multiple neurons simultaneously. The high power needed for two-photon uncaging currently acts as a barrier to selecting more than a modest number of spots. Nevertheless, the ability to stimulate multiple spots seems likely to yield advances in our understanding of both single-cell membrane properties and neuronal circuits.
The second application was to image activity, via a calcium indicator, simultaneously in multiple neurons at speeds ranging from 15-60 Hz. The resulting signals were suffi cient to clearly detect transients due to single action potentials. Several methods (reviewed in Ji et al., 2008;Wilt et al., 2009) for fast imaging of neuronal activity have previously been developed, each with their own advantages. A strength of SLM microscopy, because it acquires several regions in parallel, is its ability to achieve relatively low noise levels (at least by the standards of some other two-photon techniques) from the selected targets, even at high speeds.
Over the past few decades, microscopyone of the oldest pillars of science -has undergone an extensive era of new development. SLM microscopy exploits our burgeoning ability to shape light to our needs, and is a welcome addition to the overall progress in optics and neuroscience.

Python for large-scale electrophysiology by Martin Spacek, Tim Blanche and Nicholas Swindale
Researchers changing scientifi c fi elds are often surprised to discover how different the cultures in their new and old fi elds are. While the neuroscience culture is vibrant and stimulating in many ways, neuroscience is not a fi eld with the strongest tradition for sharing or division of labor. In physics there has effectively been a division of labor between experimentalists and modelers for about 100 years. It was realized that it is simply too diffi cult for a single person or a single research group to mas-

FRONTIERS COMMENTARY
ter all techniques necessary to do the best science. Ever since, experimentalists and modelers have happily shared credit and Nobel prizes for discoveries that have only been made possible by their joint collaborative efforts. The World Wide Web was invented at CERN in Switzerland to allow for effi cient sharing of the large amounts of data generated by this international particle-physics research facility.
A traditional neuroscience laboratory has been a more self-contained entity. Data has been recorded and analyzed within the group, typically with tools bought from a commercial vendor or made as side projects by the group members themselves, all under the guidance and control of a single laboratory leader. Similar to how we may imagine the operation of a 19 th century physics laboratory.
But things are slowly changing also in our community. Public databases of neurobiological data have been established, the most famous probably being the Allen Brain Atlas 1 set up by the philanthropist of Microsoft wealth. The Organisation for Economic Co-operation and Development (OECD) even concluded that neuroinformatics is so important that it established the International Neuroinformatics Coordinating Facility (INCF) 2 in 2005 in order to promote a coordinated global development of this new fi eld, and the open-access Frontiers Journal Series with an aim to facilitate better scientifi c communication between researchers was recently established with neuroscience as the pioneering fi eld. Further, due to persistent efforts by enthusiastic individuals, neuroscientists have for 20 years or so already enjoyed free access to neural simulators such as NEURON 3 and Genesis 4 , tailor-made for biophysically detailed neuron modeling. Lately, simulators such as NEST 5 , optimized for simulations of large neuronal networks, have been added to the pool of free public resources. The use of these simulators is now an integral part of the curriculum at several research schools, further contrib-uting to the fostering of a more cohesive research community, particularly within computational neuroscience.
Free software packages tailored for experimental neuroscientists have been scarcer, and the three new packages described in the paper by Spacek et al. (2009) are thus most welcome. The packages, all developed to suit needs in the authors' laboratory, are used for (i) generation of visual stimuli for in vivo recordings, (ii) visualization of extracellular potentials recorded by silicon multielectrodes and spike-sorting based on such data, and (iii) analysis of the extracted spike trains.
All software packages were made using the Python programming language 6 , and the paper of Spacek and collaborators was part of a recent special-topic issue on "Python in neuroscience" in Frontiers in Neuroinformatics. Python appears to be the new programming language of choice in many communities both inside and outside science. For outsiders the shift towards a new programming language, Python in this case, may sometimes appear to be faddish and have elements akin to a religious revival. However, Python appears to have qualities that likely will lead to a further strengthening of its position in the years to come.
For one it is "open source," so unlike for products from commercial competitors like MATLAB, one doesn't have to worry about licensing costs. Like the operating system Linux, or scientifi c knowledge for that matter, Python is largely developed by dedicated individuals who are standing on each other's shoulders. Already a large number of Python packages have been made available, and Spacek and his collaborators say that they in fact were introduced to Python via one of its many packages. But such sharing is not unique to Python. What makes Python stand out from the crowd is that it has a clear and simple syntax which, according to the authors, "fi ts your brain." The fi rst author even states in the paper that for his part "the switch to Python has made programming a much more enjoyable and productive experience, and has resulted in greatly improved programming skills." The requirements for the three packages developed by Spacek and collaborators differed greatly. The visual stimulus package required, for example, real-time control over the display monitor and communication via a digital output board, controlled by specifi c drivers, between the stimulus and acquisition computers. The package visualizing extracellular waveforms required construction of a comprehensive graphical user interface, while the spike-train analysis package required access to effi cient numerical routines established by the scientifi c computation community. The authors nevertheless found Python to be well suited for all three.
In the fi nal paragraph of their paper, Spacek and collaborators trumpet: "We encourage others in neuroscience to consider Python for their programming needs(…). Rallying around a common open-source language may help foster efforts to increase sharing of data and code, efforts deemed necessary to push forward progress in systems neuroscience." It is likely that more of us will unite behind this rallying cry as we all, experimentalists and modelers alike, realize that a closer collaboration is needed to move our science forward. We will have more fun as well.
Maybe a scientist switching to neuroscience from another fi eld in, say, 10 or 20 years will be pleasantly surprised to discover how vigorously and effi ciently we collaborate?