Proceedings of the 8Th Annual Python in Science Conference
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of the 8th Python in Science Conference SciPy Conference – Pasadena, CA, August 18-23, 2009. Editors: Gaël Varoquaux, Stéfan van der Walt, K. Jarrod Millman Contents Editorial 2 G. Varoquaux, S. van der Walt, J. Millman Cython tutorial 4 S. Behnel, R. Bradshaw, D. Seljebotn Fast numerical computations with Cython 15 D. Seljebotn High-Performance Code Generation Using CorePy 23 A. Friedley, C. Mueller, A. Lumsdaine Convert-XY: type-safe interchange of C++ and Python containers for NumPy extensions 29 D. Eads, E. Rosten Parallel Kernels: An Architecture for Distributed Parallel Computing 36 P. Kienzle, N. Patel, M. McKerns PaPy: Parallel and distributed data-processing pipelines in Python 41 M. Cieślik, C. Mura PMI - Parallel Method Invocation 48 O. Lenz Sherpa: 1D/2D modeling and fitting in Python 51 B. Refsdal, S. Doe, D. Nguyen, A. Siemiginowska, N. Bonaventura, D. Burke, I. Evans, J. Evans, A. Fruscione, E. Galle, J. Houck, M. Karovska, N. Lee, M. Nowak The FEMhub Project and Classroom Teaching of Numerical Methods 58 P. Solin, O. Certik, S. Regmi Exploring the future of bioinformatics data sharing and mining with Pygr and Worldbase 62 C. Lee, A. Alekseyenko, C. Brown Nitime: time-series analysis for neuroimaging data 68 A. Rokem, M. Trumpis, F. Pérez Multiprocess System for Virtual Instruments in Python 76 B. D’Urso Neutron-scattering data acquisition and experiment automation with Python 81 P. Zolnierczuk, R. Riedel Progress Report: NumPy and SciPy Documentation in 2009 84 J. Harrington, D. Goldsmith The content of the articles of the Proceedings of the Python in Science Conference is copyrighted and owned by their original authors. For republication or other use of the material published, please contact the copyright owners to obtain permission. Proceedings of the 8th Python in Science Conference by Gaël Varoquaux, Stéfan van der Walt, K. Jarrod Milllman ISBN: 978-0-557-23212-3 Proceedings of the 8th Python in Science Conference (SciPy 2009) Organization Conference chair K. Jarrod Millman UC Berkeley, Helen Wills Neuroscience Institute, USA Tutorial Co-chairs Dave Peterson Enthought Inc, Austin, USA Fernando Perez UC Berkeley, Helen Wills Neuroscience Institute, USA Program Co-chairs Gaël Varoquaux INRIA Saclay, France Stéfan van der Walt Stellenbosh University, South Africa Program Committee Michael Aivazis Center for Advanced Computing Research, California Institute of Technology USA Brian Granger Physics Department, California Polytechnic State University, San Luis Obispo USA Aric Hagberg Theoretical Division, Los Alamos National Laboratory USA Konrad Hinsen Centre de Biophysique Moléculaire, CNRS Orléans France Randall LeVeque Mathematics, University of Washington, Seattle USA Travis Oliphant Enthought Inc. USA Prabhu Ramachandran Department of Aerospace Engineering, IIT Bombay India Raphael Ritz International Neuroinformatics Coordinating Facility Sweden William Stein Mathematics, University of Washington, Seattle USA Proceeding reviewers Francesc Alted Pytables Spain Philippe Ciuciu CEA, Neurospin France Yann Cointepas CEA, Neurospin France Emmanuelle Gouillart CNRS Saint Gobain France Jonathan Guyer NIST USA Ben Herbst Stellenbosh University, South Africa Paul Kienzle NIST USA Michael McKerns Center for Advanced Computing Research, California Institute of Technology USA Sturla Molden University of Oslo Norway Jean-Baptiste Poline CEA, Neurospin France Dag Sverre Seljebotn University of Oslo Norway Gregor Thalhammer University of Florence Italy 1 Proceedings of the 8th Python in Science Conference (SciPy 2009) Editorial Gael Varoquaux ([email protected])– INRIA, Saclay France Stéfan van der Walt ([email protected])– University of Stellenbosch, Stellenbosch South Africa Jarrod Millman ([email protected])– UC Berkeley, Berkeley, CA USA SciPy 2009 marks our eighth annual Python in Sci- Both keynote addresses served to outline prominent ence conference and the second edition of the confer- themes that were repeated throughout the conference, ence proceedings. The conference and these proceed- as witnessed by the proceedings. These themes in- ings highlight the ongoing focus of the community on clude: the need for software tools that allow scientists providing practical software tools, created to address to focus on their research, while taking advantage of real scientific problems. best-of-class algorithms and utilizing the full power of As in previous years, topics at the conference ranged their computational resources; the need for a high- from the presentation of tools and techniques for scien- level computing environment with an easy—to-write tific work with the Python language, to reports on sci- and read syntax; the usefulness of high-quality soft- entific achievement using Python. Interestingly, sev- ware tools for teaching and education; and the impor- eral people noticed that something important hap- tance of sharing code and data in scientific research. pened in the Scientific Python world during the last The first several articles address high-level approaches year: we are no longer constantly comparing our soft- aimed at improving the performance of numerical code ware with commercial packages, nor justifying the written in Python. While making better use of in- need for Python in Science. Python has now reached creased computation resources, such as parallel pro- the level of adoption where this sort of justification cessors or graphical processing units, many of these is no longer necessary. The exact moment when this approaches also focus on reducing code complexity and shift in focus occurred is difficult to identify, but that verbosity. Again, simpler software allows scientists to it happened was apparent during the conference. focus on the details of their computations, rather than on administrating their computing resources. Recurring scientific themes The remaining articles focus on work done to solve problems in specific research domains, ranging from This year the conference spanned two days, and each numerical methods to biology and astronomy. For the day commenced with a keynote address. The first last several years, using Python to wrap existing li- keynote was delivered by Peter Norvig, the Director braries has been a popular way to provide a scripting of Research at Google; the second by Jonathan Guyer, frontend to computational code written primarily in a a materials scientist in the Thermodynamics and Ki- more low-level language like C or Fortran. However, as netics Group at the National Institute of Standards these proceedings show, Python is increasingly used as and Technology (NIST). the primary language for large scientific applications. Peter Norvig’s talk was titled “What to demand from a Python and its stack of scientific tools appears to be Scientific Computing Language—even if you don’t care well suited for application areas ranging from database about computing or languages”, where he discussed a applications to user interfaces and numerical compu- number of desired characteristics in a scientific com- tation. puting environment. Such a platform should have the ability to share code and data with other researchers Review and selection process easily, provide extremely fast computations and state- of-the-art algorithms to researchers in the field, and be This year we received 30 abstracts from five differ- as easy as possible to use in a time-efficient manner. ent countries. The submissions covered a number of He also stressed the importance of having code that research fields, including bioinformatics, computer vi- read like the mathematical ideas it expressed. sion, nanomaterials, neutron scattering, neuroscience, Jonathan Guyer’s keynote centred around “Modeling applied mathematics, astronomy, and X-ray fluores- of Materials with Python”. He expanded on several cence. Moreover, the articles discussed involve a num- of the above-mentioned characteristics as he discussed ber of computational tools: these include statistical the development of FiPy, a framework for solving par- modeling, data mining, visualization, performance op- tial differential equations based on a finite volume ap- timization, parallel computing, code wrapping, instru- proach. Jonathan explained how FiPy was created to ment control, time series analysis, geographic informa- provide the most advanced numerical techniques to sci- tion science, spatial data analysis, adaptive interpola- entists, so that they could focus on the scientific ques- tion, spectral analysis, symbolic mathematics, finite tions at hand, while having a standard platform for element, and virtual reality. Several abstracts also ad- sharing codes with colleagues. Importantly, FiPy has dressed the role of scientific Python in teaching and become a critical tool in Jonathan’s research group and education. has been adopted by many of their colleagues for both research as well as teaching. G. Varoquaux, S. van der Walt, J. Millmanin Proc. SciPy 2009, G. Varoquaux, S. van der Walt, J. Millman (Eds), pp. 2–4 2 Proceedings of the 8th Python in Science Conference (SciPy 2009) Each abstract was reviewed by both the program • Are the code examples (if any) sound, clear, and chairs, as well as two members of the program com- well-written? mittee (PC). The PC consisted of 11 members from five countries, and represented both industry and • Is the paper fit for publication in the SciPy pro- academia. Abstracts were evaluated according to the ceedings? Improvements may be suggested, with or following criteria: without a second review. • Relevance of the