{"action":"created","comment":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments/45523680","id":45523680,"diff_hunk":"@@ -1729,10 +1749,14 @@ def swap_filters(self, filter1, filter2):\n         filter2 : Filter\n             The filter to swap with filter1\n \n+        inline : bool, optional","path":"openmc/tallies.py","position":212,"original_position":212,"commit_id":"f9204ce66eef7a41944fede279e04d1f2ef3e2d9","original_commit_id":"f9204ce66eef7a41944fede279e04d1f2ef3e2d9","user":{"login":"wbinventor","id":209492,"avatar_url":"https://avatars.githubusercontent.com/u/209492?v=3","gravatar_id":"","url":"https://api.github.com/users/wbinventor","html_url":"https://github.com/wbinventor","followers_url":"https://api.github.com/users/wbinventor/followers","following_url":"https://api.github.com/users/wbinventor/following{/other_user}","gists_url":"https://api.github.com/users/wbinventor/gists{/gist_id}","starred_url":"https://api.github.com/users/wbinventor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbinventor/subscriptions","organizations_url":"https://api.github.com/users/wbinventor/orgs","repos_url":"https://api.github.com/users/wbinventor/repos","events_url":"https://api.github.com/users/wbinventor/events{/privacy}","received_events_url":"https://api.github.com/users/wbinventor/received_events","type":"User","site_admin":false},"body":"Looks like we have spaces between our parameters in this docstring which is weird and inconsistent with the rest of the API's docstrings. Can you remove the blank lines between parameters here?","created_at":"2015-11-20T21:55:37Z","updated_at":"2015-11-20T21:55:37Z","html_url":"https://github.com/mit-crpg/openmc/pull/507#discussion_r45523680","pull_request_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/507","_links":{"self":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments/45523680"},"html":{"href":"https://github.com/mit-crpg/openmc/pull/507#discussion_r45523680"},"pull_request":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/507"}}},"pull_request":{"url":"https://api.github.com/repos/mit-crpg/openmc/pulls/507","id":51288858,"html_url":"https://github.com/mit-crpg/openmc/pull/507","diff_url":"https://github.com/mit-crpg/openmc/pull/507.diff","patch_url":"https://github.com/mit-crpg/openmc/pull/507.patch","issue_url":"https://api.github.com/repos/mit-crpg/openmc/issues/507","number":507,"state":"open","locked":false,"title":"Fix to tally arithmetic operations and addition of tally summation over all bins","user":{"login":"samuelshaner","id":1244537,"avatar_url":"https://avatars.githubusercontent.com/u/1244537?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelshaner","html_url":"https://github.com/samuelshaner","followers_url":"https://api.github.com/users/samuelshaner/followers","following_url":"https://api.github.com/users/samuelshaner/following{/other_user}","gists_url":"https://api.github.com/users/samuelshaner/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelshaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelshaner/subscriptions","organizations_url":"https://api.github.com/users/samuelshaner/orgs","repos_url":"https://api.github.com/users/samuelshaner/repos","events_url":"https://api.github.com/users/samuelshaner/events{/privacy}","received_events_url":"https://api.github.com/users/samuelshaner/received_events","type":"User","site_admin":false},"body":"This PR seeks to make two modifications to `tallies.py` and one modification to `cross.py`:\r\n- **Fixed error in CrossFilter type setter** - Changed `type` to `filter_type` to reflect input parameter.\r\n- **Fix to tally arithmetic** - The `_outer_product()` method assumes that all matching filters exist in positions [0,# matching filters - 1]. However, the method does not rearrange the filters within each tally being operated on to be in these positions. Thus, if the matching filters are not all arranged in this ordering *and* there are cross filters present, the tally arithmetic operation will not correctly add the filters to the outer product tally. This PR rearranges the filters for each tally such that the matching filters are located in positions [0,# matching filters - 1]. Additionally, the `_align_tally_data()` method was not correctly reshaping the data. For instance, when aligning by nuclide, the reshape process does not account for tally reshaping due to misaligned filters. Furthermore, when aligning by score, the reshape process does not account for tally reshaping due to misaligned filters or nuclides. This PR corrects the reshaping processes that occur during tally alignment. \r\n- **Tally summation over all bins** - In order to tally over all the filter bins for a particular filter, it was necessary to explicitly give all the filter bins to the summation method. In this PR, when a filter type is input with no accompanying filter bins, the summation is performed over all the filter bins. Furthermore, a `remove_filter` input parameter has been added to give users the ability to remove the filter that is summed over. If set to true, the filter is removed and the summed tally is given the name:\r\n\r\n        tally_sum.name = 'sum({0}, {1})'.format(self.name, filter_type) \r\n\r\n    I'm open to other suggestions on removing a filter during the summation routine, but I think it is a nice feature to have to avoid the bloating of tally name and filter type strings and remove a potentially unwanted filter.","created_at":"2015-11-19T22:11:02Z","updated_at":"2015-11-20T21:55:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"915f95bd784d0d2098b67f62e109a9ff7ec0b9eb","assignee":{"login":"wbinventor","id":209492,"avatar_url":"https://avatars.githubusercontent.com/u/209492?v=3","gravatar_id":"","url":"https://api.github.com/users/wbinventor","html_url":"https://github.com/wbinventor","followers_url":"https://api.github.com/users/wbinventor/followers","following_url":"https://api.github.com/users/wbinventor/following{/other_user}","gists_url":"https://api.github.com/users/wbinventor/gists{/gist_id}","starred_url":"https://api.github.com/users/wbinventor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbinventor/subscriptions","organizations_url":"https://api.github.com/users/wbinventor/orgs","repos_url":"https://api.github.com/users/wbinventor/repos","events_url":"https://api.github.com/users/wbinventor/events{/privacy}","received_events_url":"https://api.github.com/users/wbinventor/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/507/commits","review_comments_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/507/comments","review_comment_url":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mit-crpg/openmc/issues/507/comments","statuses_url":"https://api.github.com/repos/mit-crpg/openmc/statuses/f9204ce66eef7a41944fede279e04d1f2ef3e2d9","head":{"label":"samuelshaner:outer-product","ref":"outer-product","sha":"f9204ce66eef7a41944fede279e04d1f2ef3e2d9","user":{"login":"samuelshaner","id":1244537,"avatar_url":"https://avatars.githubusercontent.com/u/1244537?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelshaner","html_url":"https://github.com/samuelshaner","followers_url":"https://api.github.com/users/samuelshaner/followers","following_url":"https://api.github.com/users/samuelshaner/following{/other_user}","gists_url":"https://api.github.com/users/samuelshaner/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelshaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelshaner/subscriptions","organizations_url":"https://api.github.com/users/samuelshaner/orgs","repos_url":"https://api.github.com/users/samuelshaner/repos","events_url":"https://api.github.com/users/samuelshaner/events{/privacy}","received_events_url":"https://api.github.com/users/samuelshaner/received_events","type":"User","site_admin":false},"repo":{"id":30840720,"name":"openmc","full_name":"samuelshaner/openmc","owner":{"login":"samuelshaner","id":1244537,"avatar_url":"https://avatars.githubusercontent.com/u/1244537?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelshaner","html_url":"https://github.com/samuelshaner","followers_url":"https://api.github.com/users/samuelshaner/followers","following_url":"https://api.github.com/users/samuelshaner/following{/other_user}","gists_url":"https://api.github.com/users/samuelshaner/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelshaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelshaner/subscriptions","organizations_url":"https://api.github.com/users/samuelshaner/orgs","repos_url":"https://api.github.com/users/samuelshaner/repos","events_url":"https://api.github.com/users/samuelshaner/events{/privacy}","received_events_url":"https://api.github.com/users/samuelshaner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samuelshaner/openmc","description":"OpenMC Monte Carlo Code","fork":true,"url":"https://api.github.com/repos/samuelshaner/openmc","forks_url":"https://api.github.com/repos/samuelshaner/openmc/forks","keys_url":"https://api.github.com/repos/samuelshaner/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samuelshaner/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samuelshaner/openmc/teams","hooks_url":"https://api.github.com/repos/samuelshaner/openmc/hooks","issue_events_url":"https://api.github.com/repos/samuelshaner/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/samuelshaner/openmc/events","assignees_url":"https://api.github.com/repos/samuelshaner/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/samuelshaner/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/samuelshaner/openmc/tags","blobs_url":"https://api.github.com/repos/samuelshaner/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samuelshaner/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samuelshaner/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/samuelshaner/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samuelshaner/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/samuelshaner/openmc/languages","stargazers_url":"https://api.github.com/repos/samuelshaner/openmc/stargazers","contributors_url":"https://api.github.com/repos/samuelshaner/openmc/contributors","subscribers_url":"https://api.github.com/repos/samuelshaner/openmc/subscribers","subscription_url":"https://api.github.com/repos/samuelshaner/openmc/subscription","commits_url":"https://api.github.com/repos/samuelshaner/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/samuelshaner/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/samuelshaner/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/samuelshaner/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/samuelshaner/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/samuelshaner/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samuelshaner/openmc/merges","archive_url":"https://api.github.com/repos/samuelshaner/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samuelshaner/openmc/downloads","issues_url":"https://api.github.com/repos/samuelshaner/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/samuelshaner/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/samuelshaner/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/samuelshaner/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samuelshaner/openmc/labels{/name}","releases_url":"https://api.github.com/repos/samuelshaner/openmc/releases{/id}","created_at":"2015-02-15T20:23:50Z","updated_at":"2015-02-15T20:41:35Z","pushed_at":"2015-11-20T18:06:47Z","git_url":"git://github.com/samuelshaner/openmc.git","ssh_url":"git@github.com:samuelshaner/openmc.git","clone_url":"https://github.com/samuelshaner/openmc.git","svn_url":"https://github.com/samuelshaner/openmc","homepage":"http://mit-crpg.github.io/openmc/","size":24932,"stargazers_count":0,"watchers_count":0,"language":"FORTRAN","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"mit-crpg:develop","ref":"develop","sha":"a592f2ad1501aa8cb8c7f4e813ea335628ab70e0","user":{"login":"mit-crpg","id":1247634,"avatar_url":"https://avatars.githubusercontent.com/u/1247634?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-crpg","html_url":"https://github.com/mit-crpg","followers_url":"https://api.github.com/users/mit-crpg/followers","following_url":"https://api.github.com/users/mit-crpg/following{/other_user}","gists_url":"https://api.github.com/users/mit-crpg/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-crpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-crpg/subscriptions","organizations_url":"https://api.github.com/users/mit-crpg/orgs","repos_url":"https://api.github.com/users/mit-crpg/repos","events_url":"https://api.github.com/users/mit-crpg/events{/privacy}","received_events_url":"https://api.github.com/users/mit-crpg/received_events","type":"Organization","site_admin":false},"repo":{"id":2081118,"name":"openmc","full_name":"mit-crpg/openmc","owner":{"login":"mit-crpg","id":1247634,"avatar_url":"https://avatars.githubusercontent.com/u/1247634?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-crpg","html_url":"https://github.com/mit-crpg","followers_url":"https://api.github.com/users/mit-crpg/followers","following_url":"https://api.github.com/users/mit-crpg/following{/other_user}","gists_url":"https://api.github.com/users/mit-crpg/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-crpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-crpg/subscriptions","organizations_url":"https://api.github.com/users/mit-crpg/orgs","repos_url":"https://api.github.com/users/mit-crpg/repos","events_url":"https://api.github.com/users/mit-crpg/events{/privacy}","received_events_url":"https://api.github.com/users/mit-crpg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mit-crpg/openmc","description":"OpenMC Monte Carlo Code","fork":false,"url":"https://api.github.com/repos/mit-crpg/openmc","forks_url":"https://api.github.com/repos/mit-crpg/openmc/forks","keys_url":"https://api.github.com/repos/mit-crpg/openmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mit-crpg/openmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mit-crpg/openmc/teams","hooks_url":"https://api.github.com/repos/mit-crpg/openmc/hooks","issue_events_url":"https://api.github.com/repos/mit-crpg/openmc/issues/events{/number}","events_url":"https://api.github.com/repos/mit-crpg/openmc/events","assignees_url":"https://api.github.com/repos/mit-crpg/openmc/assignees{/user}","branches_url":"https://api.github.com/repos/mit-crpg/openmc/branches{/branch}","tags_url":"https://api.github.com/repos/mit-crpg/openmc/tags","blobs_url":"https://api.github.com/repos/mit-crpg/openmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mit-crpg/openmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mit-crpg/openmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/mit-crpg/openmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mit-crpg/openmc/statuses/{sha}","languages_url":"https://api.github.com/repos/mit-crpg/openmc/languages","stargazers_url":"https://api.github.com/repos/mit-crpg/openmc/stargazers","contributors_url":"https://api.github.com/repos/mit-crpg/openmc/contributors","subscribers_url":"https://api.github.com/repos/mit-crpg/openmc/subscribers","subscription_url":"https://api.github.com/repos/mit-crpg/openmc/subscription","commits_url":"https://api.github.com/repos/mit-crpg/openmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/mit-crpg/openmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/mit-crpg/openmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/mit-crpg/openmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/mit-crpg/openmc/contents/{+path}","compare_url":"https://api.github.com/repos/mit-crpg/openmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mit-crpg/openmc/merges","archive_url":"https://api.github.com/repos/mit-crpg/openmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mit-crpg/openmc/downloads","issues_url":"https://api.github.com/repos/mit-crpg/openmc/issues{/number}","pulls_url":"https://api.github.com/repos/mit-crpg/openmc/pulls{/number}","milestones_url":"https://api.github.com/repos/mit-crpg/openmc/milestones{/number}","notifications_url":"https://api.github.com/repos/mit-crpg/openmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mit-crpg/openmc/labels{/name}","releases_url":"https://api.github.com/repos/mit-crpg/openmc/releases{/id}","created_at":"2011-07-21T00:33:27Z","updated_at":"2015-11-08T23:33:43Z","pushed_at":"2015-11-20T18:06:49Z","git_url":"git://github.com/mit-crpg/openmc.git","ssh_url":"git@github.com:mit-crpg/openmc.git","clone_url":"https://github.com/mit-crpg/openmc.git","svn_url":"https://github.com/mit-crpg/openmc","homepage":"http://mit-crpg.github.io/openmc/","size":35826,"stargazers_count":62,"watchers_count":62,"language":"FORTRAN","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":86,"mirror_url":null,"open_issues_count":41,"forks":86,"open_issues":41,"watchers":62,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/507"},"html":{"href":"https://github.com/mit-crpg/openmc/pull/507"},"issue":{"href":"https://api.github.com/repos/mit-crpg/openmc/issues/507"},"comments":{"href":"https://api.github.com/repos/mit-crpg/openmc/issues/507/comments"},"review_comments":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/507/comments"},"review_comment":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mit-crpg/openmc/pulls/507/commits"},"statuses":{"href":"https://api.github.com/repos/mit-crpg/openmc/statuses/f9204ce66eef7a41944fede279e04d1f2ef3e2d9"}}}}