{"action":"created","comment":{"url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/comments/194068862","pull_request_review_id":127175986,"id":194068862,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDA2ODg2Mg==","diff_hunk":"@@ -0,0 +1,136 @@\n+# Parse the data from the dat file -> Points vs Horizontal Position = how many rows per column in the 2D array \n+#                                  -> Points vs Vertical Position = how many columns in the 2D array \n+\n+#       Create a dictionary and populate it with other dictionaries based on the data in the dat file \n+#       Use this data to add to the graph\n+\n+import matplotlib as mpl\n+import numpy as np\n+import matplotlib.pyplot as plt\n+\n+#Just default values, these are changed based on the dat file\n+horizontal = 1 \n+vertical = 1\n+\n+#initialize the dictionary for storing parameters given in the dat file \n+initialData = {}\n+initialData['photon'] = {}\n+initialData['horizontal'] = {}\n+initialData['vertical'] = {}\n+matrix = [[]] \n+\n+\"\"\" \n+Get data from the dat file with the parameters for the scan. Put this data into an organized Dictionary\n+\n+\"\"\"\n+def getCommentedData():\n+    with open('res_int_pr_se.dat') as file:\n+        lineNum = 1\n+        for line in file:\n+            if \"#\" not in line:\n+                return\n+            else:\n+                if (lineNum is 1):\n+                    populateDictionary(line, '[', ']', 'intensity')\n+                elif ('Initial Photon' in line):\n+                    populateDictionary(line, '#', ' ', 'photon', 'Initial_Energy')\n+                elif ('Final Photon' in line):\n+                    populateDictionary(line, '#', ' ', 'photon', 'Final_Energy')\n+                elif ('Initial Horizontal' in line):\n+                    populateDictionary(line, '#', ' ', 'horizontal', 'Initial_Position')\n+                elif ('Final Horizontal' in line):\n+                    populateDictionary(line, '#', ' ', 'horizontal', 'Final_Position')\n+                elif ('vs Horizontal' in line):\n+                    populateDictionary(line, '#', ' ', 'horizontal', 'Points', 'float','horizontal')","path":"kalebswartz7/excercise_01/parse.py","position":null,"original_position":44,"commit_id":"d7f2ce6895f8497025bc6e35cb5c23aae0f93257","original_commit_id":"9964ad3301feb007570abf5fba26df9a95a07e0e","user":{"login":"kalebswartz7","id":29153793,"node_id":"MDQ6VXNlcjI5MTUzNzkz","avatar_url":"https://avatars2.githubusercontent.com/u/29153793?v=4","gravatar_id":"","url":"https://api.github.com/users/kalebswartz7","html_url":"https://github.com/kalebswartz7","followers_url":"https://api.github.com/users/kalebswartz7/followers","following_url":"https://api.github.com/users/kalebswartz7/following{/other_user}","gists_url":"https://api.github.com/users/kalebswartz7/gists{/gist_id}","starred_url":"https://api.github.com/users/kalebswartz7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalebswartz7/subscriptions","organizations_url":"https://api.github.com/users/kalebswartz7/orgs","repos_url":"https://api.github.com/users/kalebswartz7/repos","events_url":"https://api.github.com/users/kalebswartz7/events{/privacy}","received_events_url":"https://api.github.com/users/kalebswartz7/received_events","type":"User","site_admin":false},"body":"Added.","created_at":"2018-06-08T14:08:14Z","updated_at":"2018-06-08T14:08:14Z","html_url":"https://github.com/NSLS-II/summer-interns/pull/1#discussion_r194068862","pull_request_url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/comments/194068862"},"html":{"href":"https://github.com/NSLS-II/summer-interns/pull/1#discussion_r194068862"},"pull_request":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1"}},"in_reply_to_id":193848915},"pull_request":{"url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1","id":193398485,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMzk4NDg1","html_url":"https://github.com/NSLS-II/summer-interns/pull/1","diff_url":"https://github.com/NSLS-II/summer-interns/pull/1.diff","patch_url":"https://github.com/NSLS-II/summer-interns/pull/1.patch","issue_url":"https://api.github.com/repos/NSLS-II/summer-interns/issues/1","number":1,"state":"open","locked":false,"title":"DEV: Reads in and parses data from dat file ","user":{"login":"kalebswartz7","id":29153793,"node_id":"MDQ6VXNlcjI5MTUzNzkz","avatar_url":"https://avatars2.githubusercontent.com/u/29153793?v=4","gravatar_id":"","url":"https://api.github.com/users/kalebswartz7","html_url":"https://github.com/kalebswartz7","followers_url":"https://api.github.com/users/kalebswartz7/followers","following_url":"https://api.github.com/users/kalebswartz7/following{/other_user}","gists_url":"https://api.github.com/users/kalebswartz7/gists{/gist_id}","starred_url":"https://api.github.com/users/kalebswartz7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalebswartz7/subscriptions","organizations_url":"https://api.github.com/users/kalebswartz7/orgs","repos_url":"https://api.github.com/users/kalebswartz7/repos","events_url":"https://api.github.com/users/kalebswartz7/events{/privacy}","received_events_url":"https://api.github.com/users/kalebswartz7/received_events","type":"User","site_admin":false},"body":"Uses data from DAT file to create a 2D image based on the points. Parameters for the data are put into a dictionary for easy access. \r\n\r\nLink to beamline: https://beta.sirepo.com/srw#/beamline/F5wzzwl9?coherence=full\r\n\r\nAttn: @mrakitin ","created_at":"2018-06-07T17:44:17Z","updated_at":"2018-06-08T14:08:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"038a0eddf38bfbb1e693e4bd90c7c80b0ab5e478","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jrmlhermitte","id":705366,"node_id":"MDQ6VXNlcjcwNTM2Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/705366?v=4","gravatar_id":"","url":"https://api.github.com/users/jrmlhermitte","html_url":"https://github.com/jrmlhermitte","followers_url":"https://api.github.com/users/jrmlhermitte/followers","following_url":"https://api.github.com/users/jrmlhermitte/following{/other_user}","gists_url":"https://api.github.com/users/jrmlhermitte/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmlhermitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmlhermitte/subscriptions","organizations_url":"https://api.github.com/users/jrmlhermitte/orgs","repos_url":"https://api.github.com/users/jrmlhermitte/repos","events_url":"https://api.github.com/users/jrmlhermitte/events{/privacy}","received_events_url":"https://api.github.com/users/jrmlhermitte/received_events","type":"User","site_admin":false},{"login":"danielballan","id":2279598,"node_id":"MDQ6VXNlcjIyNzk1OTg=","avatar_url":"https://avatars3.githubusercontent.com/u/2279598?v=4","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1/commits","review_comments_url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1/comments","review_comment_url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NSLS-II/summer-interns/issues/1/comments","statuses_url":"https://api.github.com/repos/NSLS-II/summer-interns/statuses/d7f2ce6895f8497025bc6e35cb5c23aae0f93257","head":{"label":"kalebswartz7:srw_parsing_exercise","ref":"srw_parsing_exercise","sha":"d7f2ce6895f8497025bc6e35cb5c23aae0f93257","user":{"login":"kalebswartz7","id":29153793,"node_id":"MDQ6VXNlcjI5MTUzNzkz","avatar_url":"https://avatars2.githubusercontent.com/u/29153793?v=4","gravatar_id":"","url":"https://api.github.com/users/kalebswartz7","html_url":"https://github.com/kalebswartz7","followers_url":"https://api.github.com/users/kalebswartz7/followers","following_url":"https://api.github.com/users/kalebswartz7/following{/other_user}","gists_url":"https://api.github.com/users/kalebswartz7/gists{/gist_id}","starred_url":"https://api.github.com/users/kalebswartz7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalebswartz7/subscriptions","organizations_url":"https://api.github.com/users/kalebswartz7/orgs","repos_url":"https://api.github.com/users/kalebswartz7/repos","events_url":"https://api.github.com/users/kalebswartz7/events{/privacy}","received_events_url":"https://api.github.com/users/kalebswartz7/received_events","type":"User","site_admin":false},"repo":{"id":136510305,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY1MTAzMDU=","name":"summer-interns","full_name":"kalebswartz7/summer-interns","owner":{"login":"kalebswartz7","id":29153793,"node_id":"MDQ6VXNlcjI5MTUzNzkz","avatar_url":"https://avatars2.githubusercontent.com/u/29153793?v=4","gravatar_id":"","url":"https://api.github.com/users/kalebswartz7","html_url":"https://github.com/kalebswartz7","followers_url":"https://api.github.com/users/kalebswartz7/followers","following_url":"https://api.github.com/users/kalebswartz7/following{/other_user}","gists_url":"https://api.github.com/users/kalebswartz7/gists{/gist_id}","starred_url":"https://api.github.com/users/kalebswartz7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalebswartz7/subscriptions","organizations_url":"https://api.github.com/users/kalebswartz7/orgs","repos_url":"https://api.github.com/users/kalebswartz7/repos","events_url":"https://api.github.com/users/kalebswartz7/events{/privacy}","received_events_url":"https://api.github.com/users/kalebswartz7/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kalebswartz7/summer-interns","description":"Tasks and excercises for summer interns","fork":true,"url":"https://api.github.com/repos/kalebswartz7/summer-interns","forks_url":"https://api.github.com/repos/kalebswartz7/summer-interns/forks","keys_url":"https://api.github.com/repos/kalebswartz7/summer-interns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kalebswartz7/summer-interns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kalebswartz7/summer-interns/teams","hooks_url":"https://api.github.com/repos/kalebswartz7/summer-interns/hooks","issue_events_url":"https://api.github.com/repos/kalebswartz7/summer-interns/issues/events{/number}","events_url":"https://api.github.com/repos/kalebswartz7/summer-interns/events","assignees_url":"https://api.github.com/repos/kalebswartz7/summer-interns/assignees{/user}","branches_url":"https://api.github.com/repos/kalebswartz7/summer-interns/branches{/branch}","tags_url":"https://api.github.com/repos/kalebswartz7/summer-interns/tags","blobs_url":"https://api.github.com/repos/kalebswartz7/summer-interns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kalebswartz7/summer-interns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kalebswartz7/summer-interns/git/refs{/sha}","trees_url":"https://api.github.com/repos/kalebswartz7/summer-interns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kalebswartz7/summer-interns/statuses/{sha}","languages_url":"https://api.github.com/repos/kalebswartz7/summer-interns/languages","stargazers_url":"https://api.github.com/repos/kalebswartz7/summer-interns/stargazers","contributors_url":"https://api.github.com/repos/kalebswartz7/summer-interns/contributors","subscribers_url":"https://api.github.com/repos/kalebswartz7/summer-interns/subscribers","subscription_url":"https://api.github.com/repos/kalebswartz7/summer-interns/subscription","commits_url":"https://api.github.com/repos/kalebswartz7/summer-interns/commits{/sha}","git_commits_url":"https://api.github.com/repos/kalebswartz7/summer-interns/git/commits{/sha}","comments_url":"https://api.github.com/repos/kalebswartz7/summer-interns/comments{/number}","issue_comment_url":"https://api.github.com/repos/kalebswartz7/summer-interns/issues/comments{/number}","contents_url":"https://api.github.com/repos/kalebswartz7/summer-interns/contents/{+path}","compare_url":"https://api.github.com/repos/kalebswartz7/summer-interns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kalebswartz7/summer-interns/merges","archive_url":"https://api.github.com/repos/kalebswartz7/summer-interns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kalebswartz7/summer-interns/downloads","issues_url":"https://api.github.com/repos/kalebswartz7/summer-interns/issues{/number}","pulls_url":"https://api.github.com/repos/kalebswartz7/summer-interns/pulls{/number}","milestones_url":"https://api.github.com/repos/kalebswartz7/summer-interns/milestones{/number}","notifications_url":"https://api.github.com/repos/kalebswartz7/summer-interns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kalebswartz7/summer-interns/labels{/name}","releases_url":"https://api.github.com/repos/kalebswartz7/summer-interns/releases{/id}","deployments_url":"https://api.github.com/repos/kalebswartz7/summer-interns/deployments","created_at":"2018-06-07T17:30:22Z","updated_at":"2018-06-07T17:30:24Z","pushed_at":"2018-06-07T20:53:30Z","git_url":"git://github.com/kalebswartz7/summer-interns.git","ssh_url":"git@github.com:kalebswartz7/summer-interns.git","clone_url":"https://github.com/kalebswartz7/summer-interns.git","svn_url":"https://github.com/kalebswartz7/summer-interns","homepage":null,"size":1047,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NSLS-II:master","ref":"master","sha":"d7e0706404b875e3397ec2a548d1a869da7cb3eb","user":{"login":"NSLS-II","id":8700262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3MDAyNjI=","avatar_url":"https://avatars3.githubusercontent.com/u/8700262?v=4","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"repo":{"id":136510038,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY1MTAwMzg=","name":"summer-interns","full_name":"NSLS-II/summer-interns","owner":{"login":"NSLS-II","id":8700262,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3MDAyNjI=","avatar_url":"https://avatars3.githubusercontent.com/u/8700262?v=4","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NSLS-II/summer-interns","description":"Tasks and excercises for summer interns","fork":false,"url":"https://api.github.com/repos/NSLS-II/summer-interns","forks_url":"https://api.github.com/repos/NSLS-II/summer-interns/forks","keys_url":"https://api.github.com/repos/NSLS-II/summer-interns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NSLS-II/summer-interns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NSLS-II/summer-interns/teams","hooks_url":"https://api.github.com/repos/NSLS-II/summer-interns/hooks","issue_events_url":"https://api.github.com/repos/NSLS-II/summer-interns/issues/events{/number}","events_url":"https://api.github.com/repos/NSLS-II/summer-interns/events","assignees_url":"https://api.github.com/repos/NSLS-II/summer-interns/assignees{/user}","branches_url":"https://api.github.com/repos/NSLS-II/summer-interns/branches{/branch}","tags_url":"https://api.github.com/repos/NSLS-II/summer-interns/tags","blobs_url":"https://api.github.com/repos/NSLS-II/summer-interns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NSLS-II/summer-interns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NSLS-II/summer-interns/git/refs{/sha}","trees_url":"https://api.github.com/repos/NSLS-II/summer-interns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NSLS-II/summer-interns/statuses/{sha}","languages_url":"https://api.github.com/repos/NSLS-II/summer-interns/languages","stargazers_url":"https://api.github.com/repos/NSLS-II/summer-interns/stargazers","contributors_url":"https://api.github.com/repos/NSLS-II/summer-interns/contributors","subscribers_url":"https://api.github.com/repos/NSLS-II/summer-interns/subscribers","subscription_url":"https://api.github.com/repos/NSLS-II/summer-interns/subscription","commits_url":"https://api.github.com/repos/NSLS-II/summer-interns/commits{/sha}","git_commits_url":"https://api.github.com/repos/NSLS-II/summer-interns/git/commits{/sha}","comments_url":"https://api.github.com/repos/NSLS-II/summer-interns/comments{/number}","issue_comment_url":"https://api.github.com/repos/NSLS-II/summer-interns/issues/comments{/number}","contents_url":"https://api.github.com/repos/NSLS-II/summer-interns/contents/{+path}","compare_url":"https://api.github.com/repos/NSLS-II/summer-interns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NSLS-II/summer-interns/merges","archive_url":"https://api.github.com/repos/NSLS-II/summer-interns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NSLS-II/summer-interns/downloads","issues_url":"https://api.github.com/repos/NSLS-II/summer-interns/issues{/number}","pulls_url":"https://api.github.com/repos/NSLS-II/summer-interns/pulls{/number}","milestones_url":"https://api.github.com/repos/NSLS-II/summer-interns/milestones{/number}","notifications_url":"https://api.github.com/repos/NSLS-II/summer-interns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NSLS-II/summer-interns/labels{/name}","releases_url":"https://api.github.com/repos/NSLS-II/summer-interns/releases{/id}","deployments_url":"https://api.github.com/repos/NSLS-II/summer-interns/deployments","created_at":"2018-06-07T17:27:39Z","updated_at":"2018-06-07T17:27:59Z","pushed_at":"2018-06-07T20:53:32Z","git_url":"git://github.com/NSLS-II/summer-interns.git","ssh_url":"git@github.com:NSLS-II/summer-interns.git","clone_url":"https://github.com/NSLS-II/summer-interns.git","svn_url":"https://github.com/NSLS-II/summer-interns","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1"},"html":{"href":"https://github.com/NSLS-II/summer-interns/pull/1"},"issue":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/issues/1"},"comments":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/NSLS-II/summer-interns/statuses/d7f2ce6895f8497025bc6e35cb5c23aae0f93257"}},"author_association":"NONE"}}
{"actor":{"display_login":"kalebswartz7"}}