{"action":"created","comment":{"url":"https://api.github.com/repos/mantidproject/mantid/pulls/comments/42325675","id":42325675,"diff_hunk":"@@ -0,0 +1,168 @@\n+from mantid.api import PythonAlgorithm, AlgorithmFactory, WorkspaceProperty, Progress, InstrumentValidator\n+from mantid.kernel import Direction\n+import mantid.simpleapi as api\n+import numpy as np\n+from scipy import integrate\n+import scipy as sp\n+import mlzutils\n+\n+\n+class ComputeCalibrationCoefVan(PythonAlgorithm):\n+    \"\"\" Calculate coefficients to normalize by Vanadium and correct Debye Waller factor\n+    \"\"\"\n+    def __init__(self):\n+        \"\"\"\n+        Init\n+        \"\"\"\n+        PythonAlgorithm.__init__(self)\n+        self.vanaws = None\n+        self.defaultT = 293.0       # K, default temperature if not given\n+        self.Mvan = 50.942          # [g/mol], Vanadium molar mass\n+        self.DebyeT = 389.0         # K, Debye temperature for Vanadium\n+\n+    def category(self):\n+        \"\"\" Return category\n+        \"\"\"\n+        return \"PythonAlgorithms;CorrectionFunctions\\\\EfficiencyCorrections\"\n+\n+    def name(self):\n+        \"\"\" Return summary\n+        \"\"\"\n+        return \"ComputeCalibrationCoefVan\"\n+\n+    def summary(self):\n+        return \"Calculate coefficients for detector efficiency correction using the Vanadium data.\"\n+\n+    def PyInit(self):\n+        \"\"\" Declare properties\n+        \"\"\"\n+        self.declareProperty(WorkspaceProperty(\"VanadiumWorkspace\", \"\", direction=Direction.Input,\n+                                               validator=InstrumentValidator()),\n+                             \"Input Vanadium workspace\")\n+        self.declareProperty(WorkspaceProperty(\"OutputWorkspace\", \"\", direction=Direction.Output),\n+                             \"Name the workspace that will contain the calibration coefficients\")\n+        return\n+\n+    def validateInputs(self):","path":"Framework/PythonInterface/plugins/algorithms/ComputeCalibrationCoefVan.py","position":46,"original_position":46,"commit_id":"a31982f5e7157f2f00e2187c34b2e6ffdc6266f8","original_commit_id":"a31982f5e7157f2f00e2187c34b2e6ffdc6266f8","user":{"login":"OwenArnold","id":1109536,"avatar_url":"https://avatars.githubusercontent.com/u/1109536?v=3","gravatar_id":"","url":"https://api.github.com/users/OwenArnold","html_url":"https://github.com/OwenArnold","followers_url":"https://api.github.com/users/OwenArnold/followers","following_url":"https://api.github.com/users/OwenArnold/following{/other_user}","gists_url":"https://api.github.com/users/OwenArnold/gists{/gist_id}","starred_url":"https://api.github.com/users/OwenArnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OwenArnold/subscriptions","organizations_url":"https://api.github.com/users/OwenArnold/orgs","repos_url":"https://api.github.com/users/OwenArnold/repos","events_url":"https://api.github.com/users/OwenArnold/events{/privacy}","received_events_url":"https://api.github.com/users/OwenArnold/received_events","type":"User","site_admin":false},"body":"Great to see you've been using validateInputs.","created_at":"2015-10-18T20:12:32Z","updated_at":"2015-10-18T20:12:32Z","html_url":"https://github.com/mantidproject/mantid/pull/13966#discussion_r42325675","pull_request_url":"https://api.github.com/repos/mantidproject/mantid/pulls/13966","_links":{"self":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/comments/42325675"},"html":{"href":"https://github.com/mantidproject/mantid/pull/13966#discussion_r42325675"},"pull_request":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/13966"}}},"pull_request":{"url":"https://api.github.com/repos/mantidproject/mantid/pulls/13966","id":47627690,"html_url":"https://github.com/mantidproject/mantid/pull/13966","diff_url":"https://github.com/mantidproject/mantid/pull/13966.diff","patch_url":"https://github.com/mantidproject/mantid/pull/13966.patch","issue_url":"https://api.github.com/repos/mantidproject/mantid/issues/13966","number":13966,"state":"open","locked":false,"title":"Compute calibration coefficients using Vanadium","user":{"login":"mganeva","id":7290767,"avatar_url":"https://avatars.githubusercontent.com/u/7290767?v=3","gravatar_id":"","url":"https://api.github.com/users/mganeva","html_url":"https://github.com/mganeva","followers_url":"https://api.github.com/users/mganeva/followers","following_url":"https://api.github.com/users/mganeva/following{/other_user}","gists_url":"https://api.github.com/users/mganeva/gists{/gist_id}","starred_url":"https://api.github.com/users/mganeva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mganeva/subscriptions","organizations_url":"https://api.github.com/users/mganeva/orgs","repos_url":"https://api.github.com/users/mganeva/repos","events_url":"https://api.github.com/users/mganeva/events{/privacy}","received_events_url":"https://api.github.com/users/mganeva/received_events","type":"User","site_admin":false},"body":"Algorithm to compute detector sensitivity calibration coefficients using Vanadium workspace. Developed for TOFTOF@MLZ, but can be used for other instruments if needed. Can be tested on sample workspaces (created by CreateSampleWorkspace, see unittests).\r\n\r\nPlease, review the code, tests and documentation. Let me know if I should improve them.\r\n\r\nlabel: Direct inelastic","created_at":"2015-10-14T07:54:22Z","updated_at":"2015-10-18T20:12:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"978ebc3b95a21bf44b0927c7d4c2e37c0ab1986d","assignee":null,"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":559,"closed_issues":176,"state":"open","created_at":"2015-05-12T15:36:23Z","updated_at":"2015-10-17T21:10:07Z","due_on":"2016-01-30T05:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mantidproject/mantid/pulls/13966/commits","review_comments_url":"https://api.github.com/repos/mantidproject/mantid/pulls/13966/comments","review_comment_url":"https://api.github.com/repos/mantidproject/mantid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mantidproject/mantid/issues/13966/comments","statuses_url":"https://api.github.com/repos/mantidproject/mantid/statuses/a31982f5e7157f2f00e2187c34b2e6ffdc6266f8","head":{"label":"mganeva:feature/compute_calibration_coef_van","ref":"feature/compute_calibration_coef_van","sha":"a31982f5e7157f2f00e2187c34b2e6ffdc6266f8","user":{"login":"mganeva","id":7290767,"avatar_url":"https://avatars.githubusercontent.com/u/7290767?v=3","gravatar_id":"","url":"https://api.github.com/users/mganeva","html_url":"https://github.com/mganeva","followers_url":"https://api.github.com/users/mganeva/followers","following_url":"https://api.github.com/users/mganeva/following{/other_user}","gists_url":"https://api.github.com/users/mganeva/gists{/gist_id}","starred_url":"https://api.github.com/users/mganeva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mganeva/subscriptions","organizations_url":"https://api.github.com/users/mganeva/orgs","repos_url":"https://api.github.com/users/mganeva/repos","events_url":"https://api.github.com/users/mganeva/events{/privacy}","received_events_url":"https://api.github.com/users/mganeva/received_events","type":"User","site_admin":false},"repo":{"id":18762481,"name":"mantid","full_name":"mganeva/mantid","owner":{"login":"mganeva","id":7290767,"avatar_url":"https://avatars.githubusercontent.com/u/7290767?v=3","gravatar_id":"","url":"https://api.github.com/users/mganeva","html_url":"https://github.com/mganeva","followers_url":"https://api.github.com/users/mganeva/followers","following_url":"https://api.github.com/users/mganeva/following{/other_user}","gists_url":"https://api.github.com/users/mganeva/gists{/gist_id}","starred_url":"https://api.github.com/users/mganeva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mganeva/subscriptions","organizations_url":"https://api.github.com/users/mganeva/orgs","repos_url":"https://api.github.com/users/mganeva/repos","events_url":"https://api.github.com/users/mganeva/events{/privacy}","received_events_url":"https://api.github.com/users/mganeva/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mganeva/mantid","description":"Main repository for Mantid code","fork":true,"url":"https://api.github.com/repos/mganeva/mantid","forks_url":"https://api.github.com/repos/mganeva/mantid/forks","keys_url":"https://api.github.com/repos/mganeva/mantid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mganeva/mantid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mganeva/mantid/teams","hooks_url":"https://api.github.com/repos/mganeva/mantid/hooks","issue_events_url":"https://api.github.com/repos/mganeva/mantid/issues/events{/number}","events_url":"https://api.github.com/repos/mganeva/mantid/events","assignees_url":"https://api.github.com/repos/mganeva/mantid/assignees{/user}","branches_url":"https://api.github.com/repos/mganeva/mantid/branches{/branch}","tags_url":"https://api.github.com/repos/mganeva/mantid/tags","blobs_url":"https://api.github.com/repos/mganeva/mantid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mganeva/mantid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mganeva/mantid/git/refs{/sha}","trees_url":"https://api.github.com/repos/mganeva/mantid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mganeva/mantid/statuses/{sha}","languages_url":"https://api.github.com/repos/mganeva/mantid/languages","stargazers_url":"https://api.github.com/repos/mganeva/mantid/stargazers","contributors_url":"https://api.github.com/repos/mganeva/mantid/contributors","subscribers_url":"https://api.github.com/repos/mganeva/mantid/subscribers","subscription_url":"https://api.github.com/repos/mganeva/mantid/subscription","commits_url":"https://api.github.com/repos/mganeva/mantid/commits{/sha}","git_commits_url":"https://api.github.com/repos/mganeva/mantid/git/commits{/sha}","comments_url":"https://api.github.com/repos/mganeva/mantid/comments{/number}","issue_comment_url":"https://api.github.com/repos/mganeva/mantid/issues/comments{/number}","contents_url":"https://api.github.com/repos/mganeva/mantid/contents/{+path}","compare_url":"https://api.github.com/repos/mganeva/mantid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mganeva/mantid/merges","archive_url":"https://api.github.com/repos/mganeva/mantid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mganeva/mantid/downloads","issues_url":"https://api.github.com/repos/mganeva/mantid/issues{/number}","pulls_url":"https://api.github.com/repos/mganeva/mantid/pulls{/number}","milestones_url":"https://api.github.com/repos/mganeva/mantid/milestones{/number}","notifications_url":"https://api.github.com/repos/mganeva/mantid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mganeva/mantid/labels{/name}","releases_url":"https://api.github.com/repos/mganeva/mantid/releases{/id}","created_at":"2014-04-14T13:56:33Z","updated_at":"2015-04-27T08:07:21Z","pushed_at":"2015-10-14T15:12:36Z","git_url":"git://github.com/mganeva/mantid.git","ssh_url":"git@github.com:mganeva/mantid.git","clone_url":"https://github.com/mganeva/mantid.git","svn_url":"https://github.com/mganeva/mantid","homepage":"www.mantidproject.org","size":314873,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mantidproject:master","ref":"master","sha":"6bd6cc0e8779f38c080c75023f99ed7e04bc32fa","user":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"repo":{"id":2594116,"name":"mantid","full_name":"mantidproject/mantid","owner":{"login":"mantidproject","id":671496,"avatar_url":"https://avatars.githubusercontent.com/u/671496?v=3","gravatar_id":"","url":"https://api.github.com/users/mantidproject","html_url":"https://github.com/mantidproject","followers_url":"https://api.github.com/users/mantidproject/followers","following_url":"https://api.github.com/users/mantidproject/following{/other_user}","gists_url":"https://api.github.com/users/mantidproject/gists{/gist_id}","starred_url":"https://api.github.com/users/mantidproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantidproject/subscriptions","organizations_url":"https://api.github.com/users/mantidproject/orgs","repos_url":"https://api.github.com/users/mantidproject/repos","events_url":"https://api.github.com/users/mantidproject/events{/privacy}","received_events_url":"https://api.github.com/users/mantidproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mantidproject/mantid","description":"Main repository for Mantid code","fork":false,"url":"https://api.github.com/repos/mantidproject/mantid","forks_url":"https://api.github.com/repos/mantidproject/mantid/forks","keys_url":"https://api.github.com/repos/mantidproject/mantid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mantidproject/mantid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mantidproject/mantid/teams","hooks_url":"https://api.github.com/repos/mantidproject/mantid/hooks","issue_events_url":"https://api.github.com/repos/mantidproject/mantid/issues/events{/number}","events_url":"https://api.github.com/repos/mantidproject/mantid/events","assignees_url":"https://api.github.com/repos/mantidproject/mantid/assignees{/user}","branches_url":"https://api.github.com/repos/mantidproject/mantid/branches{/branch}","tags_url":"https://api.github.com/repos/mantidproject/mantid/tags","blobs_url":"https://api.github.com/repos/mantidproject/mantid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mantidproject/mantid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mantidproject/mantid/git/refs{/sha}","trees_url":"https://api.github.com/repos/mantidproject/mantid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mantidproject/mantid/statuses/{sha}","languages_url":"https://api.github.com/repos/mantidproject/mantid/languages","stargazers_url":"https://api.github.com/repos/mantidproject/mantid/stargazers","contributors_url":"https://api.github.com/repos/mantidproject/mantid/contributors","subscribers_url":"https://api.github.com/repos/mantidproject/mantid/subscribers","subscription_url":"https://api.github.com/repos/mantidproject/mantid/subscription","commits_url":"https://api.github.com/repos/mantidproject/mantid/commits{/sha}","git_commits_url":"https://api.github.com/repos/mantidproject/mantid/git/commits{/sha}","comments_url":"https://api.github.com/repos/mantidproject/mantid/comments{/number}","issue_comment_url":"https://api.github.com/repos/mantidproject/mantid/issues/comments{/number}","contents_url":"https://api.github.com/repos/mantidproject/mantid/contents/{+path}","compare_url":"https://api.github.com/repos/mantidproject/mantid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mantidproject/mantid/merges","archive_url":"https://api.github.com/repos/mantidproject/mantid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mantidproject/mantid/downloads","issues_url":"https://api.github.com/repos/mantidproject/mantid/issues{/number}","pulls_url":"https://api.github.com/repos/mantidproject/mantid/pulls{/number}","milestones_url":"https://api.github.com/repos/mantidproject/mantid/milestones{/number}","notifications_url":"https://api.github.com/repos/mantidproject/mantid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mantidproject/mantid/labels{/name}","releases_url":"https://api.github.com/repos/mantidproject/mantid/releases{/id}","created_at":"2011-10-17T19:07:38Z","updated_at":"2015-09-23T16:54:17Z","pushed_at":"2015-10-18T17:35:42Z","git_url":"git://github.com/mantidproject/mantid.git","ssh_url":"git@github.com:mantidproject/mantid.git","clone_url":"https://github.com/mantidproject/mantid.git","svn_url":"https://github.com/mantidproject/mantid","homepage":"www.mantidproject.org","size":545110,"stargazers_count":31,"watchers_count":31,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":1559,"forks":21,"open_issues":1559,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/13966"},"html":{"href":"https://github.com/mantidproject/mantid/pull/13966"},"issue":{"href":"https://api.github.com/repos/mantidproject/mantid/issues/13966"},"comments":{"href":"https://api.github.com/repos/mantidproject/mantid/issues/13966/comments"},"review_comments":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/13966/comments"},"review_comment":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mantidproject/mantid/pulls/13966/commits"},"statuses":{"href":"https://api.github.com/repos/mantidproject/mantid/statuses/a31982f5e7157f2f00e2187c34b2e6ffdc6266f8"}}}}