update of theta/analysis.py