Code for analyzing and controlling EC experiments