Scripts for some analysis in the thesis