Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two bugs in new S1 AFT and pattern likelihood calculations #183

Merged
merged 3 commits into from
Dec 19, 2017

Conversation

pdeperio
Copy link
Contributor

@pdeperio pdeperio commented Dec 19, 2017

  1. Event index i was overwritten by a loop index over PMTs, so compute_gof and s1_aft_map.get_value were always using the position of event number 247. Now fixed by using more explicit variable names.

  2. The argument pmt_selection in compute_gof should be an array of booleans of size apc[self.tpc_channels]. Not sure if what's done in BuildInteractions.py is correct, but here it was crashing at

pmts_bottom = np.setdiff1d(self.tpc_channels, confused_s1_channels)
pmts_bottom[self.pax_config['DEFAULT']['channels_top']] = 0

dask.async.IndexError: index 118 is out of bounds for axis 1 with size 118

since pmts_bottom is no longer the full PMT array after removing confused_s1_channels. Now I just explicitly keep a full PMT array is_pmt_in, similarly to TopPatternFit.py to keep track of which PMTs to include in the likelihood.

@requested reviewers, please double check this implementation and implications.

0.2 is actually less than 0.16
@coderdj coderdj merged commit 5bf6e1f into newpatternlikelihood Dec 19, 2017
@coderdj
Copy link
Contributor

coderdj commented Dec 19, 2017

Fine but prefer we test that updates don't break things before merging them. These variables now useless int the production we just did.

@coderdj coderdj deleted the pattern_bugfixes branch December 19, 2017 09:01
pdeperio pushed a commit that referenced this pull request Dec 25, 2017
* Added posrec treemaker

* Updates to posrec treemaker

* Bug fixes

* placeholder for tensorflow based pos_reconstruction

* minor style issue

* working version

* lint fixes

* Update posrec.py (#177)

* Properly declare size of array

* ignor bad pattern with hits

* Added s1patternfit for bottom. Also split files into ini options

* Fix S1 bottom pattern, docs, and lint (#180)

* Fix S1 bottom pattern, docs, and lint

* Fix oops

* Increment version

* Fixed some bugs and made it run

* Update posrec.py

add s1 area fraction near injection points near Rn220 source for anomalous leakage studies. Details can be seen in the following note.
https://xe1t-wiki.lngs.infn.it/doku.php?id=xenon:xenon1t:analysis:sciencerun1:anomalous_background#can_we_remove_leakage_events_by_tightening_some_cuts

* Update posrec.py

* Update posrec.py

* Update posrec.py

* Address some of Chris' comments and lint fixes

* Update NN files
according to XENON1T/pax#650

* NN file switching depending on SR (#181)

* Add capability to switch NN files for SR
and more metadata and logging and lint fixes

* More comments

* Fix two bugs in new S1 AFT and pattern likelihood calculations (#183)

* Fix bugs in event indexing and PMT selection
for S1 likelihood calculations

* Increment version

* Fix version oops

0.2 is actually less than 0.16

* Add SR dependent bad PMT list (#184)

* Pull corrections logic out of minitree maker (#185)

* Added new corrections handler class

* Made it work

* Made posrec treemaker work with new class too

* Revert version bump

* Oops. Moved instead of git moved.

* Implement in CorrectedDoubleS1Scatter and lint fixes

* Add 3D FDC for TFNN in SR1

See details here:
XENON1T/pax#655

* Add 3D FDC for TFNN in SR1

See details here:
XENON1T/pax#655

* Update version number

Forgot again...

* fix bug

Name should be 'event_data' instead of 'result'...

* fix bugs

* fix bugs 2

* Update posrec.py

* Update posrec.py

adding additional s1 width variables for AC events rejection

* Update posrec.py

* Add 3D FDC for TFNN in SR0

* More S1 AFT variables (#188)

* Store additional AFT var using area instead of hits
and AFT probability from map

* Fix variable name

* Store binomial probability instead of aft

* Remove S1 width variables

Moved to Extended minitree in #190

* sort the tensorflow files name

* Update posrec.py

* Make bad PMT list read-in work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants