Fix carot calculations in calc.py