A comparison of neuronal population dynamics measured with calcium imaging and electrophysiology