from scipy import * import sys def calc(x,k): x_0 =pi/3 # minimum at 60 deg if x