python source code for neuro encoding