A PhD Student Condenses: Coding for New Researchers
My name is Emma Spooner and I am currently pursuing a PhD in Fullerene-Free Photovoltaic Devices at the University of Sheffield, in collaboration with Ossila Ltd. As part of this collaboration, I have run this series where I reviewed recent papers encountered in my research to provide a concise & helpful summary for Ossila’s customers. This is the final instalment of the series, but I will continue collaborating with Ossila to write helpful scientific content - so stay tuned for updates!
Coding for New Researchers
For many new researchers in science - especially those from a non-physics background - coding can be an intimidating topic. During my undergraduate degree in Chemistry, I had very little experience with this area, so starting a PhD in a Physics department (where many other students were very familiar with coding) was a little overwhelming.
What programming should I use? How could I learn? How could I process large amounts of data? This blog post aims to clear up some of those questions for anyone in a similar position, and to encourage readers to start exploring the area for themselves.
Why Should I Learn How to Code?
Fundamentally, learning how to code will make your life easier! In terms of basic data analysis, it can allow you to process lots of results very quickly, but can also be extended to more complicated numerical processing and modelling. Understanding programming can help you to better comprehend the ways in which software and computers process your data. Coding is also an incredibly marketable skill.
How Can I Get Started?
Most of the time when scientists discuss coding, it will be in the context of Python, one of the most common and widely-used programming languages. For researchers with little or no prior programming experience, Python is often the most recommended starting point. This is because it is easily readable and vast online resources are available for those wishing to learn.
There are many different ways to get started in learning Python, but it can be easiest to download a bundle with popular libraries, like NumPy and SciPy. These are modules that facilitate numerical manipulation in Python using low-level code to speed up the operations, and will be required for data analysis. A perfect place to start is the Ossila Xtralien Scientific Python distribution, which is specifically aimed at scientists and includes already imported modules, and everything needed to get started quickly. Beyond this, one of the most commonly recommended distributions in the wider Python community is Anaconda, which includes the development environment Spyder.
There are hundreds of different online web resources to learn Python. Ossila’s own Scientific Python tutorials - specifically tailored to scientists and users of the Xtralien distribution - are a great way to learn some simple code quickly. These cover basic variables and functions, and also move into numerical manipulation and graph plotting. These resources can be used stand-alone with other distributions, but will be especially useful for users of the Xtralien X100 as they give an overview of programming the source-measure unit.
What Can I Do with Coding?
For many researchers, Python will come in most handy when automating repetitive tasks, such as batch processing data, or simply handling large amounts of results. Libraries such as Matplotlib can produce high quality figures easily and allow generation of anything from a basic bar chart to a three-dimensional surface plot.
From a scientific perspective, coding can also be used to facilitate experiment design using processors such as the Arduino and Raspberry Pi (the latter of which predominantly uses Python), allowing for measurements, automation, and prototyping. The Xtralien Python distribution can be used to communicate with the X100 if you have intermediate to advanced coding skills.
Beyond this DIY approach, there are systems available to help simplify commonly-used measurements. One such example are Ossila’s Turnkey Systems, which are test and measurement systems with complimentary PC software for thin-film device characterisation. These systems are are built on the same Xtralien system (that the tutorials are based around).
If you aren't confident in using Python to design your own experiments, or if you don't have the luxury of time to learn coding on top of your research, then Ossila’s Turnkey Systems (such as the IV Curve & Four-Point Probe Measurement Systems) are perfect for you. They provide easy-to-use software for specific measurements - automatically calculating key metrics, enabling you to fast-track your research.