Added python reduction and plot-generating code