LEVMpy: a python wrapper for Fortran LEVM code

Many excellent scientific programs and routines have been written in Fortran over the years since the language was first developed in the late 1950s. Even today it is often the language of choice in the scientific community for intensive numerical and high-performance computing. NASA's recent challenge to improve their FUN3D fluid dynamics is a good example of how important Fortran still is.

Wrapping Fortran code with more user friendly languages such as Python is therefore a very valuable task with libraries such as Python's scipy and numpy being prime examples. I decided to do this for the complex non-linear least squares fitting program, LEVM, that is designed for fitting impedance spectroscopy data to a vast selection of different circuit models. The code was developed by J Ross Macdonald and is popular in the field, however, it only exists as a DOS command line or basic Windows GUI program. Building a Python library would allow me to integrate it much more easily into my …

LIFX wall mounted control and home automation

LED smart lights are great but normally you control them with an app on your phone. This can be a problem when you have guests staying or if you just don’t want to have to search for your phone in order to switch on a light. The solution, of course, is to have some form of physical light switch, possibly connected to a home automation system, or possibly a wirelessly enabled mechanical switch or a touchscreen.

There are a few home automation control panels with dashboard-like interfaces that exist but I wanted to build a custom one that could control my LIFX light bulbs, would be flexible enough to easily add other home automation functionality in the future, would run on low cost hardware, and that could be wall mounted. It would also be a chance to learn some new programming skills in the form of building a web application.

With that in mind I got a Raspberry Pi 3 with the new 7 inch touchscreen. For the app, I had already constructed a simple Python library that used the LIFX HTTP …