Working with multi-scan experimental data in Python using Pandas dataframes
Whether you are a chemist, physicist, biologist, or even data scientist, you will often need to work with data that changes as a function of time. This is common in the physical and life sciences if you are working with any type of spectroscopy. It can be difficult to visualize these large data sets and find trends in them without using some type of programming language, as the data tends to be a bit messy and redundant, making it hard to plot and fit in excel. This blog post, with corresponding reference jupyter notebook, shows you how to take advantage of several of Python's data science stack packages like Pandas, NumPy, and matplotlib, using both dataframes and ndarrays to help you visualize and fit the data.
Using python for scientific programming and data analysis requires understanding of data structures and how to best store your data and information to capitalize on your computational speed and speed up your workflow. One of the most important data structures are arrays. What python lacks in it's computational speed due to it being a and interpreted high-level programming language, it largely makes up for with packages that wrap lower-level language code (like Fortran and C/C++). The best example of this is NumPy (Numerical Python). NumPy is a scientific programmers best friend, however if you are not comfortable with linear algebra, then array programming can be intimidating. This blog post (and corresponding reference Jupyter Notebook) is intended to be an introduction and reference for working with data in arrays.
Ever wonder how a scientist comes about studying a specific topic? Well, it is often
a very windy path, with many pit-stops along the way. In hopes of inspiring a young, uncertain
scientist, I want to share my journey to my current passion, NMR spectroscopy.
QYcalculator: GUI for calculation of Fluorescence Quantum Yield
An application to help (nano)scientists easily calculate relative quantum yields from their data. Although the calculation for this value is simple, getting the variables from your data to input into this calculation can be quite tedious, especially if you are not using a programming language. Thus, this user-friendly GUI will allow researchers to select the standard and sample files, visualize the UV-vis and fluorescence data, and then calculate their quantum yield with errors, as well as making sure that the errors on the gradient curves are within the desired value.
Data Fitting in Python Part II: Gaussian & Lorentzian & Voigt Lineshapes, Deconvoluting Peaks, and Fitting Residuals
In this installment of fitting data with python, we will be learning how to fit curves with Gaussian, Lorentzian, and Voigt line-shapes. Along with fitting single well-resolved curves, we will also learn how to deconvolute and visualize overlapping peaks, something which is quite important in interpreting spectral data from techniques like Fluorescence, XRD, and NMR spectroscopy. I will also be introducing how to solve for fitting residual and how to add them to our plots to visualize the fitting error. The skills introduced here will help you take your data processing and interpretation to the next level, making you a more proficient scientist with the skills to reliably and repeatably analyze your data.
Data Fitting in Python Part I: Linear and Exponential Curves
The first in a series of fitting data in Python, I will be guiding you through the process of creating custom fitting functions for whatever type of empirical relationship you are trying to extract from your data. This is an invaluable skill, one which is often brushed under the rug so and left to software to handle. It is my objective to show scientists that having full control and understanding of the fitting process is much easier then commonly thought, and is necessary to be confident in the results you are putting forth into the scientific community.
The command line may seem unnecessary in 2018 with all of the flashy software and apps available, however I will try to convince you otherwise. In this post, I will explain how to use your command line or terminal on a Mac or Windows PC, how to write and run a “hello world” python file, and how to use the terminal text-editor “Vim”.
Going From .csv to Publication-Quality Figure with Python and Matplotlib (no programming experience required)
Have you ever heard of something called Python? And no, I don’t mean the snake. This programming language is your key to data manipulation and visualization, and you need zero prior experience in programming to be able to get started. In this blog post, I will walk you through installing all the necessary dependencies for Mac OS or Windows PCs, and you can be creating your own publication-quality figures by lunch!