{"action":"created","issue":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/14841","labels_url":"https://api.github.com/repos/mantidproject/mantid/issues/14841/labels{/name}","comments_url":"https://api.github.com/repos/mantidproject/mantid/issues/14841/comments","events_url":"https://api.github.com/repos/mantidproject/mantid/issues/14841/events","html_url":"https://github.com/mantidproject/mantid/pull/14841","id":123455902,"number":14841,"title":"Fix spectra numbering when loading processed file with numeric axis","user":{"login":"martyngigg","id":733773,"avatar_url":"https://avatars.githubusercontent.com/u/733773?v=3","gravatar_id":"","url":"https://api.github.com/users/martyngigg","html_url":"https://github.com/martyngigg","followers_url":"https://api.github.com/users/martyngigg/followers","following_url":"https://api.github.com/users/martyngigg/following{/other_user}","gists_url":"https://api.github.com/users/martyngigg/gists{/gist_id}","starred_url":"https://api.github.com/users/martyngigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martyngigg/subscriptions","organizations_url":"https://api.github.com/users/martyngigg/orgs","repos_url":"https://api.github.com/users/martyngigg/repos","events_url":"https://api.github.com/users/martyngigg/events{/privacy}","received_events_url":"https://api.github.com/users/martyngigg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mantidproject/mantid/labels/Misc:%20Bugfix","name":"Misc: Bugfix","color":"d4c5f9"},{"url":"https://api.github.com/repos/mantidproject/mantid/labels/Priority:%20High","name":"Priority: High","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"login":"tom-perkins","id":15363125,"avatar_url":"https://avatars.githubusercontent.com/u/15363125?v=3","gravatar_id":"","url":"https://api.github.com/users/tom-perkins","html_url":"https://github.com/tom-perkins","followers_url":"https://api.github.com/users/tom-perkins/followers","following_url":"https://api.github.com/users/tom-perkins/following{/other_user}","gists_url":"https://api.github.com/users/tom-perkins/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-perkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-perkins/subscriptions","organizations_url":"https://api.github.com/users/tom-perkins/orgs","repos_url":"https://api.github.com/users/tom-perkins/repos","events_url":"https://api.github.com/users/tom-perkins/events{/privacy}","received_events_url":"https://api.github.com/users/tom-perkins/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mantidproject/mantid/milestones/4","html_url":"https://github.com/mantidproject/mantid/milestones/Release%203.6","labels_url":"https://api.github.com/repos/mantidproject/mantid/milestones/4/labels","id":1106937,"number":4,"title":"Release 3.6","description":"","creator":{"login":"peterfpeterson","id":404003,"avatar_url":"https://avatars.githubusercontent.com/u/404003?v=3","gravatar_id":"","url":"https://api.github.com/users/peterfpeterson","html_url":"https://github.com/peterfpeterson","followers_url":"https://api.github.com/users/peterfpeterson/followers","following_url":"https://api.github.com/users/peterfpeterson/following{/other_user}","gists_url":"https://api.github.com/users/peterfpeterson/gists{/gist_id}","starred_url":"https://api.github.com/users/peterfpeterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterfpeterson/subscriptions","organizations_url":"https://api.github.com/users/peterfpeterson/orgs","repos_url":"https://api.github.com/users/peterfpeterson/repos","events_url":"https://api.github.com/users/peterfpeterson/events{/privacy}","received_events_url":"https://api.github.com/users/peterfpeterson/received_events","type":"User","site_admin":false},"open_issues":602,"closed_issues":894,"state":"open","created_at":"2015-05-12T15:36:23Z","updated_at":"2015-12-23T09:41:34Z","due_on":"2016-01-30T05:00:00Z","closed_at":null},"comments":1,"created_at":"2015-12-22T10:35:16Z","updated_at":"2015-12-23T09:41:40Z","closed_at":"2015-12-23T09:41:34Z","pull_request":{"url":"https://api.github.com/repos/mantidproject/mantid/pulls/14841","html_url":"https://github.com/mantidproject/mantid/pull/14841","diff_url":"https://github.com/mantidproject/mantid/pull/14841.diff","patch_url":"https://github.com/mantidproject/mantid/pull/14841.patch"},"body":"Fixes #14838 \r\n\r\n**Tester**\r\nStart with the following script, it should pass now:\r\n```python\r\nimport numpy\r\n\r\n# create a 2D workspace with a user Y axis\r\nheight=20\r\nwidth=20\r\nscale=0.1\r\nimage=numpy.random.normal(loc=0.0,scale=1.0,size=[width,height])\r\nws=WorkspaceFactory.create(\"Workspace2D\",NVectors=height,XLength=width+1,YLength=width)\r\nws.setDistribution(True) # always polarisation or similar normalised value, not raw or simulated counts\r\nxaxdat=numpy.linspace(0.0,width*scale,width+1)\r\nyaxdat=numpy.linspace(0.0,(height-1)*scale,height)\r\nfor i in range(height):\r\n    ws.dataX(i)[:]=xaxdat\r\n    ws.dataY(i)[:]=image[:,height-1-i]\r\n    spec = ws.getSpectrum(i)\r\n    print spec.getSpectrumNo()\r\n\r\nna = NumericAxis.create(height)\r\nfor i in range(height):\r\n        na.setValue(i,yaxdat[i])\r\nlbl=na.setUnit(\"Label\")\r\nlbl.setLabel(\"height\",\"cm\")\r\nws.replaceAxis(1,na)\r\nlbl=ws.getAxis(0).setUnit(\"Label\")\r\nlbl.setLabel(\"width\",\"cm\")\r\nws.setYUnitLabel(\"brightness\")\r\n\r\nAnalysisDataService.addOrReplace(\"ws\",ws)\r\n\r\n# test it\r\n# this works\r\nCloneWorkspace(InputWorkspace=\"ws\",OutputWorkspace=\"ClonedWS\")\r\nprint CheckWorkspacesMatch(Workspace1=\"ws\",Workspace2=\"ClonedWS\")\r\n\r\n# but this doesn't. Why?\r\nff=\"foo.nxs\" # somewhere writable\r\nSaveNexus(InputWorkspace=\"ws\",Filename=ff)\r\nLoadNexus(Filename=ff,OutputWorkspace=\"CopyOfWS\")\r\nprint CheckWorkspacesMatch(Workspace1=\"ws\",Workspace2=\"CopyOfWS\")\r\n```\r\n\r\n[Release notes](http://www.mantidproject.org/ReleaseNotes_3_6_Framework_Changes#Improved) have been updated.\r\n"},"comment":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/comments/166847489","html_url":"https://github.com/mantidproject/mantid/pull/14841#issuecomment-166847489","issue_url":"https://api.github.com/repos/mantidproject/mantid/issues/14841","id":166847489,"user":{"login":"tom-perkins","id":15363125,"avatar_url":"https://avatars.githubusercontent.com/u/15363125?v=3","gravatar_id":"","url":"https://api.github.com/users/tom-perkins","html_url":"https://github.com/tom-perkins","followers_url":"https://api.github.com/users/tom-perkins/followers","following_url":"https://api.github.com/users/tom-perkins/following{/other_user}","gists_url":"https://api.github.com/users/tom-perkins/gists{/gist_id}","starred_url":"https://api.github.com/users/tom-perkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tom-perkins/subscriptions","organizations_url":"https://api.github.com/users/tom-perkins/orgs","repos_url":"https://api.github.com/users/tom-perkins/repos","events_url":"https://api.github.com/users/tom-perkins/events{/privacy}","received_events_url":"https://api.github.com/users/tom-perkins/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T09:41:39Z","updated_at":"2015-12-23T09:41:39Z","body":"Tested as above, verified fix works and test passed. Fixed broken links in release notes. "}}