aboutsummaryrefslogtreecommitdiff
path: root/utils/plot-energy
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2020-05-11 12:10:17 -0500
committertlatorre <tlatorre@uchicago.edu>2020-05-11 12:10:17 -0500
commitb7beca7c1a7d06476075f7caf4ae55ca009064ab (patch)
tree4e47279e0d5d6278aacbfa7d218428968cc324eb /utils/plot-energy
parente82c1e138c104943314150921eba0c2111a30d6c (diff)
downloadsddm-b7beca7c1a7d06476075f7caf4ae55ca009064ab.tar.gz
sddm-b7beca7c1a7d06476075f7caf4ae55ca009064ab.tar.bz2
sddm-b7beca7c1a7d06476075f7caf4ae55ca009064ab.zip
update ockham factor, remove hack, and don't submit all flashers
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
Diffstat (limited to 'utils/plot-energy')
-rwxr-xr-xutils/plot-energy17
1 files changed, 1 insertions, 16 deletions
diff --git a/utils/plot-energy b/utils/plot-energy
index f082b8c..4cd116b 100755
--- a/utils/plot-energy
+++ b/utils/plot-energy
@@ -171,28 +171,13 @@ if __name__ == '__main__':
# so we can tag retrigger events
ev['dt'] = ev.groupby(['run'],group_keys=False)['gtr'].transform(lambda x: np.concatenate(([1e9],np.diff(x.values))))
- # This is a bit of a hack. It appears that many times the fit will
- # actually do much better by including a very low energy electron or
- # muon. I believe the reason for this is that of course my likelihood
- # function is not perfect (for example, I don't include the correct
- # angular distribution for Rayleigh scattered light), and so the fitter
- # often wants to add a very low energy electron or muon to fix things.
- #
- # Ideally I would fix the likelihood function, but for now we just
- # discard any fit results which have a very low energy electron or
- # muon.
- #
- # FIXME: Test this since query() is new to pandas
- fits = fits.query('not (n > 1 and ((id1 == 20 and energy1 < 20) or (id2 == 20 and energy2 < 20) or (id3 == 20 and energy3 < 20)))')
- fits = fits.query('not (n > 1 and ((id2 == 22 and energy1 < 200) or (id2 == 22 and energy2 < 200) or (id3 == 22 and energy3 < 200)))')
-
# Calculate the approximate Ockham factor.
# See Chapter 20 in "Probability Theory: The Logic of Science" by Jaynes
#
# Note: This is a really approximate form by assuming that the shape of
# the likelihood space is equal to the average uncertainty in the
# different parameters.
- fits['w'] = fits['n']*np.log(0.1*0.001) + np.log(fits['energy1']) + fits['n']*np.log(1e-4/(4*np.pi))
+ fits['w'] = fits['n']*np.log(0.05/10e3) + np.log(fits['energy1']) + fits['n']*np.log(1e-4/(4*np.pi))
# Apply a fudge factor to the Ockham factor of 100 for each extra particle
# FIXME: I chose 100 a while ago but didn't really investigate what the