Allow output of simple or weighted average
Merge summary.py