Jul 06, 2014

Non-linear fit confidence intervals

Finding confidence intervals (CI) for fitting parameters is relatively easy when performing linear fits and there's a lot of material covering that. However, things are a bit more tricky when fitting data with a non-linear function. Here, I will look at how to estimate fit parameter CI in such a case and compare two approaches.

Read more...

May 28, 2014

Timing (nested) function calls in Python

Say you quickly want to find out how much time a bunch of functions in your code take to execute. You could use the timeit module Python comes with. With this you either have to run from command line or provide the statement to execute as a string.

Read more...

Mar 27, 2014

Better looking plots with Matplotlib

Suppose there's some noisy data that needs fitting. After successfully fitting it, I want to show how the fit looks compared to the original. Matplotlib is awesome for this purpose, but it's default appearance settings are somewhat beaten with the ugly stick (but there are historical reasons for this). I'll try to make things look a bit better. This is all done in an IPython notebook and you can see the notebook itself here.

Read more...

Mar 21, 2014

Python & microscope images

A few years ago I worked in a lab that had a Zeiss confocal microscope. My job was to conduct experiments and analyze images obtained in these experiments. The latter I like to do in Python, but to my surprise, no way to read Zeiss images into Python existed. Luckily for me, my supervisor had managed to obtain the specifcation for the Zeiss binary format. With the help of this sacred document I wrote a reader for Zeiss files and got on to analysing my data.

Read more...