Proceedings of the 16Th Python in Science Conference
Total Page:16
File Type:pdf, Size:1020Kb
Proceedings of the 16th Python in Science Conference July 10 - July 16 Austin, Texas • Katy Huff David Lippa Dillon Niederhut M Pacer PROCEEDINGS OF THE 16TH PYTHON IN SCIENCE CONFERENCE Edited by Katy Huff, David Lippa, Dillon Niederhut, and M Pacer. SciPy 2017 Austin, Texas July 10 - July 16, 2017 Copyright c 2017. The articles in the Proceedings of the Python in Science Conference are copyrighted and owned by their original authors This is an open-access publication and is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. For more information, please see: http://creativecommons.org/licenses/by/3.0/ ISSN:2575-9752 https://doi.org/10.25080/Majora-c9725a0-011 ORGANIZATION Conference Chairs PRABHU RAMACHANDRAN, Enthought Inc. & IIT Bombay SERGE REY, Arizona State University Program Chairs LORENA BARBA, George Washington University GIL FORSYTH, George Washington University Communications JUAN SHISHIDO, Twitter Birds of a Feather AASHISH CHAUDHARY, Kitware MATT MCCORMICK, Kitware Proceedings KATY HUFF, University of Illinois DAVID LIPPA, Amazon DILLON NIEDERHUT, Enthought MPACER, Berkeley Institute of Data Science Financial Aid SCOTT COLLIS, Argonne National Laboratory ERIC MA, MIT Tutorials ALEXANDRE CHABOT-LECLERC, Enthought MIKE HEARNE, USGS BEN ROOT, Atmospheric and Environmental Research, Inc. Sprints JONATHAN ROCHER, KBI Biopharma CHARLYE TRAN, Lewis University and The Recurse Center Diversity JULIE KRUGLER HOLLEK, Twitter Activities CHRIS NIEMIRA, AOL RANDY PAFFENROTH, Worcester Polytechnic Institute Sponsors JILL COWAN, Enthought Financial BILL COWAN, Enthought JODI HAVRANEK, Enthought Logistics JILL COWAN, Enthought LEAH JONES, Enthought Proceedings Reviewers DAVID LIPPA KATY HUFF MPACER DILLON NIEDERHUT CHIEN-HSIU LEE PRIYA SAWANT GUY TEL-ZUR NICK WAN ALEJANDRO DE LA VEGA GEORGE MARKOMANOLIS MATTHEW ROCKLIN OLEKSANDR PAVLYK JEAN BILHEUX BRIAN MCFEE ALEJANDRO WEINSTEIN STEFAN VAN DER WALT LI WANG SERGE GUELTON KAPIL SARASWAT THOMAS ARILDSEN PAUL CELICOURT CYRUS HARRISON KYLE NIEMEYER SARTAJ SINGH ANKUR ANKAN NATHAN GOLDBAUM ANGELOS KRYPOTOS JAIME ARIAS JONATHAN J. HELMUS FERNANDO CHIRIGATI CHRIS CALLOWAY NICHOLAS MALAYA DANIEL WHEELER JEREMIAH JOHNSON YU FENG YINGWEI YU MANOJ PANDEY JAMES A. BEDNAR ADRIAN HEILBUT JASON VERTREES HORACIO VARGAS FATIH AKICI SEBASTIAN BENTHALL NIRMAL SAHUJI SCHOLARSHIP RECIPIENTS WILL BARNES, Rice University SCOTT COLE, University of California, San Diego ROBERTO COLISTETE JR, UFES BJORN DAHLGREN, KTH Royal Institute of Technology FILIPE FERNANDES, SECOORA ERIC MA, Massachusetts Institute of Technology JEREMY MCGIBBON, University of Washington HIMANSHU MISHRA, NetworkX and Timelab DANIIL PAKHOMOV, Johns Hopkins University ZACH SAILER, University of Oregon CARL SAVAGE, School District 69 (Qualicum) TOBIAS SCHRAINK, New York University SCOTT SIEVERT, UWisconsin Madison SARTAJ SINGH, India Institute of Technology, BHU JUMP TRADING AND NUMFOCUS DIVERSITY SCHOLARSHIP RECIPIENTS SELENA ALEMAN, University of Texas at Austin CELIA CINTAS, CENPAT-CONICET NATALIA CLEMENTI, The George Washington University JOHANNA COHOON, The University of Texas at Austin CHARLYE DELGADO, Lewis University ALEXANDER IVANOV, The Institute for Information Transmission Problems of Russian Academy of Sciences DANA MILLER, University of California, Berkeley REBECCA MINICH, None JULIETTE SEIVE, University of Texas at Austin MALVIKA SHARAN, European Molecular Biology Laboratory (EMBL), Heidelberg CHAYA STERN, Weill Cornell Graduate School PAMELA WU, New York University ISRAEL ZU´ NIGA˜ DE LA MORA, Alturin CONTENTS SPORCO: A Python package for standard and convolutional sparse representations 1 Brendt Wohlberg Software Transactional Memory in Pure Python 9 Dillon Niederhut BespON: Extensible config files with multiline strings, lossless round-tripping, and hex floats 12 Geoffrey M. Poore LabbookDB: A Wet-Work-Tracking Database Application Framework 20 Horea-Ioan Ioanas, Bechara John Saab, Markus Rudin pyMolDyn: Identification, structure, and properties of cavities in condensed matter and molecules 28 Ingo Heimbach, Florian Rhiem, Fabian Beule, David Knodt, Josef Heinen, Robert O. Jones PyHRF: A Python Library for the Analysis of fMRI Data Based on Local Estimation of the Hemodynamic Response Function 34 Jaime Arias, Philippe Ciuciu, Michel Dojat, Florence Forbes, Aina Frau-Pascual, Thomas Perret, Jan M. Warnking SciSheets: Providing the Power of Programming With The Simplicity of Spreadsheets 41 Alicia Clark, Joseph L. Hellerstein The Sacred Infrastructure for Computational Research 49 Klaus Greff, Aaron Klein, Martin Chovanec, Frank Hutter, Jurgen¨ Schmidhuber FigureFirst: A Layout-first Approach for Scientific Figures 57 Theodore Lindsay, Peter T. Weir, Floris van Breugel Parallel Analysis in MDAnalysis using the Dask Parallel Computing Library 64 Mahzad Khoshlessan, Ioannis Paraskevakos, Shantenu Jha, Oliver Beckstein MatchPy: A Pattern Matching Library 73 Manuel Krebber, Henrik Bartels, Paolo Bientinesi pulse2percept: A Python-based simulation framework for bionic vision 81 Michael Beyeler, Geoffrey M. Boynton, Ione Fine, Ariel Rokem Optimised finite difference computation from symbolic equations 89 Michael Lange, Navjot Kukreja, Fabio Luporini, Mathias Louboutin, Charles Yount, Jan Huckelheim,¨ Gerard J. Gorman Python meets systems neuroscience: affordable, scalable and open-source electrophysiology in awake, behaving rodents 98 Narendra Mukherjee, Joseph Wachutka, Donald B Katz Accelerating Scientific Python with Intel Optimizations 106 Oleksandr Pavlyk, Denis Nagorny, Andres Guzman-Ballen, Anton Malakhov, Hai Liu, Ehsan Totoni, Todd A. Anderson, Sergey Maidanov NEXT: A system to easily connect crowdsourcing and adaptive data collection 113 Scott Sievert, Daniel Ross, Lalit Jain, Kevin Jamieson, Rob Nowak, Robert Mankoff ChiantiPy: a Python package for Astrophysical Spectroscopy 120 Will T. Barnes, Kenneth P. Dere PROC. OF THE 16th PYTHON IN SCIENCE CONF. (SCIPY 2017) 1 SPORCO: A Python package for standard and convolutional sparse representations ‡ Brendt Wohlberg ∗ ! Abstract—SParse Optimization Research COde (SPORCO) is an open-source Python package for solving optimization problems with sparsity-inducing regu- = larization, consisting primarily of sparse coding and dictionary learning, for both standard and convolutional forms of sparse representation. In the current ver- D s0 sion, all optimization problems are solved within the Alternating Direction Method x0 of Multipliers (ADMM) framework. SPORCO was developed for applications in signal and image processing, but is also expected to be useful for problems in computer vision, statistics, and machine learning. = s D Index Terms—sparse representations, convolutional sparse representations, s1 x sparse coding, convolutional sparse coding, dictionary learning, convolutional 1 dictionary learning, alternating direction method of multipliers Fig. 1: Independent sparse coding of overlapping blocks Introduction SPORCO is an open-source Python package for solving inverse problems with sparsity-inducing regularization [MBP14]. This D = type of regularization has become one of the leading techniques D in signal and image processing, with applications including image D denoising, inpainting, deconvolution, superresolution, and com- pressed sensing, to name only a few. It is also a prominent s method in machine learning and computer vision, with applica- tions including image classification, video background modeling, + + ∗ ∗ ··· collaborative filtering, and genomic data analysis, and is widely used in statistics as a regression technique. d0 d1 SPORCO was initially a Matlab library, but the implementa- tion language was switched to Python for a number of reasons, x0 x1 x including (i) the substantial cost of Matlab licenses (particularly in an environment that does not qualify for an academic discount), Fig. 2: Convolutional sparse coding of an entire signal and the difficulty of running large scale experiments on multiple hosts with a limited supply of toolbox licenses, (ii) the greater maintainability and flexibility of the object-oriented design possi- of sparse representations are supported. In the standard form the ble in Python, (iii) the flexibility provided by NumPy in indexing dictionary is a matrix, which limits the sizes of signals, images, arrays of arbitrary numbers of dimensions (essentially impossible etc. that can be directly represented; the usual strategy is to in Matlab), and (iv) the superiority of Python as a general-purpose compute independent representations for a set of overlapping programming language. blocks, as illustrated in Figure1. In the convolutional form SPORCO supports a variety of inverse problems, including [LS99][ZKTF10][Woh16d] the dictionary is a set of linear filters, Total Variation [ROF92][All92] denoising and deconvolution, making it feasible to directly represent an entire signal or image. and Robust PCA [CCS10], but the primary focus is on sparse The convolutional form is equivalent to sparse coding with a coding and dictionary learning, for solving problems with sparse structured dictionary constructed from translations of a smaller representations [MBP14]. Both standard and convolutional forms generating dictionary, as illustrated in Figure2. The support for the convolutional form is one of the major strengths of SPORCO * Corresponding author: [email protected] ‡ Theoretical Division,