{"action":"created","comment":{"url":"https://api.github.com/repos/nipy/nipype/pulls/comments/79240620","id":79240620,"diff_hunk":"@@ -0,0 +1,88 @@\n+# -*- coding: utf-8 -*-\n+# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n+# vi: set ft=python sts=4 ts=4 sw=4 et:\n+'''\n+Algorithms to compute statistics on :abbr:`fMRI (functional MRI)`\n+\n+    Change directory to provide relative paths for doctests\n+    >>> import os\n+    >>> filepath = os.path.dirname(os.path.realpath(__file__))\n+    >>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))\n+    >>> os.chdir(datadir)\n+\n+'''\n+from __future__ import (print_function, division, unicode_literals,\n+                        absolute_import)\n+from builtins import str\n+\n+import numpy as np\n+import nilearn.input_data as nl\n+\n+from .. import logging\n+from ..interfaces.base import (traits, TraitedSpec, BaseInterface,\n+                               BaseInterfaceInputSpec, File)\n+IFLOG = logging.getLogger('interface')\n+\n+class SignalExtractionInputSpec(BaseInterfaceInputSpec):\n+    in_file = File(exists=True, mandatory=True, desc='4-D fMRI nii file')\n+    label_file = File(exists=True, mandatory=True,\n+                      desc='a 3-D label image, with 0 denoting background, or '\n+                      'a 4-D file of probability maps.')\n+    class_labels = traits.List(mandatory=True,","path":"nipype/algorithms/stats.py","position":31,"original_position":31,"commit_id":"fffd9b56737dc4653860344ac34f432edbab0db3","original_commit_id":"160994694deac884e25c41fe346e9e4881dc706a","user":{"login":"chrisfilo","id":238759,"avatar_url":"https://avatars.githubusercontent.com/u/238759?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisfilo","html_url":"https://github.com/chrisfilo","followers_url":"https://api.github.com/users/chrisfilo/followers","following_url":"https://api.github.com/users/chrisfilo/following{/other_user}","gists_url":"https://api.github.com/users/chrisfilo/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisfilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisfilo/subscriptions","organizations_url":"https://api.github.com/users/chrisfilo/orgs","repos_url":"https://api.github.com/users/chrisfilo/repos","events_url":"https://api.github.com/users/chrisfilo/events{/privacy}","received_events_url":"https://api.github.com/users/chrisfilo/received_events","type":"User","site_admin":false},"body":"@oesteban the problem is that the label_file image does not include the labels in it's header.\r\n@shoshber the label_file always contains integers\r\n\r\nThe assumption is (and this should be explained in the docstring) that the class_labels list corresponds to class integers ordered in ascending fashion. We can also switch to using a dictionary to make it more explicit.","created_at":"2016-09-16T19:59:54Z","updated_at":"2016-09-16T19:59:54Z","html_url":"https://github.com/nipy/nipype/pull/1640#discussion_r79240620","pull_request_url":"https://api.github.com/repos/nipy/nipype/pulls/1640","_links":{"self":{"href":"https://api.github.com/repos/nipy/nipype/pulls/comments/79240620"},"html":{"href":"https://github.com/nipy/nipype/pull/1640#discussion_r79240620"},"pull_request":{"href":"https://api.github.com/repos/nipy/nipype/pulls/1640"}}},"pull_request":{"url":"https://api.github.com/repos/nipy/nipype/pulls/1640","id":85508031,"html_url":"https://github.com/nipy/nipype/pull/1640","diff_url":"https://github.com/nipy/nipype/pull/1640.diff","patch_url":"https://github.com/nipy/nipype/pull/1640.patch","issue_url":"https://api.github.com/repos/nipy/nipype/issues/1640","number":1640,"state":"open","locked":false,"title":"WIP SignalExtractionInterface","user":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"body":"Done with the simplest case here: https://github.com/nipy/nipype/issues/1628","created_at":"2016-09-16T01:40:07Z","updated_at":"2016-09-16T19:59:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e3836140309fa6dff85c9260cc2f3042ed484b9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nipy/nipype/pulls/1640/commits","review_comments_url":"https://api.github.com/repos/nipy/nipype/pulls/1640/comments","review_comment_url":"https://api.github.com/repos/nipy/nipype/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nipy/nipype/issues/1640/comments","statuses_url":"https://api.github.com/repos/nipy/nipype/statuses/fffd9b56737dc4653860344ac34f432edbab0db3","head":{"label":"shoshber:cp","ref":"cp","sha":"fffd9b56737dc4653860344ac34f432edbab0db3","user":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"repo":{"id":59062696,"name":"nipype","full_name":"shoshber/nipype","owner":{"login":"shoshber","id":1402948,"avatar_url":"https://avatars.githubusercontent.com/u/1402948?v=3","gravatar_id":"","url":"https://api.github.com/users/shoshber","html_url":"https://github.com/shoshber","followers_url":"https://api.github.com/users/shoshber/followers","following_url":"https://api.github.com/users/shoshber/following{/other_user}","gists_url":"https://api.github.com/users/shoshber/gists{/gist_id}","starred_url":"https://api.github.com/users/shoshber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoshber/subscriptions","organizations_url":"https://api.github.com/users/shoshber/orgs","repos_url":"https://api.github.com/users/shoshber/repos","events_url":"https://api.github.com/users/shoshber/events{/privacy}","received_events_url":"https://api.github.com/users/shoshber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shoshber/nipype","description":"Workflows and interfaces for neuroimaging packages","fork":true,"url":"https://api.github.com/repos/shoshber/nipype","forks_url":"https://api.github.com/repos/shoshber/nipype/forks","keys_url":"https://api.github.com/repos/shoshber/nipype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shoshber/nipype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shoshber/nipype/teams","hooks_url":"https://api.github.com/repos/shoshber/nipype/hooks","issue_events_url":"https://api.github.com/repos/shoshber/nipype/issues/events{/number}","events_url":"https://api.github.com/repos/shoshber/nipype/events","assignees_url":"https://api.github.com/repos/shoshber/nipype/assignees{/user}","branches_url":"https://api.github.com/repos/shoshber/nipype/branches{/branch}","tags_url":"https://api.github.com/repos/shoshber/nipype/tags","blobs_url":"https://api.github.com/repos/shoshber/nipype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shoshber/nipype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shoshber/nipype/git/refs{/sha}","trees_url":"https://api.github.com/repos/shoshber/nipype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shoshber/nipype/statuses/{sha}","languages_url":"https://api.github.com/repos/shoshber/nipype/languages","stargazers_url":"https://api.github.com/repos/shoshber/nipype/stargazers","contributors_url":"https://api.github.com/repos/shoshber/nipype/contributors","subscribers_url":"https://api.github.com/repos/shoshber/nipype/subscribers","subscription_url":"https://api.github.com/repos/shoshber/nipype/subscription","commits_url":"https://api.github.com/repos/shoshber/nipype/commits{/sha}","git_commits_url":"https://api.github.com/repos/shoshber/nipype/git/commits{/sha}","comments_url":"https://api.github.com/repos/shoshber/nipype/comments{/number}","issue_comment_url":"https://api.github.com/repos/shoshber/nipype/issues/comments{/number}","contents_url":"https://api.github.com/repos/shoshber/nipype/contents/{+path}","compare_url":"https://api.github.com/repos/shoshber/nipype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shoshber/nipype/merges","archive_url":"https://api.github.com/repos/shoshber/nipype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shoshber/nipype/downloads","issues_url":"https://api.github.com/repos/shoshber/nipype/issues{/number}","pulls_url":"https://api.github.com/repos/shoshber/nipype/pulls{/number}","milestones_url":"https://api.github.com/repos/shoshber/nipype/milestones{/number}","notifications_url":"https://api.github.com/repos/shoshber/nipype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shoshber/nipype/labels{/name}","releases_url":"https://api.github.com/repos/shoshber/nipype/releases{/id}","deployments_url":"https://api.github.com/repos/shoshber/nipype/deployments","created_at":"2016-05-17T22:10:15Z","updated_at":"2016-05-17T22:10:19Z","pushed_at":"2016-09-16T19:59:00Z","git_url":"git://github.com/shoshber/nipype.git","ssh_url":"git@github.com:shoshber/nipype.git","clone_url":"https://github.com/shoshber/nipype.git","svn_url":"https://github.com/shoshber/nipype","homepage":"http://nipype.readthedocs.org/en/latest/","size":65141,"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":"287e7e5d56efd1fb1092fc4c756c4b660ffcc1aa","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":791477,"name":"nipype","full_name":"nipy/nipype","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/nipype","description":"Workflows and interfaces for neuroimaging packages","fork":false,"url":"https://api.github.com/repos/nipy/nipype","forks_url":"https://api.github.com/repos/nipy/nipype/forks","keys_url":"https://api.github.com/repos/nipy/nipype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nipy/nipype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nipy/nipype/teams","hooks_url":"https://api.github.com/repos/nipy/nipype/hooks","issue_events_url":"https://api.github.com/repos/nipy/nipype/issues/events{/number}","events_url":"https://api.github.com/repos/nipy/nipype/events","assignees_url":"https://api.github.com/repos/nipy/nipype/assignees{/user}","branches_url":"https://api.github.com/repos/nipy/nipype/branches{/branch}","tags_url":"https://api.github.com/repos/nipy/nipype/tags","blobs_url":"https://api.github.com/repos/nipy/nipype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nipy/nipype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nipy/nipype/git/refs{/sha}","trees_url":"https://api.github.com/repos/nipy/nipype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nipy/nipype/statuses/{sha}","languages_url":"https://api.github.com/repos/nipy/nipype/languages","stargazers_url":"https://api.github.com/repos/nipy/nipype/stargazers","contributors_url":"https://api.github.com/repos/nipy/nipype/contributors","subscribers_url":"https://api.github.com/repos/nipy/nipype/subscribers","subscription_url":"https://api.github.com/repos/nipy/nipype/subscription","commits_url":"https://api.github.com/repos/nipy/nipype/commits{/sha}","git_commits_url":"https://api.github.com/repos/nipy/nipype/git/commits{/sha}","comments_url":"https://api.github.com/repos/nipy/nipype/comments{/number}","issue_comment_url":"https://api.github.com/repos/nipy/nipype/issues/comments{/number}","contents_url":"https://api.github.com/repos/nipy/nipype/contents/{+path}","compare_url":"https://api.github.com/repos/nipy/nipype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nipy/nipype/merges","archive_url":"https://api.github.com/repos/nipy/nipype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nipy/nipype/downloads","issues_url":"https://api.github.com/repos/nipy/nipype/issues{/number}","pulls_url":"https://api.github.com/repos/nipy/nipype/pulls{/number}","milestones_url":"https://api.github.com/repos/nipy/nipype/milestones{/number}","notifications_url":"https://api.github.com/repos/nipy/nipype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nipy/nipype/labels{/name}","releases_url":"https://api.github.com/repos/nipy/nipype/releases{/id}","deployments_url":"https://api.github.com/repos/nipy/nipype/deployments","created_at":"2010-07-22T17:06:49Z","updated_at":"2016-09-14T02:18:22Z","pushed_at":"2016-09-16T19:59:01Z","git_url":"git://github.com/nipy/nipype.git","ssh_url":"git@github.com:nipy/nipype.git","clone_url":"https://github.com/nipy/nipype.git","svn_url":"https://github.com/nipy/nipype","homepage":"http://nipype.readthedocs.org/en/latest/","size":69441,"stargazers_count":199,"watchers_count":199,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":226,"mirror_url":null,"open_issues_count":268,"forks":226,"open_issues":268,"watchers":199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nipy/nipype/pulls/1640"},"html":{"href":"https://github.com/nipy/nipype/pull/1640"},"issue":{"href":"https://api.github.com/repos/nipy/nipype/issues/1640"},"comments":{"href":"https://api.github.com/repos/nipy/nipype/issues/1640/comments"},"review_comments":{"href":"https://api.github.com/repos/nipy/nipype/pulls/1640/comments"},"review_comment":{"href":"https://api.github.com/repos/nipy/nipype/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nipy/nipype/pulls/1640/commits"},"statuses":{"href":"https://api.github.com/repos/nipy/nipype/statuses/fffd9b56737dc4653860344ac34f432edbab0db3"}}}}
{"actor":{"display_login":"chrisfilo"}}