Another leftover from #124: `analysis/calibration.py` has some untested functions, that are (for example) used on publicdb for daily processing of data. Add tests.