| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit updates the code to reweight the MC data from tau neutrinos
since I stupidly simulated the muon neutrino flux instead of the tau
neutrino flux.
|
|
|
|
This commite updates the Logger class to use str instead of basestring.
|
|
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
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
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
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
Previously the function to tag atmospherics was looking at the *first*
event to come after a prompt event and checking to see if it was a
neutron. However, this has a huge issue in that for large energy events,
there is often secondary events caused by afterpulsing.
I've now updated the algorithm to look for any events in which there is
*any* follower event that passes the neutron criteria.
|
|
ev.r -> ev_single_particle.r
|
|
|
|
I found a really simple form for the log likelihood ratio of a Poisson
and multinomial likelihood.
|
|
This commit updates get_events() to only merge fit info for events with
at least 10 events. The reason for this is that when analyzing recent
data where not all the fits have completed we don't want to plot the
data for events which haven't completely finished being fit.
|
|
|
|
|
|
- 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
|
|
- 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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|