aboutsummaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2020-07-07add zdab-reprocess-orphans and plot-muons to Makefiletlatorre
2020-07-07add a script to reprocess just junk eventstlatorre
2020-07-06add function to print particle probabilities in plot-muonstlatorre
2020-07-06update plot-muons to plot energy distributions for each particle ID for ↵tlatorre
stopping muons
2020-07-06small updates to plot-muons and plot_energy.pytlatorre
- use pd.Series.where() instead of DataFrame.loc() to speed things up in tag_michels - don't set y limits when plotting bias and resolution for stopping muons
2020-07-06update plot-muonstlatorre
- add get_multinomial_prob() function to stats.py - add plot_hist2_data_mc() function to do the normal particle id plot but also print p values - other small bug fixes
2020-07-06add sddm/stats.pytlatorre
This commit adds the new file sddm/stats.py to and adds a function to correctly sample a Monte Carlo histogram when computing p-values. In particular, I now take into account the uncertainty on the total number of expected events by drawing from a gamma distribution, which is the posterior of the Poisson likelihood function with a prior of 1/lambda.
2020-07-06only look at Michel electrons where the muon had < 2500 nhittlatorre
2020-07-06update plot-muonstlatorre
- only look at muons with nhit < 4000 and udotr < -0.5 - switch from energy1 -> ke
2020-07-06add first draft of plot-muonstlatorre
This commit adds a first draft of a script to plot the michel energy distribution and particle id histograms for data and Monte Carlo and to plot the energy bias and resolution for stopping muons.
2020-06-29only set prompt events to muonstlatorre
2020-06-29add energy scale to chi2 fittlatorre
2020-06-29mark all events as muon if 'muon' is in the filenametlatorre
2020-06-23first draft of a script to do the chi2 analysistlatorre
This commit adds a first draft of a script called chi2. This script calculates a chi2 for the null hypothesis test if the events in the energy range 20 MeV - 10 GeV match what we expect from atmospheric neutrino events.
2020-06-22only recreate the fits dataset if there are new fitstlatorre
2020-06-22update get_events() to require at least 1 nhit trigger to firetlatorre
This commit updates get_events() to require at least 1 nhit trigger to fire. The reason for this is that after looking at a small fraction of the data I noticed a bunch of instrumental events that weren't getting tagged in run 10141. They looked sort of like neck events and were surrounded by hundreds of orphaned PMT hits. My best guess is that they really were neck events but the neck PMT hits and the hits in the lower hemisphere were erroneously not getting built into the events. Luckily, all of these events failed the psi cut, but it's not great to rely on such a high level cut to cut these events. One other thing I noticed was that these events were triggered mostly by MISS, OWLEL, and OWLEH. Therefore I thought it might be a good idea to require events to have at least 1 NHIT trigger. To test whether the NHIT triggers were reliably firing before the other triggers I looked at all muon events which *didn't* have an NHIT trigger fire. All of them appeared to be falsely tagged neck events so I'm fairly confident that the NHIT triggers do reliably fire before the other triggers for physics events.
2020-06-22update cat-grid-jobs to not use hdf5 resizetlatorre
This commit updates cat-grid-jobs to just add all the fits at once at the end instead of continuously resizing the fits dataset. The reason for this is that I noticed that several fit results files would occasionally have a large block of the fits be set to all zeros. I have no idea how this happened, but I suspect it might have been a bug with resizing the dataset so many times.
2020-06-22set reprocessed attribute to 1 instead of Truetlatorre
This commit updates cat-grid-jobs to change the reprocessed attribute to be 1 instead of True since the previous value was giving the following warning: /usr/lib64/python2.7/site-packages/tables/attributeset.py:298: DataTypeWarning: Unsupported type for attribute 'reprocessed' in node '/'. Offending HDF5 class: 8 value = self._g_getattr(self._v_node, name) when opening them up with pandas read_hdf() function.
2020-06-16update read_hdf() to open hdf5 files in read only modetlatorre
2020-06-16update follower cuts to be more memory efficient by using ffill()tlatorre
2020-06-16pd.read_hdf() -> read_hdf() so that we can run on gridtlatorre
2020-06-15update cat-grid-jobs to use reprocessed files if they're availabletlatorre
2020-06-15create new plot-dc script to replace plot-energy --dctlatorre
2020-06-14update dc and dc-closure-test to take into account fitted fraction of ↵tlatorre
instrumentals This commit updates the contamination analysis scripts to take into account the fact that we only fit a fraction of some of the instrumental events. Based on the recent rate at which my jobs have been running on the grid, fitting all the events would take *way* too long. Therefore, I'm now planning to only fit 10% of muon, flasher, and neck events. With this commit the contamination analysis will now correctly take into account the fact that we aren't fitting all the instrumental events.
2020-06-14only submit 10% of flashers, neck events, and muonstlatorre
2020-06-14tag instrumentals and michels in get_events()tlatorre
- label instrumentals in get_events() - tag michels and stopping muons in get_events() - update submit-grid-jobs to use get_events()
2020-06-08update submit-grid-jobs to check for unique filenames instead of runstlatorre
2020-06-08fix a bug in the likelihood ratio calculationtlatorre
2020-06-04update plot-energy to calculate likelihood ratiotlatorre
2020-06-02add an option to specify kinetic energy to gen-dark-mattertlatorre
2020-06-02increase max file size to 500 MBtlatorre
2020-06-02update Makefiletlatorre
2020-06-02add a script to move grid files from successful fits to a new directorytlatorre
2020-06-02update contamination closure test scripttlatorre
- print out mean acceptance fraction and autocorrelation time - print standard normal distribution pdf with pull plot histograms
2020-05-31update contamination analysis step sizetlatorre
This commit updates the step size used for the MCMC in the contamination analysis to 0.5 times the error returned by scanning near the minimum. I ran some tests and this seemed to be pretty efficient compared to either the full error or 0.1 times the error. I also reduced the number of workers to 10.
2020-05-31speed up MCMC proposal function by calling ravel() instead of doing a for looptlatorre
2020-05-25don't import from .plot in plot_energy.pytlatorre
This commit updates the plot_energy.py module to not import from plot globally since that means matplotlib gets pulled in by submit-grid-jobs and that causes errors on the grid login nodes.
2020-05-25update contamination analysis stufftlatorre
- fix Constraint.renormalize_no_fix() which could enter an infinite loop if the fixed parameter was greater than 1 - EPSILON - don't divide by psi twice in get_events() - only use prompt events and cut on nhit_cal < 100
2020-05-19always resubmit jobs in the RETRY statetlatorre
2020-05-19update debug messagetlatorre
2020-05-19add a new script to delete zdab files on the grid which were successfully fittlatorre
2020-05-12fix a few bugs in plot_energy.pytlatorre
2020-05-12add --priority argument to submit-grid-jobstlatorre
2020-05-12speed up the contamination analysis scripttlatorre
2020-05-12add a read_hdf() method that doesn't require pytablestlatorre
2020-05-12add a script to do a closure test on the contamination analysistlatorre
2020-05-11update python code to avoid importing matplotlib when running submit-grid-jobstlatorre
2020-05-11update ockham factor, remove hack, and don't submit all flasherstlatorre
This commit contains the following updates: - remove hack to get rid of low energy events in plot-energy since while writing the unidoc I realized it's not necessary now that we add +100 to multi-particle fits - update Ockham factor to use an energy resolution of 5% - update submit-grid-jobs to submit jobs according to the following criteria: - always submit prompt events with no data cleaning cuts - submit 10% of prompt flasher events - submit all other prompt events - submit followers only if they have no data cleaning cuts - update submit-grid-jobs to place the nhit cut of 100 on the calibrated nhit
2020-05-11add setup_matplotlib function and switch to logarithmic binstlatorre
This commit contains the following small updates: - create a setup_matplotlib() function to set up matplotlib correctly depending on if we are saving the plots or just displaying them - change default font size to 12 when displaying plots - switch to using logarithmic bins in plot-energy - fix despine() function when x axis is logarithmic
2020-05-11don't import everything in __init__.pytlatorre
This commit updates utils/sddm/__init__.py to not import everything by default. The reason is that on the open science grid login machine they don't have the module scipy.stats by default.