{"action":"created","comment":{"url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/comments/47176076","id":47176076,"diff_hunk":"@@ -0,0 +1,296 @@\n+\n+# coding: utf-8\n+\n+# # BART trial\n+\n+# This is some initial exploration and analysis related to the Bart Trials. I hope the comments make sense :).  Since this is ipython I've intermixed *bash* code with the *python* code, I hope this is easy to follow.\n+\n+# In[1]:\n+\n+from __future__ import absolute_import, division, print_function\n+import numpy as np\n+import numpy.linalg as npl\n+import matplotlib.pyplot as plt\n+import nibabel as nib\n+import pandas as pd # new\n+import os # new\n+# the last one is a major thing for ipython notebook, don't include in regular python code\n+get_ipython().magic('matplotlib inline')\n+\n+\n+# Quickly (some rational for additions):\n+#  - pandas: is good because it has Data frame structures similar to R data.frames (I've already make some CSV files using this library)\n+#  - os: is good for file location (instead of trying to use $\\texttt{bash}$ into $\\texttt{ipython}$)\n+#    - $\\texttt{os.chdir}$ $\\Leftrightarrow$ $\\texttt{cd}$ in $\\texttt{bash}$\n+#    - $\\texttt{os.listdir}$ $\\Leftrightarrow$ $\\texttt{ls}$   -> usually I do $\\texttt{np.array(os.listdir(...))}$ if the directory is large\n+# \n+\n+# ## Layout of File System, also exploring $\\texttt{os}$ library\n+\n+# Below I've provided where my data files are currently located.  You may observe that the numbering of the subjects is missing some numbers.\n+\n+# In[6]:\n+\n+# setting locations of elements, make sure to change this: (smart idea in general, when dealing with a file system_\n+location_of_data=\"/Users/BenjaminLeRoy/Desktop/1.Fall2015/Stat 159/project/data/ds009/\" \n+location_of_subject001=os.path.join(location_of_data,\"sub001/\")\n+location_of_simuli=\"/Users/BenjaminLeRoy/Desktop/test/4d_fmri/\"\n+location_of_present_3d=\"/Users/BenjaminLeRoy/Desktop/1.Fall2015/Stat 159/project/python_code\"\n+location_of_processed_data=\"/Users/BenjaminLeRoy/Desktop/1.Fall2015/Stat 159/project/processed_data/\"\n+\n+\n+# ### Folders in the large Data Directory (ds009)\n+\n+# In[7]:\n+\n+os.chdir(location_of_data)\n+np.array(os.listdir(location_of_data))\n+# some subject numbers don't exist (probably removed due to errors mentioned in paper)\n+\n+\n+# * Ignore the '.DS_Store', we can take it out if we ever want to deal with this as a list (see \"Creating Data Frames\")\n+\n+# ### Examining 1 subject's data\n+\n+# These is the folders in the sub001 folder:\n+\n+# In[8]:\n+\n+os.chdir(location_of_subject001)\n+np.array(os.listdir(location_of_subject001))\n+\n+\n+# ### File Structure for Individual Subject\n+\n+# I've tried to help you visualize the data by using the tree function (try in your own terminal), you need your directory to be \"ds009/sub001\"\n+\n+# In[9]:\n+\n+#Run is in terminal after entering sub001 folder:\n+#  1)\n+#  tree BOLD/task001_run001\n+#  2)\n+#  tree anatomy/\n+#  3)\n+#  tree behav/task001_run001\n+#  4)\n+#  tree model/model001/onsets/task001_run001\n+#  5)\n+#  tree model/model002/onsets/task001_run001\n+\n+# 1)\n+BOLD/task001_run001","path":"code/utils/misc/BART_Data_Beginning.py","position":82,"original_position":82,"commit_id":"bb8fff1feb6b23dd1341b49b645bf24d04deea1f","original_commit_id":"bb8fff1feb6b23dd1341b49b645bf24d04deea1f","user":{"login":"benjaminleroy","id":8593016,"avatar_url":"https://avatars.githubusercontent.com/u/8593016?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminleroy","html_url":"https://github.com/benjaminleroy","followers_url":"https://api.github.com/users/benjaminleroy/followers","following_url":"https://api.github.com/users/benjaminleroy/following{/other_user}","gists_url":"https://api.github.com/users/benjaminleroy/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminleroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminleroy/subscriptions","organizations_url":"https://api.github.com/users/benjaminleroy/orgs","repos_url":"https://api.github.com/users/benjaminleroy/repos","events_url":"https://api.github.com/users/benjaminleroy/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminleroy/received_events","type":"User","site_admin":false},"body":"This needs to be in quotes, as it will not run\"","created_at":"2015-12-10T00:47:28Z","updated_at":"2015-12-10T00:47:28Z","html_url":"https://github.com/berkeley-stat159/project-alpha/pull/156#discussion_r47176076","pull_request_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/comments/47176076"},"html":{"href":"https://github.com/berkeley-stat159/project-alpha/pull/156#discussion_r47176076"},"pull_request":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156","id":53186813,"html_url":"https://github.com/berkeley-stat159/project-alpha/pull/156","diff_url":"https://github.com/berkeley-stat159/project-alpha/pull/156.diff","patch_url":"https://github.com/berkeley-stat159/project-alpha/pull/156.patch","issue_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues/156","number":156,"state":"open","locked":false,"title":"first code review","user":{"login":"hiroto-udagawa","id":6495923,"avatar_url":"https://avatars.githubusercontent.com/u/6495923?v=3","gravatar_id":"","url":"https://api.github.com/users/hiroto-udagawa","html_url":"https://github.com/hiroto-udagawa","followers_url":"https://api.github.com/users/hiroto-udagawa/followers","following_url":"https://api.github.com/users/hiroto-udagawa/following{/other_user}","gists_url":"https://api.github.com/users/hiroto-udagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/hiroto-udagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiroto-udagawa/subscriptions","organizations_url":"https://api.github.com/users/hiroto-udagawa/orgs","repos_url":"https://api.github.com/users/hiroto-udagawa/repos","events_url":"https://api.github.com/users/hiroto-udagawa/events{/privacy}","received_events_url":"https://api.github.com/users/hiroto-udagawa/received_events","type":"User","site_admin":false},"body":"looked through and made sure all the code ran and commented. still ned to brush up tsa_sciprt, time_shift_script, and noise_correction.\r\n\r\nA few issues i found:\r\n- Get rid of warnings\r\n- We need to figure out the subject list indexing\r\n- Should we make ‘make_convolve_lamdba’ into a function?\r\n- Do we need to require stats models and patsy for ‘tsa_script'","created_at":"2015-12-09T22:20:19Z","updated_at":"2015-12-10T00:47:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20aabfe4aae5b1e783ffc357ad5b8c1122cf5419","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156/commits","review_comments_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156/comments","review_comment_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues/156/comments","statuses_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/statuses/bb8fff1feb6b23dd1341b49b645bf24d04deea1f","head":{"label":"hiroto-udagawa:code_review","ref":"code_review","sha":"bb8fff1feb6b23dd1341b49b645bf24d04deea1f","user":{"login":"hiroto-udagawa","id":6495923,"avatar_url":"https://avatars.githubusercontent.com/u/6495923?v=3","gravatar_id":"","url":"https://api.github.com/users/hiroto-udagawa","html_url":"https://github.com/hiroto-udagawa","followers_url":"https://api.github.com/users/hiroto-udagawa/followers","following_url":"https://api.github.com/users/hiroto-udagawa/following{/other_user}","gists_url":"https://api.github.com/users/hiroto-udagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/hiroto-udagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiroto-udagawa/subscriptions","organizations_url":"https://api.github.com/users/hiroto-udagawa/orgs","repos_url":"https://api.github.com/users/hiroto-udagawa/repos","events_url":"https://api.github.com/users/hiroto-udagawa/events{/privacy}","received_events_url":"https://api.github.com/users/hiroto-udagawa/received_events","type":"User","site_admin":false},"repo":{"id":45159310,"name":"project-alpha-1","full_name":"hiroto-udagawa/project-alpha-1","owner":{"login":"hiroto-udagawa","id":6495923,"avatar_url":"https://avatars.githubusercontent.com/u/6495923?v=3","gravatar_id":"","url":"https://api.github.com/users/hiroto-udagawa","html_url":"https://github.com/hiroto-udagawa","followers_url":"https://api.github.com/users/hiroto-udagawa/followers","following_url":"https://api.github.com/users/hiroto-udagawa/following{/other_user}","gists_url":"https://api.github.com/users/hiroto-udagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/hiroto-udagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hiroto-udagawa/subscriptions","organizations_url":"https://api.github.com/users/hiroto-udagawa/orgs","repos_url":"https://api.github.com/users/hiroto-udagawa/repos","events_url":"https://api.github.com/users/hiroto-udagawa/events{/privacy}","received_events_url":"https://api.github.com/users/hiroto-udagawa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hiroto-udagawa/project-alpha-1","description":"","fork":true,"url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1","forks_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/forks","keys_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/teams","hooks_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/hooks","issue_events_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/issues/events{/number}","events_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/events","assignees_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/assignees{/user}","branches_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/branches{/branch}","tags_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/tags","blobs_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/statuses/{sha}","languages_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/languages","stargazers_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/stargazers","contributors_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/contributors","subscribers_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/subscribers","subscription_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/subscription","commits_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/contents/{+path}","compare_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/merges","archive_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/downloads","issues_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/issues{/number}","pulls_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/pulls{/number}","milestones_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/milestones{/number}","notifications_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/labels{/name}","releases_url":"https://api.github.com/repos/hiroto-udagawa/project-alpha-1/releases{/id}","created_at":"2015-10-29T04:02:39Z","updated_at":"2015-10-29T04:02:44Z","pushed_at":"2015-12-09T23:21:06Z","git_url":"git://github.com/hiroto-udagawa/project-alpha-1.git","ssh_url":"git@github.com:hiroto-udagawa/project-alpha-1.git","clone_url":"https://github.com/hiroto-udagawa/project-alpha-1.git","svn_url":"https://github.com/hiroto-udagawa/project-alpha-1","homepage":null,"size":32103,"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":"berkeley-stat159:master","ref":"master","sha":"defbc2ef8671037b663e07e78b73765d0ed4ec92","user":{"login":"berkeley-stat159","id":11684434,"avatar_url":"https://avatars.githubusercontent.com/u/11684434?v=3","gravatar_id":"","url":"https://api.github.com/users/berkeley-stat159","html_url":"https://github.com/berkeley-stat159","followers_url":"https://api.github.com/users/berkeley-stat159/followers","following_url":"https://api.github.com/users/berkeley-stat159/following{/other_user}","gists_url":"https://api.github.com/users/berkeley-stat159/gists{/gist_id}","starred_url":"https://api.github.com/users/berkeley-stat159/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berkeley-stat159/subscriptions","organizations_url":"https://api.github.com/users/berkeley-stat159/orgs","repos_url":"https://api.github.com/users/berkeley-stat159/repos","events_url":"https://api.github.com/users/berkeley-stat159/events{/privacy}","received_events_url":"https://api.github.com/users/berkeley-stat159/received_events","type":"Organization","site_admin":false},"repo":{"id":43347694,"name":"project-alpha","full_name":"berkeley-stat159/project-alpha","owner":{"login":"berkeley-stat159","id":11684434,"avatar_url":"https://avatars.githubusercontent.com/u/11684434?v=3","gravatar_id":"","url":"https://api.github.com/users/berkeley-stat159","html_url":"https://github.com/berkeley-stat159","followers_url":"https://api.github.com/users/berkeley-stat159/followers","following_url":"https://api.github.com/users/berkeley-stat159/following{/other_user}","gists_url":"https://api.github.com/users/berkeley-stat159/gists{/gist_id}","starred_url":"https://api.github.com/users/berkeley-stat159/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berkeley-stat159/subscriptions","organizations_url":"https://api.github.com/users/berkeley-stat159/orgs","repos_url":"https://api.github.com/users/berkeley-stat159/repos","events_url":"https://api.github.com/users/berkeley-stat159/events{/privacy}","received_events_url":"https://api.github.com/users/berkeley-stat159/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/berkeley-stat159/project-alpha","description":"","fork":false,"url":"https://api.github.com/repos/berkeley-stat159/project-alpha","forks_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/forks","keys_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/teams","hooks_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/hooks","issue_events_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues/events{/number}","events_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/events","assignees_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/assignees{/user}","branches_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/branches{/branch}","tags_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/tags","blobs_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/git/refs{/sha}","trees_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/statuses/{sha}","languages_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/languages","stargazers_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/stargazers","contributors_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/contributors","subscribers_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/subscribers","subscription_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/subscription","commits_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/commits{/sha}","git_commits_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/git/commits{/sha}","comments_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/comments{/number}","issue_comment_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues/comments{/number}","contents_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/contents/{+path}","compare_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/merges","archive_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/downloads","issues_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues{/number}","pulls_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls{/number}","milestones_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/milestones{/number}","notifications_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/labels{/name}","releases_url":"https://api.github.com/repos/berkeley-stat159/project-alpha/releases{/id}","created_at":"2015-09-29T05:49:44Z","updated_at":"2015-12-09T19:01:06Z","pushed_at":"2015-12-10T00:33:16Z","git_url":"git://github.com/berkeley-stat159/project-alpha.git","ssh_url":"git@github.com:berkeley-stat159/project-alpha.git","clone_url":"https://github.com/berkeley-stat159/project-alpha.git","svn_url":"https://github.com/berkeley-stat159/project-alpha","homepage":null,"size":32243,"stargazers_count":4,"watchers_count":4,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":10,"forks":7,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156"},"html":{"href":"https://github.com/berkeley-stat159/project-alpha/pull/156"},"issue":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues/156"},"comments":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/berkeley-stat159/project-alpha/statuses/bb8fff1feb6b23dd1341b49b645bf24d04deea1f"}}}}