added training.py and ecog_tools.py