added analysisTools.py - rough initial version, needs documentation