aboutsummaryrefslogtreecommitdiff
path: root/utils
AgeCommit message (Collapse)Author
2019-11-18fix a bug in the position generation in gen-dark-mattertlatorre
This commit fixes a bug in gen-dark matter which was causing the positions to all be generated with positive x, y, and z values. Doh!
2019-10-05fix typo in plot-energytlatorre
2019-09-30fix a SettingWithCopyWarning in plot-energytlatorre
2019-09-30update plot-energy to sort events by GTIDtlatorre
2019-09-25update zdab-reprocess to be faster and run FTP and RSPtlatorre
This commit updates the zdab-reprocess script with the following changes: - don't run RAA - don't run a bunch of the other fitters like FTI, etc. - run the path and RSP fitters - add --lower-nhit and --upper-nhit command line arguments to control the primary nhit cut range
2019-09-25fix another small bug in zdab-reprocesstlatorre
2019-09-24fix bugs introduced into zdab-reprocess in commit 1e35deatlatorre
2019-09-24update zdab-reprocess to be able to handle more filenamestlatorre
2019-09-23select prompt events before data cleaning cutstlatorre
This commit updates plot-energy to select prompt events before applying the data cleaning cuts. This fixes an issue where we might accidentally classify an event as a prompt event even if it came after an event that was flagged by data cleaning. For example, suppose there was a breakdown but for whatever reason the event immediately after the breakdown wasn't tagged (ignoring the fact that we apply a breakdown follower cut). If we apply the data cleaning first and then the prompt event selection, that event would be a part of the prompt events. There are several other small updates to plot-energy: - fix bug in 00-orphan cut - make michel event selection a separate function - make atmospheric tag into a separate function
2019-09-23add sub_run variable to the events array in the HDF5 filetlatorre
This commit adds the sub_run variable to the ev array in the HDF5 output file and updates plot-energy to order the events using the run and sub_run variables. This fixes a potential issue where I was sorting by GTID before, but the GTID can wrap around and so isn't guaranteed to put the events in the right order.
2019-09-23add the 00-orphan cut to plot-energytlatorre
2019-09-09add retrigger, flasher follower, and breakdown follower cuts to plot-energytlatorre
2019-08-29add itc cut to plot-energytlatorre
2019-08-28update cat-grid-jobstlatorre
This commit updates cat-grid-jobs to only warn once about a mismatch between the SHA1 of the current zdab-cat program and the grid results, and also cleans up some of the output.
2019-08-28update submit-grid-jobs to use my version of splitexttlatorre
This commit updates the submit-grid-jobs script to use my version of splitext() which removes the full extension from the filename. This fixes an issue where the output HDF5 files had xzdab in the name whenever the input file had the file extension .xzdab.gz.
2019-08-28unwrap the 50 MHz clock in plot-energytlatorre
2019-08-27fix the fts cuttlatorre
This commit fixes the FTS cut so that it returns 1 when the event is flagged as failing the cut. Previously, the function returned the following: not enough PMT pairs: 0 (fail) median time > 6.8 ns: 0 (fail) otherwise: 1 (pass) This had two issues: the return value wasn't consistent with the rest of the data cleaning cuts and it should pass if there aren't enough PMT pairs. Now, I fixed the not enough PMT pairs case and made the return value consistent with the rest of the data cleaning cuts: not enough PMT pairs: 0 (pass) median time > 6.8 ns: 1 (fail) otherwise: 0 (pass)
2019-08-27add a script to reprocess SNO zdabstlatorre
2019-08-05add ability to specify a particle combo on the command linetlatorre
This commit updates the fit program to accept a particle combo from the command line so you can fit for a single particle combination hypothesis. For example running: $ ./fit ~/zdabs/mu_minus_700_1000.hdf5 -p 2020 would just fit for the 2 electron hypothesis. The reason for adding this ability is that my grid jobs were getting evicted when fitting muons in run 10,000 since it takes 10s of hours to fit for all the particle hypothesis. With this change, and a small update to the submit-grid-jobs script we now submit a single grid job per particle combination hypothesis which should make each grid job run approximately 4 times faster.
2019-07-16install plot-energytlatorre
2019-07-16install cat-grid-jobs and chmod +x fit-wrappertlatorre
2019-07-12set ignore_index=True in pd.concat() since we don't care about the indextlatorre
2019-07-12fix a couple of bugs in plot-energytlatorre
This commit fixes two small bugs in the plotting scripts. First, after the HDF5 commit I wasn't correctly computing the particle ID string which I had been using before which was needed in order to plot things correctly. Second, I realized that the dataframe groupby function first() actually selects the first non-null column from each group! What I really wanted was the first row from each group, so all instances of .first() were updated to .nth(0). See https://stackoverflow.com/questions/20067636/pandas-dataframe-get-first-row-of-each-group.
2019-07-12update cat-grid-jobs to take a directory as an argument instead of filestlatorre
2019-07-11switch from YAML output to HDF5 to speed things uptlatorre
2019-07-04small updates to plot-energytlatorre
- apply muon follower and muon cuts to atmospheric sample - print warnings in red - fix how events with fmin = nan are counted
2019-06-26update plot-energy scripttlatorre
Tidy up the code in the script by creating a function to plot the energy distributions for each particle combo. Also fixed a bug which was causing the neutron follower cut not to be applied.
2019-06-26plot Michel electrons and muons in plot-energytlatorre
This commit is a major update to the plot-energy script. The most significant changes are: - new prompt event selection We now define prompt events as any event >= 100 nhit which is at least 250 ms away from the last 100 nhit event. - add Michel electron event selection. Michel electrons are now selected as any event between 800 ns and 20 microseconds after a muon or prompt event. Additionally they are required to be >= 100 nhit and pass an extra set of data cleaning cuts (compared to the prompt events). - add an atmospheric "sideband" I also updated the script to plot the energy distribution and particle ID for all events that *do* have a neutron follower as a kind of sideband which should contain only atmospheric events. - plot muon energy spectrum and angular distribution
2019-06-24update plot-energy to apply neutron follower cuttlatorre
2019-06-24add a generator to simulate self destructing dark mattertlatorre
2019-06-24update plot-energy to apply data cleaning cutstlatorre
2019-06-20update cat-grid-jobs to use CDumper to speed things uptlatorre
2019-06-20fix cat-grid-jobs againtlatorre
2019-06-20delete print statementtlatorre
2019-06-20update cat-grid-jobs to work with zdab-cattlatorre
2019-06-20update zdab-cat to emit multiple YAML documentstlatorre
This commit updates zdab-cat to output each event as an individual YAML document. The advantage of this is that we can then iterate over these without loading the entire YAML document in submit-grid-jobs which means that we won't use GB of memory on the grid submission node.
2019-06-20update submit-grid-jobs to send stderr to /dev/nulltlatorre
2019-06-19update plot-energy to include ockham factortlatorre
2019-06-19update cat-grid-jobs to combine all events with fit resultstlatorre
This commit updates the cat-grid-jobs script to call zdab-cat on the zdab file first to get the data cleaning words and SNOMAN fitter results for every single event (regardless of if it's greater than 100 nhit for example), and then add the fit results from the grid jobs output.
2019-06-13add a data cleaning cut to tag incoming muonstlatorre
This commit adds a data cleaning cut to tag incoming muons by looking for early OWL hits. It also significantly updates the flasher cut to catch more flashers. In particular, the flasher cut now does the following: - loops over *all* paddle cards with at least 4 hits instead of just the paddle cards with the most hits - uses QLX to look for charge outliers in the paddle card - fixes a few bugs (for example, uninitialized values in the charge array) - adds a check to to see if the given slot is early with respect to all PMTs within 4 meters to catch the case where the flashing channel is missing from the event
2019-06-06update submit-grid-jobstlatorre
This commit updates submit-grid-jobs so that it keeps track of which files it's already submitted grid jobs for.
2019-06-05fix x labeltlatorre
2019-06-05try to import CLoader if possible since it's *much* fastertlatorre
2019-06-05add a script to plot the total energy of the best fit resulttlatorre
2019-06-02update cat-grid-jobs to sort output based on gtidtlatorre
2019-06-02use yaml.loader.SafeLoadertlatorre
2019-06-02fix another bug in submit-grid-jobstlatorre
2019-06-02use full path in submit-grid-jobstlatorre
2019-06-02update submit-grid-jobs to create a new directorytlatorre
2019-05-24add a script to concatenate output from grid jobstlatorre