{"action":"created","comment":{"url":"https://api.github.com/repos/nipy/dipy/pulls/comments/68962382","id":68962382,"diff_hunk":"@@ -0,0 +1,193 @@\n+\"\"\"\n+============================================================\n+Intravoxel incoherent motion\n+============================================================\n+The intravoxel incoherent motion (IVIM) model describes diffusion\n+and perfusion in the signal acquired with diffusion. The IVIM model\n+can be understood as an adaptation of Stejskals and Tanners work (ref)\n+on biologic tissue, and was proposed by Le Bihan et al (ref).\n+The hypothesis is that two compartments exist: a slow moving compartment,\n+where particles diffuse in a Brownian fashion as a consequence of thermal\n+energy, and a fast moving compartment (the vascular compartment), where\n+blood moves as a consequence of pressure gradient. In this second\n+compartment, a pseudo diffusion term (D* ) is introduced that describes\n+on a macroscopic level the displacement of the blood elements in an\n+assumed randomly laid vascular network. For the perfusion to have a\n+physiologic meaning, one expects that D* is greater than D.\n+\n+The IVIM model expresses the diffusion signal as follows:\n+\n+ .. math: :\n+\n+    S(b) = S_{0}[fe ^ {-b*D_star} + (1 - f)e^{-b*D}]\n+\n+where $\\mathbf{b}$ is the gradient value (which is dependent on\n+the measurement parameters), $S_0$ is the signal in the absence\n+of diffusion gradient sensitization, $\\mathbf{f}$ is the perfusion\n+fraction, $\\mathbf{D}$ is the diffusion coefficient,\n+ $\\mathbf{D * }$ is the pseudo diffusion constant.\n+\n+In the following example we show how to fit the IVIM model\n+on diffusion  weighted dataset and visualize the perfusion\n+and diffusion. First, we import all relevant modules:\n+\"\"\"\n+\n+import numpy as np\n+from scipy.optimize import leastsq\n+import matplotlib.pyplot as plt\n+\n+from dipy.reconst.ivim import IvimModel, _ivim_error, ivim_function\n+from dipy.data.fetcher import read_ivim\n+\n+\"\"\"\n+We get an IVIM dataset using dipy's data fetcher read_ivim.","path":"doc/examples/reconst_ivim.py","position":43,"original_position":43,"commit_id":"2c8f2448ce15ebe490e03ae795127632ebde45bf","original_commit_id":"2c8f2448ce15ebe490e03ae795127632ebde45bf","user":{"login":"arokem","id":118582,"avatar_url":"https://avatars.githubusercontent.com/u/118582?v=3","gravatar_id":"","url":"https://api.github.com/users/arokem","html_url":"https://github.com/arokem","followers_url":"https://api.github.com/users/arokem/followers","following_url":"https://api.github.com/users/arokem/following{/other_user}","gists_url":"https://api.github.com/users/arokem/gists{/gist_id}","starred_url":"https://api.github.com/users/arokem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arokem/subscriptions","organizations_url":"https://api.github.com/users/arokem/orgs","repos_url":"https://api.github.com/users/arokem/repos","events_url":"https://api.github.com/users/arokem/events{/privacy}","received_events_url":"https://api.github.com/users/arokem/received_events","type":"User","site_admin":false},"body":"=> \"Dipy's\" (capitalization)","created_at":"2016-06-29T15:01:29Z","updated_at":"2016-06-29T15:01:29Z","html_url":"https://github.com/nipy/dipy/pull/1058#discussion_r68962382","pull_request_url":"https://api.github.com/repos/nipy/dipy/pulls/1058","_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments/68962382"},"html":{"href":"https://github.com/nipy/dipy/pull/1058#discussion_r68962382"},"pull_request":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1058"}}},"pull_request":{"url":"https://api.github.com/repos/nipy/dipy/pulls/1058","id":71407833,"html_url":"https://github.com/nipy/dipy/pull/1058","diff_url":"https://github.com/nipy/dipy/pull/1058.diff","patch_url":"https://github.com/nipy/dipy/pull/1058.patch","issue_url":"https://api.github.com/repos/nipy/dipy/issues/1058","number":1058,"state":"open","locked":false,"title":"WIP : Initial ivim simulations and tests","user":{"login":"sahmed95","id":6968324,"avatar_url":"https://avatars.githubusercontent.com/u/6968324?v=3","gravatar_id":"","url":"https://api.github.com/users/sahmed95","html_url":"https://github.com/sahmed95","followers_url":"https://api.github.com/users/sahmed95/followers","following_url":"https://api.github.com/users/sahmed95/following{/other_user}","gists_url":"https://api.github.com/users/sahmed95/gists{/gist_id}","starred_url":"https://api.github.com/users/sahmed95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahmed95/subscriptions","organizations_url":"https://api.github.com/users/sahmed95/orgs","repos_url":"https://api.github.com/users/sahmed95/repos","events_url":"https://api.github.com/users/sahmed95/events{/privacy}","received_events_url":"https://api.github.com/users/sahmed95/received_events","type":"User","site_admin":false},"body":"Initial simulations of IVIM\r\n\r\nNotebook with examples\r\nhttps://github.com/sahmed95/notebooks/blob/ivim/ivim_dev.ipynb","created_at":"2016-05-25T15:02:43Z","updated_at":"2016-06-29T15:01:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26e8d758de709f7a4f6cd4e754ff5206c0b42bc0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nipy/dipy/pulls/1058/commits","review_comments_url":"https://api.github.com/repos/nipy/dipy/pulls/1058/comments","review_comment_url":"https://api.github.com/repos/nipy/dipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nipy/dipy/issues/1058/comments","statuses_url":"https://api.github.com/repos/nipy/dipy/statuses/2c8f2448ce15ebe490e03ae795127632ebde45bf","head":{"label":"sahmed95:ivim_dev","ref":"ivim_dev","sha":"2c8f2448ce15ebe490e03ae795127632ebde45bf","user":{"login":"sahmed95","id":6968324,"avatar_url":"https://avatars.githubusercontent.com/u/6968324?v=3","gravatar_id":"","url":"https://api.github.com/users/sahmed95","html_url":"https://github.com/sahmed95","followers_url":"https://api.github.com/users/sahmed95/followers","following_url":"https://api.github.com/users/sahmed95/following{/other_user}","gists_url":"https://api.github.com/users/sahmed95/gists{/gist_id}","starred_url":"https://api.github.com/users/sahmed95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahmed95/subscriptions","organizations_url":"https://api.github.com/users/sahmed95/orgs","repos_url":"https://api.github.com/users/sahmed95/repos","events_url":"https://api.github.com/users/sahmed95/events{/privacy}","received_events_url":"https://api.github.com/users/sahmed95/received_events","type":"User","site_admin":false},"repo":{"id":54065661,"name":"dipy","full_name":"sahmed95/dipy","owner":{"login":"sahmed95","id":6968324,"avatar_url":"https://avatars.githubusercontent.com/u/6968324?v=3","gravatar_id":"","url":"https://api.github.com/users/sahmed95","html_url":"https://github.com/sahmed95","followers_url":"https://api.github.com/users/sahmed95/followers","following_url":"https://api.github.com/users/sahmed95/following{/other_user}","gists_url":"https://api.github.com/users/sahmed95/gists{/gist_id}","starred_url":"https://api.github.com/users/sahmed95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahmed95/subscriptions","organizations_url":"https://api.github.com/users/sahmed95/orgs","repos_url":"https://api.github.com/users/sahmed95/repos","events_url":"https://api.github.com/users/sahmed95/events{/privacy}","received_events_url":"https://api.github.com/users/sahmed95/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sahmed95/dipy","description":"Diffusion MR Imaging in Python","fork":true,"url":"https://api.github.com/repos/sahmed95/dipy","forks_url":"https://api.github.com/repos/sahmed95/dipy/forks","keys_url":"https://api.github.com/repos/sahmed95/dipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sahmed95/dipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sahmed95/dipy/teams","hooks_url":"https://api.github.com/repos/sahmed95/dipy/hooks","issue_events_url":"https://api.github.com/repos/sahmed95/dipy/issues/events{/number}","events_url":"https://api.github.com/repos/sahmed95/dipy/events","assignees_url":"https://api.github.com/repos/sahmed95/dipy/assignees{/user}","branches_url":"https://api.github.com/repos/sahmed95/dipy/branches{/branch}","tags_url":"https://api.github.com/repos/sahmed95/dipy/tags","blobs_url":"https://api.github.com/repos/sahmed95/dipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sahmed95/dipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sahmed95/dipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sahmed95/dipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sahmed95/dipy/statuses/{sha}","languages_url":"https://api.github.com/repos/sahmed95/dipy/languages","stargazers_url":"https://api.github.com/repos/sahmed95/dipy/stargazers","contributors_url":"https://api.github.com/repos/sahmed95/dipy/contributors","subscribers_url":"https://api.github.com/repos/sahmed95/dipy/subscribers","subscription_url":"https://api.github.com/repos/sahmed95/dipy/subscription","commits_url":"https://api.github.com/repos/sahmed95/dipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sahmed95/dipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sahmed95/dipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sahmed95/dipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sahmed95/dipy/contents/{+path}","compare_url":"https://api.github.com/repos/sahmed95/dipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sahmed95/dipy/merges","archive_url":"https://api.github.com/repos/sahmed95/dipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sahmed95/dipy/downloads","issues_url":"https://api.github.com/repos/sahmed95/dipy/issues{/number}","pulls_url":"https://api.github.com/repos/sahmed95/dipy/pulls{/number}","milestones_url":"https://api.github.com/repos/sahmed95/dipy/milestones{/number}","notifications_url":"https://api.github.com/repos/sahmed95/dipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sahmed95/dipy/labels{/name}","releases_url":"https://api.github.com/repos/sahmed95/dipy/releases{/id}","deployments_url":"https://api.github.com/repos/sahmed95/dipy/deployments","created_at":"2016-03-16T20:52:31Z","updated_at":"2016-03-16T20:52:32Z","pushed_at":"2016-06-29T14:54:10Z","git_url":"git://github.com/sahmed95/dipy.git","ssh_url":"git@github.com:sahmed95/dipy.git","clone_url":"https://github.com/sahmed95/dipy.git","svn_url":"https://github.com/sahmed95/dipy","homepage":"http://dipy.org","size":31157,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"nipy:master","ref":"master","sha":"3d1712057a07e9f986d0b4dc6eb07e6162fee4cf","user":{"login":"nipy","id":233707,"avatar_url":"https://avatars.githubusercontent.com/u/233707?v=3","gravatar_id":"","url":"https://api.github.com/users/nipy","html_url":"https://github.com/nipy","followers_url":"https://api.github.com/users/nipy/followers","following_url":"https://api.github.com/users/nipy/following{/other_user}","gists_url":"https://api.github.com/users/nipy/gists{/gist_id}","starred_url":"https://api.github.com/users/nipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipy/subscriptions","organizations_url":"https://api.github.com/users/nipy/orgs","repos_url":"https://api.github.com/users/nipy/repos","events_url":"https://api.github.com/users/nipy/events{/privacy}","received_events_url":"https://api.github.com/users/nipy/received_events","type":"Organization","site_admin":false},"repo":{"id":505209,"name":"dipy","full_name":"nipy/dipy","owner":{"login":"nipy","id":233707,"avatar_url":"https://avatars.githubusercontent.com/u/233707?v=3","gravatar_id":"","url":"https://api.github.com/users/nipy","html_url":"https://github.com/nipy","followers_url":"https://api.github.com/users/nipy/followers","following_url":"https://api.github.com/users/nipy/following{/other_user}","gists_url":"https://api.github.com/users/nipy/gists{/gist_id}","starred_url":"https://api.github.com/users/nipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipy/subscriptions","organizations_url":"https://api.github.com/users/nipy/orgs","repos_url":"https://api.github.com/users/nipy/repos","events_url":"https://api.github.com/users/nipy/events{/privacy}","received_events_url":"https://api.github.com/users/nipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nipy/dipy","description":"Diffusion MR Imaging in Python","fork":false,"url":"https://api.github.com/repos/nipy/dipy","forks_url":"https://api.github.com/repos/nipy/dipy/forks","keys_url":"https://api.github.com/repos/nipy/dipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nipy/dipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nipy/dipy/teams","hooks_url":"https://api.github.com/repos/nipy/dipy/hooks","issue_events_url":"https://api.github.com/repos/nipy/dipy/issues/events{/number}","events_url":"https://api.github.com/repos/nipy/dipy/events","assignees_url":"https://api.github.com/repos/nipy/dipy/assignees{/user}","branches_url":"https://api.github.com/repos/nipy/dipy/branches{/branch}","tags_url":"https://api.github.com/repos/nipy/dipy/tags","blobs_url":"https://api.github.com/repos/nipy/dipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nipy/dipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nipy/dipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/nipy/dipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nipy/dipy/statuses/{sha}","languages_url":"https://api.github.com/repos/nipy/dipy/languages","stargazers_url":"https://api.github.com/repos/nipy/dipy/stargazers","contributors_url":"https://api.github.com/repos/nipy/dipy/contributors","subscribers_url":"https://api.github.com/repos/nipy/dipy/subscribers","subscription_url":"https://api.github.com/repos/nipy/dipy/subscription","commits_url":"https://api.github.com/repos/nipy/dipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/nipy/dipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/nipy/dipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/nipy/dipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/nipy/dipy/contents/{+path}","compare_url":"https://api.github.com/repos/nipy/dipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nipy/dipy/merges","archive_url":"https://api.github.com/repos/nipy/dipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nipy/dipy/downloads","issues_url":"https://api.github.com/repos/nipy/dipy/issues{/number}","pulls_url":"https://api.github.com/repos/nipy/dipy/pulls{/number}","milestones_url":"https://api.github.com/repos/nipy/dipy/milestones{/number}","notifications_url":"https://api.github.com/repos/nipy/dipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nipy/dipy/labels{/name}","releases_url":"https://api.github.com/repos/nipy/dipy/releases{/id}","deployments_url":"https://api.github.com/repos/nipy/dipy/deployments","created_at":"2010-02-06T11:43:08Z","updated_at":"2016-05-30T10:45:21Z","pushed_at":"2016-06-29T14:54:10Z","git_url":"git://github.com/nipy/dipy.git","ssh_url":"git@github.com:nipy/dipy.git","clone_url":"https://github.com/nipy/dipy.git","svn_url":"https://github.com/nipy/dipy","homepage":"http://dipy.org","size":41469,"stargazers_count":90,"watchers_count":90,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":137,"mirror_url":null,"open_issues_count":152,"forks":137,"open_issues":152,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1058"},"html":{"href":"https://github.com/nipy/dipy/pull/1058"},"issue":{"href":"https://api.github.com/repos/nipy/dipy/issues/1058"},"comments":{"href":"https://api.github.com/repos/nipy/dipy/issues/1058/comments"},"review_comments":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1058/comments"},"review_comment":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1058/commits"},"statuses":{"href":"https://api.github.com/repos/nipy/dipy/statuses/2c8f2448ce15ebe490e03ae795127632ebde45bf"}}}}
{"actor":{"display_login":"arokem"}}