Python scripts for the analysis