{"action":"created","issue":{"url":"https://api.github.com/repos/XENON1T/hax/issues/109","repository_url":"https://api.github.com/repos/XENON1T/hax","labels_url":"https://api.github.com/repos/XENON1T/hax/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/XENON1T/hax/issues/109/comments","events_url":"https://api.github.com/repos/XENON1T/hax/issues/109/events","html_url":"https://github.com/XENON1T/hax/pull/109","id":234845852,"number":109,"title":"Add Corrections minitree","user":{"login":"adambrown1","id":22192046,"avatar_url":"https://avatars3.githubusercontent.com/u/22192046?v=3","gravatar_id":"","url":"https://api.github.com/users/adambrown1","html_url":"https://github.com/adambrown1","followers_url":"https://api.github.com/users/adambrown1/followers","following_url":"https://api.github.com/users/adambrown1/following{/other_user}","gists_url":"https://api.github.com/users/adambrown1/gists{/gist_id}","starred_url":"https://api.github.com/users/adambrown1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adambrown1/subscriptions","organizations_url":"https://api.github.com/users/adambrown1/orgs","repos_url":"https://api.github.com/users/adambrown1/repos","events_url":"https://api.github.com/users/adambrown1/events{/privacy}","received_events_url":"https://api.github.com/users/adambrown1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-06-09T14:33:54Z","updated_at":"2017-06-14T20:12:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/XENON1T/hax/pulls/109","html_url":"https://github.com/XENON1T/hax/pull/109","diff_url":"https://github.com/XENON1T/hax/pull/109.diff","patch_url":"https://github.com/XENON1T/hax/pull/109.patch"},"body":"This adds a minitree \"Corrections\" which provides the corrected S2 area (total, top and bottom) and the observed (uncorrected) interaction positions for the main interaction. It is envisaged to move all high-level corrections for which there is no good reason to compute during processing with pax here eventually.\r\n\r\nImportant caveat: the corrected, total S2 area is called 'cs2' just like in the Basics minitree. This could cause some problems since in Basics the S2 correction is not applied correctly (due to a pax bug). Therefore to get the correction applied correctly, while the key is duplicated, Corrections has to come before Basics in the list of treemakers passed to hax.minitrees.load:\r\n`hax.minitrees.load(datasets, ['Corrections', 'Basics'])`\r\nnot\r\n`hax.minitrees.load(datasets, [ 'Basics','Corrections'])`\r\n\r\nThe map to use for the S2 correction is chosen based on the run number (change at the end of science run 0). The position reconstruction correction (which is undone to give the uncorrected positions) comes from pax.\r\n\r\nThis treemaker fixes all the problems (that I know about) related to applying the S2 correction and I have checked that the correction applied using it within hax looks reasonable."},"comment":{"url":"https://api.github.com/repos/XENON1T/hax/issues/comments/308544831","html_url":"https://github.com/XENON1T/hax/pull/109#issuecomment-308544831","issue_url":"https://api.github.com/repos/XENON1T/hax/issues/109","id":308544831,"user":{"login":"coderdj","id":4679809,"avatar_url":"https://avatars1.githubusercontent.com/u/4679809?v=3","gravatar_id":"","url":"https://api.github.com/users/coderdj","html_url":"https://github.com/coderdj","followers_url":"https://api.github.com/users/coderdj/followers","following_url":"https://api.github.com/users/coderdj/following{/other_user}","gists_url":"https://api.github.com/users/coderdj/gists{/gist_id}","starred_url":"https://api.github.com/users/coderdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coderdj/subscriptions","organizations_url":"https://api.github.com/users/coderdj/orgs","repos_url":"https://api.github.com/users/coderdj/repos","events_url":"https://api.github.com/users/coderdj/events{/privacy}","received_events_url":"https://api.github.com/users/coderdj/received_events","type":"User","site_admin":false},"created_at":"2017-06-14T20:12:59Z","updated_at":"2017-06-14T20:12:59Z","body":"For versioning that's exactly the behavior we want. You don't want to change something totally different then have your minutes minitrees all recreated just because version was bumped.  \r\n\r\nFor non-standard interactions I think we should just make the corrections here as well. The benefit of saving the time and effort of reprocessing is worth the extra complexity of putting it here. Maybe we can split the actual correction application into a more general function that could be applied to any interaction?"}}
{"actor":{"display_login":"coderdj"}}