aboutsummaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2020-11-30update code to work with python3tlatorre
This commit updates the python code to work with python 3 and with a newer version of matplotlib. - zip_longest -> izip_longest - fix tick marks for log plots - scipy.misc -> scipy.special
2020-11-30call get_events() with mc=True in submit-grid-jobstlatorre
2020-11-30get rid of superfluous --data argumenttlatorre
2020-11-30update submit-grid-jobs-queuetlatorre
2020-11-29add a script to calculate the cc, nc, and total event ratetlatorre
This commit adds a script called print-event-rate which calculates the event rate per year from the GENIE MCPL files. The livetime comes from the autosno run_info.log file. The output of the script is a latex table that I included in my thesis.
2020-11-17update burst cuttlatorre
2020-11-17small fixestlatorre
2020-11-16add script to plot distribution of number of high nhit orphanstlatorre
2020-11-16require signal events to have nhit_cal/nhit > 0.8tlatorre
2020-11-16add a new burst cuttlatorre
2020-11-16add salt pmt response file to submit-grid-jobs-queuetlatorre
2020-11-16add --run-list argument to chi2 and dm-searchtlatorre
This commit updates the chi2 and dm-search scripts to add the ability to pass a run list on the comand line.
2020-11-16add script to plot neutron nhit and delta t distributionstlatorre
2020-11-16bump version to 3tlatorre
2020-11-16fix latex errortlatorre
2020-11-16fix bug by converting list to arraytlatorre
2020-11-16calculate livetime based on pulse gt and 10 MHz clocktlatorre
This commit updates get_events() to calculate the livetime based on both the number of pulse gt events and the 10 MHz clock and to return it in a dictionary stored with the dataframe. I also update dm-search so that the results are now reported as a function of events/cm^3/s. Also updated radius cut to be the AV radius.
2020-11-16fix integrate_mc_hist() by dividing by bin widthtlatorre
2020-11-16use nlopt to find xopttlatorre
This commit updates both the chi2 and dm-search scripts to run nlopt at the end of the MCMC to find the best fit point. The reason for this is that for the dm-search script, we rely on the best fit point being correct when doing the discovery threshold analysis. To really get the best fit point with the MCMC we would need to run a ridiculous number of steps, so it's better to run a fewer amount of steps to get close and then run the minimization from there.
2020-11-16return np.inf if parameters are out of boundstlatorre
2020-11-16update lower bound for external muons and dm to 0tlatorre
2020-11-16DM_ENERGIES -> DM_MASSEStlatorre
2020-11-16update chi2 coverage bins to 10tlatorre
2020-11-16don't apply retrigger cut to MCtlatorre
2020-11-16loop over MC filenamestlatorre
2020-11-16update dm-search scripttlatorre
2020-11-03forgot to commit utils.pytlatorre
2020-11-03fix bug in get_events()tlatorre
This commit fixes an unnecessary call to set the index on the ev dataframe. This was causing issues when trying to process run 11903 since it didn't have any fits to merge into the ev dataframe.
2020-11-03initial commit of a script to do the dark matter searchtlatorre
2020-11-01update cat-grid-jobs to reprocess all zdabstlatorre
2020-11-01update upper bound for external muon scaletlatorre
2020-11-01accidentally committed a print statementtlatorre
2020-11-01fix cat-grid-jobs since queue updatetlatorre
2020-11-01update retrigger cuttlatorre
This commit updates the retrigger cut to cut events where the previous event is missing, so that even if I forget to run the analysis with all the orphan events included, we will cut events potentially coming after an instrumental or muon that got cut by the junk cut.
2020-11-01cut orphans instead of JUNK eventstlatorre
This commit updates get_events() to only cut orphans instead of all JUNK events before calculating time differences. The reason is that some large instrumental events (or muons) can get flagged as JUNK events since they sometimes have multiple hits from the same PMT. If we remove them before calculating the time difference, the follower might not get cut. See run 10040 GTID 349491 for an example.
2020-11-01don't apply nhit trigger cut to MCtlatorre
2020-10-14fix bug in submit-grid-jobs-queuetlatorre
This commit fixes a typo in submit-grid-jobs-queue by fixing get_job() -> get_entry(). I also decided not to remove held jobs for now, because it's easier for me to see how many are held when running condor_q.
2020-10-13fix bug in submit-grid-jobs queue when running many jobstlatorre
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).