From b7beca7c1a7d06476075f7caf4ae55ca009064ab Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 11 May 2020 12:10:17 -0500 Subject: 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 --- utils/plot-energy | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'utils/plot-energy') 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 -- cgit