aboutsummaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
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.
2020-05-11update utils/ folder to make a python package called sddmtlatorre
This commit adds an sddm python package to the utils/ folder. This allows me to consolidate code used across all the various scripts. This package is now installed by default to /home/tlatorre/local/lib/python2.7/site-packages so you should add the following to your .bashrc file: export PYTHONPATH=$HOME/local/lib/python2.7/site-packages/:$PYTHONPATH before using the scripts installed to ~/local/bin.
2020-04-27update submit-grid-jobs to include priority in condor submit filetlatorre
2020-04-27add a script to plot the results of the ROOT fitstlatorre
2020-04-15update submit-grid-jobs to add a priority column to the databasetlatorre
This commit updates submit-grid-jobs so that jobs are now submitted first in order of priority and then timestamp. So any jobs with a higher priority will be submitted preferentially first, and within each priority level jobs are submitted in the order they are added to the database.
2020-04-15add ability to retry jobs in submit-grid-jobstlatorre
This commit updates submit-grid-jobs to look for jobs in the RETRY state and to retry them if the number of retries is less than --max-retries. This way if you ever want to retry a bunch of jobs you can update the database: $ sqlite3 ~/state.db sqlite> update state set state = 'RETRY' where state == 'FAILED'; And then rerun submit-grid-jobs with more retries: $ submit-grid-jobs --max-retries 10 ---auto
2020-04-15fix typo in submit-grid-jobstlatorre
2020-04-14add some tests to gen-dark-mattertlatorre
2020-04-13speed up submit-grid-jobs a lot by only calling condor_q oncetlatorre
2020-04-13update plot-fit-results script to be able to handle files with ↵tlatorre
multi-particle fits
2020-04-13update plot script to be able to handle files with multi-particle fitstlatorre
2020-04-13update plot-energy to fix a bug with muons and michels since we now store ↵tlatorre
more than one fit per particle combo
2020-04-13fix a few bugs in cat-grid-jobs since I now add 2 fit results per particle combotlatorre
2020-04-13update plot script now that we have multiple fits per particle combotlatorre
2020-04-13fix a few bugs in plot-energytlatorre
2020-02-19add scripts to apply neutrino oscillations to the atmospheric fluxestlatorre
This commit adds four scripts: 1. calculate-atmospheric-oscillations This script uses an independent python package called nucraft to calculate the neutrino oscillation probabilities for atmospheric neutrinos. These probabilities are calculated as a function of energy and cosine of the zenith angle and stored in text files. 2. apply-atmospheric-oscillations This script combines the high energy 2D atmospheric neutrino flux from Barr and the low energy 1D flux from Battistoni and then applies neutrino oscillations to them. The results are then stored in new flux files that can be used with a modified version of GENIE to simulate the oscillated atmospheric neutrino flux from 10 MeV to 10 GeV. 3. plot-atmospheric-fluxes This is a simple script to plot the atmospheric flux files produced by apply-atmospheric-oscillations. 4. plot-atmospheric-oscillations This is a simple script to plot the 2D neutrino oscillation probabilities.
2020-01-21fix a few bugs in submit-grid-jobstlatorre
2020-01-20add a --save command line argument to plot-energytlatorre
This commit adds the --save command line argument to plot-energy to save either the corner plots or the energy distribution plots. It also updates the code to make plots similar to plot-fit-results. In addition there are a bunch of other small changes: - plot the theoretical Michel spectrum for free muons - energy plots now assume there are only a max of 2 particles fit for each event - display particle IDs as letters instead of numbers, i.e. 2022 -> eu
2020-01-20from __future__ import print_function, divisiontlatorre