improved computation time, improved analysis plotting

made computation of the potential local