{"action":"created","comment":{"url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/comments/105429693","pull_request_review_id":26313257,"id":105429693,"diff_hunk":"@@ -76,36 +77,47 @@ def prepare(self):\n         # we should restrict the resulting grid rather than merge dimensions\n         # this changes the alternating case a little (without doing this, we\n         # may have started in reverse direction)\n-        for rect in [r for r in excluders \\\n-                if isinstance(r.roi, RectangularROI) and r.roi.angle == 0]:\n-            axis_1, axis_2 = rect.scannables[0], rect.scannables[1]\n-            gen_1 = [g for g in generators if axis_1 in g.axes][0]\n-            gen_2 = [g for g in generators if axis_2 in g.axes][0]\n-            if gen_1 is gen_2:\n-                continue\n-            if isinstance(gen_1, LineGenerator) \\\n-                    and isinstance(gen_2, LineGenerator):\n-                gen_1.prepare_positions()\n-                gen_2.prepare_positions()\n-                valid = np.full(gen_1.size, True, dtype=np.int8)\n-                valid &= gen_1.positions[axis_1] \\\n-                        <= rect.roi.width + rect.roi.start[0]\n-                valid &= gen_1.positions[axis_1] >= rect.roi.start[0]\n-                points_1 = gen_1.positions[axis_1][valid.astype(np.bool)]\n-                valid = np.full(gen_2.size, True, dtype=np.int8)\n-                valid &= gen_2.positions[axis_2] \\\n-                        <= rect.roi.height + rect.roi.start[1]\n-                valid &= gen_2.positions[axis_2] >= rect.roi.start[1]\n-                points_2 = gen_2.positions[axis_2][valid.astype(np.bool)]\n-                new_gen1 = LineGenerator(\n-                    gen_1.axes, gen_1.units, points_1[0], points_1[-1],\n-                    len(points_1), gen_1.alternate)\n-                new_gen2 = LineGenerator(\n-                    gen_2.axes, gen_2.units, points_2[0], points_2[-1],\n-                    len(points_2), gen_2.alternate)\n-                generators[generators.index(gen_1)] = new_gen1\n-                generators[generators.index(gen_2)] = new_gen2\n-                excluders.remove(rect)\n+        for excluder_ in [e for e in excluders if isinstance(e, ROIExcluder)]:\n+            rect_rois = [r for r in excluder_.rois\n+                         if isinstance(r, RectangularROI) and r.angle == 0]\n+            if len(rect_rois) == 1:","path":"scanpointgenerator/core/compoundgenerator.py","position":45,"original_position":45,"commit_id":"dd593a5a5b48c843c9ef8845b97245a15d4cf0c3","original_commit_id":"dd593a5a5b48c843c9ef8845b97245a15d4cf0c3","user":{"login":"GDYendell","id":15689569,"avatar_url":"https://avatars1.githubusercontent.com/u/15689569?v=3","gravatar_id":"","url":"https://api.github.com/users/GDYendell","html_url":"https://github.com/GDYendell","followers_url":"https://api.github.com/users/GDYendell/followers","following_url":"https://api.github.com/users/GDYendell/following{/other_user}","gists_url":"https://api.github.com/users/GDYendell/gists{/gist_id}","starred_url":"https://api.github.com/users/GDYendell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GDYendell/subscriptions","organizations_url":"https://api.github.com/users/GDYendell/orgs","repos_url":"https://api.github.com/users/GDYendell/repos","events_url":"https://api.github.com/users/GDYendell/events{/privacy}","received_events_url":"https://api.github.com/users/GDYendell/received_events","type":"User","site_admin":false},"body":"So, we can't reduce the excluder there are _any_ other ROIs? I thought it was just if there were multiple rectangular ROIs.","created_at":"2017-03-10T16:13:41Z","updated_at":"2017-03-10T16:13:41Z","html_url":"https://github.com/dls-controls/scanpointgenerator/pull/25#discussion_r105429693","pull_request_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/comments/105429693"},"html":{"href":"https://github.com/dls-controls/scanpointgenerator/pull/25#discussion_r105429693"},"pull_request":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25","id":109307445,"html_url":"https://github.com/dls-controls/scanpointgenerator/pull/25","diff_url":"https://github.com/dls-controls/scanpointgenerator/pull/25.diff","patch_url":"https://github.com/dls-controls/scanpointgenerator/pull/25.patch","issue_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/25","number":25,"state":"open","locked":false,"title":"Refactor Excluder into abstract base class and create ROIExcluder child class","user":{"login":"GDYendell","id":15689569,"avatar_url":"https://avatars1.githubusercontent.com/u/15689569?v=3","gravatar_id":"","url":"https://api.github.com/users/GDYendell","html_url":"https://github.com/GDYendell","followers_url":"https://api.github.com/users/GDYendell/followers","following_url":"https://api.github.com/users/GDYendell/following{/other_user}","gists_url":"https://api.github.com/users/GDYendell/gists{/gist_id}","starred_url":"https://api.github.com/users/GDYendell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GDYendell/subscriptions","organizations_url":"https://api.github.com/users/GDYendell/orgs","repos_url":"https://api.github.com/users/GDYendell/repos","events_url":"https://api.github.com/users/GDYendell/events{/privacy}","received_events_url":"https://api.github.com/users/GDYendell/received_events","type":"User","site_admin":false},"body":"ROIExcluder is equivalent to the old Excluder except:\r\n    * It takes a list of ROIs instead only one\r\n    * Scannables has been renamed to axes\r\n    * There is no contains_point method - it is no longer required\r\n\r\nThe main thing to check is the grid in a rectangular ROI edge case for loop. It has been adjusted to account for the excluder now having another level. Otherwise it looks like the rebase was clean, its worth checking the compound* and dimension scripts, though.","created_at":"2017-03-06T17:23:50Z","updated_at":"2017-03-10T16:13:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9622b751fa072eca0354c2e2ae5f31923c0e610a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25/commits","review_comments_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25/comments","review_comment_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/25/comments","statuses_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/statuses/dd593a5a5b48c843c9ef8845b97245a15d4cf0c3","head":{"label":"dls-controls:excluder-refactor","ref":"excluder-refactor","sha":"dd593a5a5b48c843c9ef8845b97245a15d4cf0c3","user":{"login":"dls-controls","id":8448831,"avatar_url":"https://avatars3.githubusercontent.com/u/8448831?v=3","gravatar_id":"","url":"https://api.github.com/users/dls-controls","html_url":"https://github.com/dls-controls","followers_url":"https://api.github.com/users/dls-controls/followers","following_url":"https://api.github.com/users/dls-controls/following{/other_user}","gists_url":"https://api.github.com/users/dls-controls/gists{/gist_id}","starred_url":"https://api.github.com/users/dls-controls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dls-controls/subscriptions","organizations_url":"https://api.github.com/users/dls-controls/orgs","repos_url":"https://api.github.com/users/dls-controls/repos","events_url":"https://api.github.com/users/dls-controls/events{/privacy}","received_events_url":"https://api.github.com/users/dls-controls/received_events","type":"Organization","site_admin":false},"repo":{"id":51993627,"name":"scanpointgenerator","full_name":"dls-controls/scanpointgenerator","owner":{"login":"dls-controls","id":8448831,"avatar_url":"https://avatars3.githubusercontent.com/u/8448831?v=3","gravatar_id":"","url":"https://api.github.com/users/dls-controls","html_url":"https://github.com/dls-controls","followers_url":"https://api.github.com/users/dls-controls/followers","following_url":"https://api.github.com/users/dls-controls/following{/other_user}","gists_url":"https://api.github.com/users/dls-controls/gists{/gist_id}","starred_url":"https://api.github.com/users/dls-controls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dls-controls/subscriptions","organizations_url":"https://api.github.com/users/dls-controls/orgs","repos_url":"https://api.github.com/users/dls-controls/repos","events_url":"https://api.github.com/users/dls-controls/events{/privacy}","received_events_url":"https://api.github.com/users/dls-controls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dls-controls/scanpointgenerator","description":"Python generators for malcolm and GDA scans","fork":false,"url":"https://api.github.com/repos/dls-controls/scanpointgenerator","forks_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/forks","keys_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/teams","hooks_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/hooks","issue_events_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/events{/number}","events_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/events","assignees_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/assignees{/user}","branches_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/branches{/branch}","tags_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/tags","blobs_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/refs{/sha}","trees_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/statuses/{sha}","languages_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/languages","stargazers_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/stargazers","contributors_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/contributors","subscribers_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/subscribers","subscription_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/subscription","commits_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/commits{/sha}","git_commits_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/commits{/sha}","comments_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/comments{/number}","issue_comment_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/comments{/number}","contents_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/contents/{+path}","compare_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/merges","archive_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/downloads","issues_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues{/number}","pulls_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls{/number}","milestones_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/milestones{/number}","notifications_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/labels{/name}","releases_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/releases{/id}","deployments_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/deployments","created_at":"2016-02-18T08:53:37Z","updated_at":"2016-10-27T07:31:01Z","pushed_at":"2017-03-10T16:04:20Z","git_url":"git://github.com/dls-controls/scanpointgenerator.git","ssh_url":"git@github.com:dls-controls/scanpointgenerator.git","clone_url":"https://github.com/dls-controls/scanpointgenerator.git","svn_url":"https://github.com/dls-controls/scanpointgenerator","homepage":null,"size":1392,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":1,"default_branch":"master"}},"base":{"label":"dls-controls:master","ref":"master","sha":"1cd43afb5facfcd590302b4517c04f829b5b5ca4","user":{"login":"dls-controls","id":8448831,"avatar_url":"https://avatars3.githubusercontent.com/u/8448831?v=3","gravatar_id":"","url":"https://api.github.com/users/dls-controls","html_url":"https://github.com/dls-controls","followers_url":"https://api.github.com/users/dls-controls/followers","following_url":"https://api.github.com/users/dls-controls/following{/other_user}","gists_url":"https://api.github.com/users/dls-controls/gists{/gist_id}","starred_url":"https://api.github.com/users/dls-controls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dls-controls/subscriptions","organizations_url":"https://api.github.com/users/dls-controls/orgs","repos_url":"https://api.github.com/users/dls-controls/repos","events_url":"https://api.github.com/users/dls-controls/events{/privacy}","received_events_url":"https://api.github.com/users/dls-controls/received_events","type":"Organization","site_admin":false},"repo":{"id":51993627,"name":"scanpointgenerator","full_name":"dls-controls/scanpointgenerator","owner":{"login":"dls-controls","id":8448831,"avatar_url":"https://avatars3.githubusercontent.com/u/8448831?v=3","gravatar_id":"","url":"https://api.github.com/users/dls-controls","html_url":"https://github.com/dls-controls","followers_url":"https://api.github.com/users/dls-controls/followers","following_url":"https://api.github.com/users/dls-controls/following{/other_user}","gists_url":"https://api.github.com/users/dls-controls/gists{/gist_id}","starred_url":"https://api.github.com/users/dls-controls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dls-controls/subscriptions","organizations_url":"https://api.github.com/users/dls-controls/orgs","repos_url":"https://api.github.com/users/dls-controls/repos","events_url":"https://api.github.com/users/dls-controls/events{/privacy}","received_events_url":"https://api.github.com/users/dls-controls/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dls-controls/scanpointgenerator","description":"Python generators for malcolm and GDA scans","fork":false,"url":"https://api.github.com/repos/dls-controls/scanpointgenerator","forks_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/forks","keys_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/teams","hooks_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/hooks","issue_events_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/events{/number}","events_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/events","assignees_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/assignees{/user}","branches_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/branches{/branch}","tags_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/tags","blobs_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/refs{/sha}","trees_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/statuses/{sha}","languages_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/languages","stargazers_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/stargazers","contributors_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/contributors","subscribers_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/subscribers","subscription_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/subscription","commits_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/commits{/sha}","git_commits_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/git/commits{/sha}","comments_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/comments{/number}","issue_comment_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/comments{/number}","contents_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/contents/{+path}","compare_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/merges","archive_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/downloads","issues_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues{/number}","pulls_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls{/number}","milestones_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/milestones{/number}","notifications_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/labels{/name}","releases_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/releases{/id}","deployments_url":"https://api.github.com/repos/dls-controls/scanpointgenerator/deployments","created_at":"2016-02-18T08:53:37Z","updated_at":"2016-10-27T07:31:01Z","pushed_at":"2017-03-10T16:04:20Z","git_url":"git://github.com/dls-controls/scanpointgenerator.git","ssh_url":"git@github.com:dls-controls/scanpointgenerator.git","clone_url":"https://github.com/dls-controls/scanpointgenerator.git","svn_url":"https://github.com/dls-controls/scanpointgenerator","homepage":null,"size":1392,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25"},"html":{"href":"https://github.com/dls-controls/scanpointgenerator/pull/25"},"issue":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/25"},"comments":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/dls-controls/scanpointgenerator/statuses/dd593a5a5b48c843c9ef8845b97245a15d4cf0c3"}}}}
{"actor":{"display_login":"GDYendell"}}