code to analyze run2 bacon data