Final version of the analysis code, including the output dataset