{"action":"created","issue":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/19247","repository_url":"https://api.github.com/repos/mantidproject/mantid","labels_url":"https://api.github.com/repos/mantidproject/mantid/issues/19247/labels{/name}","comments_url":"https://api.github.com/repos/mantidproject/mantid/issues/19247/comments","events_url":"https://api.github.com/repos/mantidproject/mantid/issues/19247/events","html_url":"https://github.com/mantidproject/mantid/pull/19247","id":216784406,"number":19247,"title":"Fix WorkspaceCreation::create(const P &parent) for parent workspaces with varying bins","user":{"login":"soininen","id":19147159,"avatar_url":"https://avatars0.githubusercontent.com/u/19147159?v=3","gravatar_id":"","url":"https://api.github.com/users/soininen","html_url":"https://github.com/soininen","followers_url":"https://api.github.com/users/soininen/followers","following_url":"https://api.github.com/users/soininen/following{/other_user}","gists_url":"https://api.github.com/users/soininen/gists{/gist_id}","starred_url":"https://api.github.com/users/soininen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soininen/subscriptions","organizations_url":"https://api.github.com/users/soininen/orgs","repos_url":"https://api.github.com/users/soininen/repos","events_url":"https://api.github.com/users/soininen/events{/privacy}","received_events_url":"https://api.github.com/users/soininen/received_events","type":"User","site_admin":false},"labels":[{"id":177607615,"url":"https://api.github.com/repos/mantidproject/mantid/labels/Component:%20Framework","name":"Component: Framework","color":"009800","default":false},{"id":40046083,"url":"https://api.github.com/repos/mantidproject/mantid/labels/Misc:%20Bug","name":"Misc: Bug","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"SimonHeybrock","id":12912489,"avatar_url":"https://avatars2.githubusercontent.com/u/12912489?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonHeybrock","html_url":"https://github.com/SimonHeybrock","followers_url":"https://api.github.com/users/SimonHeybrock/followers","following_url":"https://api.github.com/users/SimonHeybrock/following{/other_user}","gists_url":"https://api.github.com/users/SimonHeybrock/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonHeybrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonHeybrock/subscriptions","organizations_url":"https://api.github.com/users/SimonHeybrock/orgs","repos_url":"https://api.github.com/users/SimonHeybrock/repos","events_url":"https://api.github.com/users/SimonHeybrock/events{/privacy}","received_events_url":"https://api.github.com/users/SimonHeybrock/received_events","type":"User","site_admin":false},"assignees":[{"login":"SimonHeybrock","id":12912489,"avatar_url":"https://avatars2.githubusercontent.com/u/12912489?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonHeybrock","html_url":"https://github.com/SimonHeybrock","followers_url":"https://api.github.com/users/SimonHeybrock/followers","following_url":"https://api.github.com/users/SimonHeybrock/following{/other_user}","gists_url":"https://api.github.com/users/SimonHeybrock/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonHeybrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonHeybrock/subscriptions","organizations_url":"https://api.github.com/users/SimonHeybrock/orgs","repos_url":"https://api.github.com/users/SimonHeybrock/repos","events_url":"https://api.github.com/users/SimonHeybrock/events{/privacy}","received_events_url":"https://api.github.com/users/SimonHeybrock/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mantidproject/mantid/milestones/61","html_url":"https://github.com/mantidproject/mantid/milestone/61","labels_url":"https://api.github.com/repos/mantidproject/mantid/milestones/61/labels","id":2064897,"number":61,"title":"Release 3.10","description":"","creator":{"login":"NickDraper","id":1017173,"avatar_url":"https://avatars2.githubusercontent.com/u/1017173?v=3","gravatar_id":"","url":"https://api.github.com/users/NickDraper","html_url":"https://github.com/NickDraper","followers_url":"https://api.github.com/users/NickDraper/followers","following_url":"https://api.github.com/users/NickDraper/following{/other_user}","gists_url":"https://api.github.com/users/NickDraper/gists{/gist_id}","starred_url":"https://api.github.com/users/NickDraper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickDraper/subscriptions","organizations_url":"https://api.github.com/users/NickDraper/orgs","repos_url":"https://api.github.com/users/NickDraper/repos","events_url":"https://api.github.com/users/NickDraper/events{/privacy}","received_events_url":"https://api.github.com/users/NickDraper/received_events","type":"User","site_admin":false},"open_issues":255,"closed_issues":424,"state":"open","created_at":"2016-10-12T13:14:59Z","updated_at":"2017-03-30T10:15:43Z","due_on":"2017-06-12T07:00:00Z","closed_at":null},"comments":3,"created_at":"2017-03-24T13:24:58Z","updated_at":"2017-03-30T10:41:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mantidproject/mantid/pulls/19247","html_url":"https://github.com/mantidproject/mantid/pull/19247","diff_url":"https://github.com/mantidproject/mantid/pull/19247.diff","patch_url":"https://github.com/mantidproject/mantid/pull/19247.patch"},"body":"`WorkspaceCreation::create(const P &parent)` always copied the X data of the first histogram in the parent workspace to the created one. This would lead to incorrect binning in the created workspace if the parent had varying bins.\r\n\r\n**To test:**\r\n\r\nThe symptoms can be seen e.g. when using the [MonteCarloAbsorption](http://docs.mantidproject.org/nightly/algorithms/MonteCarloAbsorption-v1.html) algorithm. In the following script, change the `buildDir` variable to point to Mantid's build dir and run.\r\n```python\r\nbuildDir = <path-to-Mantid-build-directory>\r\nws = Load(Filename=buildDir + 'ExternalData/Testing/Data/UnitTest/ILL/IN4/084446.nxs')\r\nws = ConvertUnits(ws, Target='Wavelength', EMode='Direct')\r\ngeometry = {\r\n    'Shape': 'Cylinder',\r\n    'Height': 10.0,\r\n    'Radius': 0.5,\r\n    'Center': [0.0, 0.0, 0.0]\r\n}\r\nmaterial = {\r\n    'ChemicalFormula': 'O2',\r\n    'SampleMassDensity': 1\r\n}\r\nSetSample(ws, Geometry=geometry, Material=material)\r\ncorrections = MonteCarloAbsorption(ws, \r\n    NumberOfWavelengthPoints=2, \r\n    EventsPerPoint=1)\r\n```\r\nAfter the unit conversion `ws` has varying bins for workspace indices > 300. Binning should be the same for `corrections` after this PR has been applied.\r\n\r\nFixes #19242.\r\n\r\n*Release notes were updated accordingly.*\r\n\r\n---\r\n\r\n#### Reviewer ####\r\n\r\nPlease comment on the following ([full description](http://www.mantidproject.org/Individual_Ticket_Testing)):\r\n\r\n##### Code Review #####\r\n\r\n- [ ] Is the code of an acceptable quality?\r\n- [ ] Does the code conform to the [coding standards](http://www.mantidproject.org/Coding_Standards)? Is it well structured with small focussed classes/methods/functions?\r\n- [ ] Are there unit/system tests in place? Are the unit tests small and test the a class in isolation?\r\n- [ ] If there are changes in the release notes then do they describe the changes appropriately?\r\n\r\n##### Functional Tests #####\r\n\r\n- [ ] Do changes function as described? Add comments below that describe the tests performed?\r\n- [ ] How do the changes handle unexpected situations, e.g. bad input?\r\n- [ ] Has the relevant documentation been added/updated?\r\n- [ ] Is user-facing documentation written in a user-friendly manner?\r\n- [ ] Has developer documentation been updated if required?\r\n\r\n- Does everything look good? Comment with the ship it emoji but don't merge. A member of `@mantidproject/gatekeepers` will take care of it.\r\n"},"comment":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/comments/290373706","html_url":"https://github.com/mantidproject/mantid/pull/19247#issuecomment-290373706","issue_url":"https://api.github.com/repos/mantidproject/mantid/issues/19247","id":290373706,"user":{"login":"SimonHeybrock","id":12912489,"avatar_url":"https://avatars2.githubusercontent.com/u/12912489?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonHeybrock","html_url":"https://github.com/SimonHeybrock","followers_url":"https://api.github.com/users/SimonHeybrock/followers","following_url":"https://api.github.com/users/SimonHeybrock/following{/other_user}","gists_url":"https://api.github.com/users/SimonHeybrock/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonHeybrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonHeybrock/subscriptions","organizations_url":"https://api.github.com/users/SimonHeybrock/orgs","repos_url":"https://api.github.com/users/SimonHeybrock/repos","events_url":"https://api.github.com/users/SimonHeybrock/events{/privacy}","received_events_url":"https://api.github.com/users/SimonHeybrock/received_events","type":"User","site_admin":false},"created_at":"2017-03-30T10:41:04Z","updated_at":"2017-03-30T10:41:04Z","body":"Latest changes look good. Overall I think this is a nice improvement of these factory methods :+1: \r\n:shipit: once builds pass."}}
{"actor":{"display_login":"SimonHeybrock"}}