aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-10-12update Makefiletlatorre
2020-10-12update sbc plot to include grey bandtlatorre
2020-10-12add a new submit-grid-jobs script to use the queue statementtlatorre
2020-10-09only include Monte Carlo files for the runs we are analyzingtlatorre
2020-10-09update mcpltlatorre
2020-10-09add mcpl to Makefiletlatorre
2020-10-09add a script to recreate MCPL files for events which never got simulatedtlatorre
2020-10-09update chi2 with scale factors for the MCtlatorre
This commit updates the chi2 script to add scale factors for the atmospheric neutrino scale and muon scale parameters. The reason for this is that these parameters should now have a much easier interpretation than before. Now, the atmospheric neutrino scale parameter is relative to the expected atmospheric neutrino flux (i.e. we expect the fit to return something close to 1), and the muon scale parameter is the total number of expected muons in our sample, which is exactly what the data cleaning analysis gives us.
2020-10-09don't run nlopt before running MCMCtlatorre
This commit updates the chi2 script to skip minimzing the likelihood before running the MCMC. The reason for this is that I was occasionally seeing a linear algebra error about a singular matrix when running the MCMC with the KDEMove which I suspect is caused by too many points being in the same place.
2020-10-09only merge weights after selecting universetlatorre
This commit updates the chi2 script to only merge the weights dataframe with the Monte Carlo dataframe after we have selected the universe for the weights. This *greatly* reduces the memory usage.
2020-10-05major updates to the chi2 analysistlatorre
This commit fixes the chi2 analysis so that it is no longer biased. Previously, the chi2 analysis pull plots showed a consistent bias. At first, I thought this was due to the fact that the posterior wasn't gaussian, but even after switching to percentile plots based on the algorithm outlined in "Validating Bayesian Inference Algorithms with Simulation-Based Calibration", I was still seeing a bias. I finally tracked it down to the fact that I was applying the energy scale parameters to the data instead of the Monte Carlo. Therefore, in this commit I update the posterior to now apply the energy scale parameters to the Monte Carlo instead of the data. This has the slight disadvantage that the final histograms will be binned in the biased energy, but that's not really a big deal. In addition, this commit contains several other updates: - switch to plotting percentile plots based on the algorithm in "Validating Bayesian Inference Algorithms with Simulation-Based Calibration" instead of pull plots - apply both the energy scale and resolution at the individual particle level, i.e. there is no longer an energy resolution term for electron + muon fits - separate pull plots and coverage plots. Previously I was making both the p-value coverage plots and the pull plots at the same time. However, the pull plots shouldn't have anything to do with the GENIE weights whereas the p-value coverage plots should draw samples weighted by the GENIE weights. In addition, for the pull plots we draw new truth parameters on every iteration whereas for the p-value coverage plots we only draw them once. - switch to using KDEMove() for the MCMC since I think it samples multimodal distributions a lot better than the default emcee move. - I now correct for the reconstruction energy bias in plot-michel and plot-muons
2020-10-05update how the energy bias is applied in chi2 and plot-michelstlatorre
This commit updates how the energy bias is applied when we correct for the energy bias in correct_energy_bias(). The correct way to apply this correction is to compute: T_corrected = T_reco/(1+bias) whereas previously we were multiplying by (1-bias).
2020-09-16update plot-muons to plot bias and resolution with fmt='o'tlatorre
2020-09-09argmin -> argmaxtlatorre
2020-09-09update michel script to fit for bias and resolutiontlatorre
2020-09-07increase maxiter to 1000tlatorre
2020-09-07fix chi2 analysis when running with --coveragetlatorre
2020-09-07don't constrain energy bias parameters to be > 0tlatorre
2020-09-07add some comments about the priors in the chi2 analysistlatorre
2020-09-07update a comment in chi2tlatorre
2020-09-07update chi2tlatorre
This commit updates the chi2 analysis with two big changes: - I now apply the energy bias correction in the likelihood per particle and not per fit. So there is no longer an energy bias parameter for electron + muon fits, instead we just apply the energy bias correction for electrons to the electron and the energy bias correction for muons to the muon and then add the two kinetic energies. - I now apply the energy bias correction terms to the data instead of the Monte Carlo. This does introduce an issue with discontinuities in the likelihood but it makes everything easier to interpret. The discontinuities *should* be correctly taken into account by the MCMC.
2020-09-07update plot-muons script so it works outside the utils/ directorytlatorre
2020-09-07update python scripts to not call plt.show() when run with --savetlatorre
2020-09-07update Makefiletlatorre
2020-09-06update chi2 to correct for energy biastlatorre
This commit updates the chi2 script to correct for the energy bias of the reconstruction relative to Monte Carlo.
2020-09-06fix best fit line by changing axhline -> hlinestlatorre
2020-09-06update plot-muons to fit energy scale and resolution differencetlatorre
2020-08-31add a command line argument to print the nll valuestlatorre
2020-08-31don't call plt.show() when running with --savetlatorre
2020-08-31add GENIE weights to chi2 analysistlatorre
2020-08-31add estimate_errors to chi2 analysistlatorre
This commit updates the estimate_errors() function so that it works without a list of constraints and uses arrays of low and high bounds passed in instead of hardcoded constraints. I can now call this function from the chi2 analysis to get the stepsizes before running the MCMC.
2020-08-31add a script to convert genie reweight file from ROOT -> HDF5tlatorre
2020-08-30don't sample more instrumentals than there are in the datatlatorre
2020-08-30update dc scriptstlatorre
- delete instrumental tags in both scripts since we already tag them in get_events() - apply the same cuts to the MC as to the data - add a comment about the fitted fraction - quit if we don't have at least 1 type of each instrumental
2020-08-30increase energy resolution uncertainty when running with --coveragetlatorre
2020-08-30treat muons like Monte Carlotlatorre
2020-08-30update energy resolution -> max(EPSILON,resolution)tlatorre
This commit updates the chi2 script to make sure that the energy resolution is nonzero otherwise we get nans.
2020-08-30update bins when adding energy resolutiontlatorre
This commit updates the first bins that we use before applying the energy resolution in the chi2 script. The reason we do this is because when adding the energy resolution, events outside of the original bins may migrate into the first and last bin.
2020-08-30small updates to chi2 scripttlatorre
2020-08-25fix a stupid bug in the last committlatorre
2020-08-25speed up get_multinomial_prob()tlatorre
2020-08-25fix stupid bug in last committlatorre
2020-08-25speed up nll function in chi2tlatorre
2020-08-25update chi2 script to plot p-value coveragetlatorre
2020-08-20add external muons to the chi2 fittlatorre
2020-08-19update chi2 analysis to include bias and resolution termstlatorre
2020-08-17add a new script to plot the michel energy distributiontlatorre
2020-08-17update stoppig muon criteriatlatorre
This commit updates the criteria for selecting stopping muons from: - calibrated nhit < 4000 - udotr < -0.5 to - reconstructed kinetic energy < 10 GeV The previous criteria were intended to remove through going atmospheric events but produced a strong bias in the comparison due to the nhit cut and an energy bias in the data relative to the Monte Carlo. The new cut does a good job of cutting through going muons but doesn't produce the same bias.
2020-08-17simplify likelihood calculation in chi2tlatorre
2020-08-17simplify nllr() functiontlatorre