Advanced Python for the Lab
Expand your toolbox and develop better software
Once you already know the basics about communicating with your devices and building GUI's you will want to reach new levels.
This course focuses on all the details that were left outside during the course Python for the Lab, including threading, the use of hdf5 files, styling the user interface, and packaging for distribution. In this course, you will go one step further with your skills to develop better software.
In this course you will acquire data from a webcam. This poses an additional challenge, since webcams generate too much data, sometimes more than what a computer screen can show. From a technical point of view, we will cover a lot of ground on threading and multiprocessing with Python. We will also see how to use hdf5 files to store data in real-time.
From a best-practices perspective, you will learn to document, test, package and distribute your code. This is a very important next step if you want your software to be used and expanded by others, doesn't matter if colleagues or scientists across the globe.
Do you like what you read? Send us an e-mail to [email protected] and we will glad to clarify any of your doubts. This course is offered to groups of up to 7 people in order to keep a balanced instructor/student ratio.
About the Course
The workshop is aimed at scientists willing to learnhow to bring their skills to the next level. This is not an introductory course, and experience is required. Prerequisite: Ideally, following Python for the Lab in advance, because some of the topics will not be discussed again but will be given for granted. However, experienced Python programmers, who are confident with creating custom-classes, and have already covered the basics of building a user interface, can follow the course without inconvenience.
Some of the topics we will discuss include topics such as decorators, concurrency, caching. We will also work with the cycle of objects, from definition to instantiation, to deletion. This will allow us to fine-control how we interact with the devices and avoid problems. If you are not familiar at all with this ideas, we suggest you to check Python for the Lab, our introductory course.
Everything will be built with Python, using PyCharm as the editor of choice. We will rely on standard packages such as numpy, h5py, and PyQt. We will use Git to perform version control and share the progress with the rest of the group. To build the documentation we will use Sphinx and Read the Docs to make it public.
To follow the workshop, you will need to bring a laptop with any operating system you normally use and with which you feel comfortable. You will receive installation instructions before the start of the course to prepare your development environment.
The workshop demands 3 full days. During the time of the workshops, we expect participants to be fully engaged with the program. It has a very intense rhythm and collective discussions to which is worth attending to maximize the learning.
About the Instructor
Aquiles Carattino completed his Ph.D. in experimental Physics in 2017. During this period, he started developing software for his experiments, and in 2017 founded a company to develop software for research labs. By the end of 2017, he created pythonforthelab.com and started offering workshops aiming at creating a strong community of python developers around common technologies and practices. In early 2019, Aquiles and some partners founded a new company to develop the next generation of nanoparticle tracking devices, which are planned to be released to the market in early 2020.
Setting up. We will discuss the requirements of the program, and lay out the architecture of the program. Developing a model for the camera.
Building the model for the experiment, and a first version of the User Interface.
Deep dive on threading and multiprocessing. Learn how to acquire, save, and analyze data in real time, while still displaying it on the User Interface.
Structure the code as a package. Add documentation. Share it through git. Dicsussion about what makes a program sustainable.
Running an experiment from Jupyter Notebooks. Using them as lab journal, ensuring reproducibility and easiness to share.
Styling the user interface, automatic testing of the code. Time to work on your own project.
If you want to learn more, send us an e-mail to [email protected] with any questions or remarks. We will happy to answer them!
If you like the content of this website, consider buying a copy of the book Python For The LabCheck out the book
Join over 1000 Python developers and don't miss any updates!
Or check out our Books!