cleaned up coupled_analysis.py