First Edition of Python for the Lab Was a Success

The group of Michel Orrit at Leiden University was the first to participate

The group of Michel Orrit at Leiden University was the first one to participate in the Python For The Lab workshop. In total, seven students gathered for three full days of coding and development. We discussed design principles, the basics of instrumentation and built a small experiment to measure the current that passes through a diode as a function of the voltage applied to it. The workshop also included the creation of a Graphical User Interface (GUI) to control the measurement.

On the first day, we have covered the very basics of Python in order to break the ice with the language. Participants were acquainted with lists, dictionaries, and loops. In the afternoon, they received a small DAQ card and some electronic elements in order to build the experiment. Together, we established communication with the DAQ through the serial port and varied the voltage applied to an LED. The most important message from the day was the importance of creating classes to make reusable and easy to share code.

On the second day of the course we discussed the meanings of the Model-View-Controller design pattern for lab applications. Having a clear separation between different elements of the code is fundamental to make robust programs that can be maintained in the long term and by different developers. Participants learned how to build a model for the DAQ device and a model for the experiment. With this experience, the day ended with the creation of a simple user interface that allowed to trigger a measurement.

The third and last day was focused on the development of a graphical user interface (GUI) around the experiment model. Participants have learned how to work with different threads in order to achieve a smooth behavior of the interface. They have seen how to embed a plot that refreshes automatically while the experiment is running. They have also seen some general patterns in user interface development and learned how to take input from the users of the software.

Overall, the first edition of Python for the Lab has been a success. It has been an intensive week, but with lots of sharing and learning.

To learn more about the workshop, check the Workshop Page or contact us.

Header photo by Mikael Kristenson on Unsplash

Support us
If you like the content of this website, consider buying a copy of the book Python For The Lab

Other interesting articles for you

New Courses of Git for Scientists

We are launching the course Git for Scientists aimed at researchers from different backgrounds and career stages. In the course, you will learn how to work with git, one of the best version control system of all times, and its different web implementations such as BitBucket, GitHub, and GitLab.

Git …

read more

How to use HDF5 files in Python

When dealing with large amounts of data, either experimental or simulated, saving it to several text files is not very efficient. Sometimes you need to access a very specific subset of data and you want to do it fast. In these situations, the HDF5 format solves both issues thanks to …

read more

How to Use Decorators to Validate Input

Python is rich in resources that can shorten the time it takes to develop new programs and simplify repetitive tasks. Decorators are one of such elements but more often than not they are not considered by less experienced developers. Adding decorators to the syntactic toolbox can be of great use …

read more

Get all the information directly to your inbox

Get relevant information, unsubscribe at any time.

© Copyright 2018 Uetke | Contact Us | RSS feed | Privacy Policy | Cookies