The Stoner Python Package

By | February 17, 2015

The Stoner Python Package is an ambitious project by the Leeds Condensed Matter Physics Group. It brings together various existing scientific python packages for numerical computing and data analysis, and introduces its own classes and methods for analysis and manipulation.

The idea behind the code seems a sensible one: standardise simple coding tasks to make routing analysis of data easier. But can this package, designed for use in one research group, be of any use to an outsider?

The Stoner Python Package

The Stoner Python Package was written to help fit curves, churn through text files and perform simple analysis tasks. In my experience it does this with aplomb.

Once you’ve got your head around how the package does things it is indeed simple and easy to get going with data analysis. There are functions and classes for loading and saving data, storing meta-data with your data, plotting data and much more besides. Having all of this available in one package overcomes many of the problems I’d had with getting stuck into python in the past.

Sometimes the package does seem a little overblown, however and I’ve found myself getting frustrated with what can seem like rather complicated data structures. This could well be my fault of course, as I’m something of a python novice. I also can’t help but think of Joel Spolsky’s “Things you should never do” – with regards to code re-use, and how writing code always seems easier than reading someone else’s…

Generous Documentation

For what is essentially a resource designed to be used internally by one research group, the documentation is remarkably good. A 30-page user guide is supported by several examples and a  ‘cheat sheet‘ of the more commonly needed functions. It’s clear that usability and ease of use have been a priority in its development.

Good as the documentation is, as might be expected for a project of this type, it does lag behind the code a little bit, so some poking and prodding can be needed to go from the examples and documentation to working code.

Rapid Development

At the time of writing, the Stoner Python Package is under rapid development. This means that new features and bug fixes are being added regularly. It also means of course that compatibility issues and bugs can be quite common.

So if you do decide to give the stoner python package a go, be prepared to be a little patient, and willing to poke around in the source code a little to figure out what’s going on.

A great package

On balance, this really is a great package. Hopefully development will continue, and the bug fixes, features and documentation will continue to be updated. I’ve long intended to use python for data analysis, but always found it just too much of a struggle. The Stoner Python Package may well have given me the support I needed to finally make the switch from Matlab and Origin.

Get The Stoner Python Package

You can download the “egg” file of the package here, or my preferred option is to go to the github repository, here.

You’ll probably also want to get a python distribution, such as Anaconda, or Canopy.