{"action":"created","issue":{"url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1800","repository_url":"https://api.github.com/repos/hyperspy/hyperspy","labels_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1800/labels{/name}","comments_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1800/comments","events_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1800/events","html_url":"https://github.com/hyperspy/hyperspy/issues/1800","id":288571376,"number":1800,"title":"Complex signals and region of interest","user":{"login":"magnunor","id":1690979,"avatar_url":"https://avatars1.githubusercontent.com/u/1690979?v=4","gravatar_id":"","url":"https://api.github.com/users/magnunor","html_url":"https://github.com/magnunor","followers_url":"https://api.github.com/users/magnunor/followers","following_url":"https://api.github.com/users/magnunor/following{/other_user}","gists_url":"https://api.github.com/users/magnunor/gists{/gist_id}","starred_url":"https://api.github.com/users/magnunor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnunor/subscriptions","organizations_url":"https://api.github.com/users/magnunor/orgs","repos_url":"https://api.github.com/users/magnunor/repos","events_url":"https://api.github.com/users/magnunor/events{/privacy}","received_events_url":"https://api.github.com/users/magnunor/received_events","type":"User","site_admin":false},"labels":[{"id":410127191,"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/release:%20next%20patch","name":"release: next patch","color":"5319e7","default":false},{"id":142014,"url":"https://api.github.com/repos/hyperspy/hyperspy/labels/type:%20bug","name":"type: bug","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-01-15T12:00:54Z","updated_at":"2018-03-11T12:02:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Regions of interests does not work with complex signals:\r\n\r\n```python\r\nimport numpy as np\r\nimport hyperspy.api as hs\r\ns = hs.signals.ComplexSignal2D(np.ones((100, 100)))\r\ns.plot()\r\nline_roi = hs.roi.Line2DROI(x1=1, y1=1, x2=2, y2=2, linewidth=1)\r\nroi1d = line_roi.interactive(s)\r\n```\r\n\r\nGives the error:\r\n\r\n```python\r\nException: <ComplexSignal2D, title: , dimensions: (|100, 100)> does not have an active plot. Plot the signal before calling this method using its `plot` method.\r\n```\r\n\r\nEither the error message should be changed to `NotImplementedError` and the text improved, or ROIs should be adapted to work with complex signals."},"comment":{"url":"https://api.github.com/repos/hyperspy/hyperspy/issues/comments/372110071","html_url":"https://github.com/hyperspy/hyperspy/issues/1800#issuecomment-372110071","issue_url":"https://api.github.com/repos/hyperspy/hyperspy/issues/1800","id":372110071,"user":{"login":"thomasaarholt","id":2721423,"avatar_url":"https://avatars3.githubusercontent.com/u/2721423?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasaarholt","html_url":"https://github.com/thomasaarholt","followers_url":"https://api.github.com/users/thomasaarholt/followers","following_url":"https://api.github.com/users/thomasaarholt/following{/other_user}","gists_url":"https://api.github.com/users/thomasaarholt/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasaarholt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasaarholt/subscriptions","organizations_url":"https://api.github.com/users/thomasaarholt/orgs","repos_url":"https://api.github.com/users/thomasaarholt/repos","events_url":"https://api.github.com/users/thomasaarholt/events{/privacy}","received_events_url":"https://api.github.com/users/thomasaarholt/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T12:02:47Z","updated_at":"2018-03-11T12:02:47Z","author_association":"CONTRIBUTOR","body":"Another problem: `scikit.ndimage.interpolation`, which is used to interpolate the Line2DROI from a Signal2D to a Signal1D, does not currently support complex numbers. An issue is raised at scipy/scipy#2650.\r\n\r\nReproduction of error:\r\n```python\r\nimport numpy as np\r\nimport hyperspy.api as hs\r\ns = hs.signals.ComplexSignal2D(np.ones((100, 100)))\r\nline_roi = hs.roi.Line2DROI(x1=1, y1=1, x2=2, y2=2, linewidth=1)\r\nroi1d = line_roi(s)\r\n```"}}
{"actor":{"display_login":"thomasaarholt"}}