cpi works, now need to plot the results in a (new and improved) python script