Analysis and optimization of electrophysiological data