Add flicker_calc() to utilib.py