{"action":"created","issue":{"url":"https://api.github.com/repos/spacetelescope/specviz/issues/167","repository_url":"https://api.github.com/repos/spacetelescope/specviz","labels_url":"https://api.github.com/repos/spacetelescope/specviz/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/spacetelescope/specviz/issues/167/comments","events_url":"https://api.github.com/repos/spacetelescope/specviz/issues/167/events","html_url":"https://github.com/spacetelescope/specviz/issues/167","id":136813394,"number":167,"title":"Toggling EW ROI gives traceback","user":{"login":"pllim","id":2090236,"avatar_url":"https://avatars.githubusercontent.com/u/2090236?v=3","gravatar_id":"","url":"https://api.github.com/users/pllim","html_url":"https://github.com/pllim","followers_url":"https://api.github.com/users/pllim/followers","following_url":"https://api.github.com/users/pllim/following{/other_user}","gists_url":"https://api.github.com/users/pllim/gists{/gist_id}","starred_url":"https://api.github.com/users/pllim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pllim/subscriptions","organizations_url":"https://api.github.com/users/pllim/orgs","repos_url":"https://api.github.com/users/pllim/repos","events_url":"https://api.github.com/users/pllim/events{/privacy}","received_events_url":"https://api.github.com/users/pllim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spacetelescope/specviz/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/spacetelescope/specviz/labels/core","name":"core","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-26T20:59:19Z","updated_at":"2016-02-29T16:46:05Z","closed_at":"2016-02-29T16:44:26Z","body":"Again, this is with Gisella's MDM data. All I did was to toggle the ROI selection for EW measurement.\r\n\r\n```python\r\nERROR:root:Traceback (most recent call last):\r\n  File \".../specviz/core/comms.py\", line 112, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \".../specviz/ui/controller.py\", line 556, in update_statistics\r\n    cent = statistics.centroid(line - avg_cont)\r\n  File \".../specviz/core/data.py\", line 202, in __sub__\r\n    new_source = self._arithmetic(self._source.subtract, other)\r\n  File \".../specviz/core/data.py\", line 164, in _arithmetic\r\n    other = self._source._from_self(other)\r\n  File \".../specviz/core/data.py\", line 76, in _from_self\r\n    dispersion_unit=self.dispersion_unit)\r\n  File \".../specviz/core/data.py\", line 52, in __init__\r\n    super(Data, self).__init__(data=data, *args, **kwargs)\r\n  File \".../astropy/nddata/nddata.py\", line 159, in __init__\r\n    raise ValueError(\"Cannot use the unit argument when data \"\r\nValueError: Cannot use the unit argument when data is a Quantity\r\n```"},"comment":{"url":"https://api.github.com/repos/spacetelescope/specviz/issues/comments/190283391","html_url":"https://github.com/spacetelescope/specviz/issues/167#issuecomment-190283391","issue_url":"https://api.github.com/repos/spacetelescope/specviz/issues/167","id":190283391,"user":{"login":"pllim","id":2090236,"avatar_url":"https://avatars.githubusercontent.com/u/2090236?v=3","gravatar_id":"","url":"https://api.github.com/users/pllim","html_url":"https://github.com/pllim","followers_url":"https://api.github.com/users/pllim/followers","following_url":"https://api.github.com/users/pllim/following{/other_user}","gists_url":"https://api.github.com/users/pllim/gists{/gist_id}","starred_url":"https://api.github.com/users/pllim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pllim/subscriptions","organizations_url":"https://api.github.com/users/pllim/orgs","repos_url":"https://api.github.com/users/pllim/repos","events_url":"https://api.github.com/users/pllim/events{/privacy}","received_events_url":"https://api.github.com/users/pllim/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T16:46:05Z","updated_at":"2016-02-29T16:46:05Z","body":"@nmearl , your fix didn't work for me, but it gave me a hint where to look. I fixed it in #172. The only explanation that makes sense is somehow my setup causes one of the functions to return scalar `Quantity`."}}