I’ve been using (and learning) Python in the last months, and it has been a great experience. For me, learning a new programming language is a very interesting task, as it allows me to review the way that I structure programs and allows me to add new tools to the toolbox. In one exercise to learn the Python language, I’ve translated a program that I’ve written in C++ to Python, and in the process, found a subtle bug.
I’m really enjoying working with IPython Notebook/NumPy/Scipy/Matplotlib to process and visualize experimental data, as it allows one to have an enhanced REPL (better editor, with nice output that can be saved and even exported to reStructuredText).
This month I’ve written two Python packages to scratch my own itches: one is a fast implementation of the differential evolution method (PyFDE) and the other implements peak detection routines for 1D data (PeakUtils). The packages are available at PyPI and are briefly described bellow.
PyFDE
PyFDE implements the DE/rand/1/bin scheme for Python 3. It is written in Cython for performance (near C performance, see the performance section of the official documentation for details).
It has a simple API, as described by the sample program bellow that minimizes the Rastrigin function:
PeakUtils
PeakUtils is written in pure Python (for Python 3.4), and provides simple functions to find the indexes of the peaks in 1D data and to further enhance the resolution by using Gaussian fitting or centroid computation.
An example with images can be found at the official documentation.
Contributing
Both projects were released under the MIT license and are open for contribution.