{"action":"created","comment":{"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/comments/127916846","pull_request_review_id":50545522,"id":127916846,"diff_hunk":"@@ -0,0 +1,227 @@\n+#!/bin/env python\n+\n+def launchAna(args):\n+  return launchAnaArgs(*args)\n+\n+def launchAnaArgs(anaType, cName, cType, scandate1, scandate2=None, ztrim=4.0, chConfigKnown=False, channels=False, panasonic=False):\n+  import os\n+  import subprocess\n+  from subprocess import CalledProcessError\n+  from anaInfo import ana_config\n+  from gempython.utils.wrappers import runCommand\n+\n+  dataPath  = os.getenv('DATA_PATH')\n+  dirPath   = \"\"\n+  elogPath  = \"%s/%s\"%(os.getenv('ELOG_PATH'),scandate1)\n+    \n+  print \"Analysis Requested: %s\"%(anaType)\n+\n+  #Build Commands\n+  cmd = [\"python\"]","path":"ana_scans.py","position":20,"original_position":20,"commit_id":"fbff6e159894eba686d2392acdb0549642d8c842","original_commit_id":"c597420ea00968c1211fcf95bbbd8f5140a8211e","user":{"login":"bdorney","id":6432141,"avatar_url":"https://avatars0.githubusercontent.com/u/6432141?v=4","gravatar_id":"","url":"https://api.github.com/users/bdorney","html_url":"https://github.com/bdorney","followers_url":"https://api.github.com/users/bdorney/followers","following_url":"https://api.github.com/users/bdorney/following{/other_user}","gists_url":"https://api.github.com/users/bdorney/gists{/gist_id}","starred_url":"https://api.github.com/users/bdorney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdorney/subscriptions","organizations_url":"https://api.github.com/users/bdorney/orgs","repos_url":"https://api.github.com/users/bdorney/repos","events_url":"https://api.github.com/users/bdorney/events{/privacy}","received_events_url":"https://api.github.com/users/bdorney/received_events","type":"User","site_admin":false},"body":"Okay the user just needs to ensure:\r\n\r\n`BUILD_HOME`\r\n`DATA_PATH`\r\n`ELOG_PATH`\r\n\r\nAre all defined in the `$SHELL` and then call:\r\n\r\n`$BUILD_HOME/vfatqc-python-scripts/setup/paths.sh`\r\n\r\nAnd then the environment will be setup correctly as we discussed.","created_at":"2017-07-18T08:49:55Z","updated_at":"2017-07-18T08:49:55Z","html_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/100#discussion_r127916846","pull_request_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/comments/127916846"},"html":{"href":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/100#discussion_r127916846"},"pull_request":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100","id":130206416,"html_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/100","diff_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/100.diff","patch_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/100.patch","issue_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/100","number":100,"state":"open","locked":false,"title":"Implementation of ana_scans.py","user":{"login":"bdorney","id":6432141,"avatar_url":"https://avatars0.githubusercontent.com/u/6432141?v=4","gravatar_id":"","url":"https://api.github.com/users/bdorney","html_url":"https://github.com/bdorney","followers_url":"https://api.github.com/users/bdorney/followers","following_url":"https://api.github.com/users/bdorney/following{/other_user}","gists_url":"https://api.github.com/users/bdorney/gists{/gist_id}","starred_url":"https://api.github.com/users/bdorney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdorney/subscriptions","organizations_url":"https://api.github.com/users/bdorney/orgs","repos_url":"https://api.github.com/users/bdorney/repos","events_url":"https://api.github.com/users/bdorney/events{/privacy}","received_events_url":"https://api.github.com/users/bdorney/received_events","type":"User","site_admin":false},"body":"Addressing:\r\n\r\nhttps://github.com/cms-gem-daq-project/vfatqc-python-scripts/issues/99\r\n\r\nAdded \"anaInfo.py\" to define the analysis dictionary:\r\n`\r\nana_config = {\r\n        \"latency\":\"anaUltraLatency.py\",\r\n        \"scurve\":\"anaUltraScurve.py\",\r\n        \"threshold\":\"anaUltraThreshold.py\",\r\n        \"trim\":\"anaUltraScurve.py\"\r\n        }\r\n`\r\n\r\nThis should be expanded whenever a new analysis tools/scan types are added and subsequent updates to launchAnaArgs() in ana_scans.py.\r\n\r\nAdded \"anaoptions.py\" to improve modularity of the code and decrease option bloat.  Here only cmd options used by scripts given in ana_config are shown.  Script specific analysis options are generally kept inside the corresponding analysis script.  This also caused some cmd options to migrate out of qcoptions.py.\r\n\r\nUsage examples:\r\n\r\nscurve analysis (tested, looks good)\r\n`ana_scans.py --scandate1=current --ztrim=4 --anaType=scurve`\r\n\r\ntrim analysis (tested, looks good)\r\n`ana_scans.py --scandate1=current  --ztrim=4 --anaType=trim`\r\n\r\nlatency analysis (gem-plotting/latency/anaUltraLatency.py for this to be successful)\r\n`ana_scans.py --scandate1=current --anaType=latency`\r\n\r\nthreshold analysis (tested, looks good)\r\n`ana_scans.py --scandate1=current --anaType=threshold`\r\n`ana_scans.py --scandate1=current --scandate2=current --chConfigKnown --ztrim=4 --anaType=threshold`\r\n\r\nCalling:\r\n`ana_scans.py -h`\r\n\r\nShould clarify things.  All scans require option \"scandate1,\" analyzing threshold scans requires scandate2 (this takes the place of scandatetrim in anaAllChambersThresh.py and is more generically named).  In all cases scandate1 is the primary scandate.\r\n\r\nThis PR will depreciate:\r\n- anaAllChambers.py\r\n- anaAllChambersThresh.py\r\n\r\nFunctionality of these scripts is now present in ana_scans.py.  Suggest to remove \"anaAllChambers*.py\" to avoid clutter (will call \"git rm\" later).\r\n\r\nThis PR requires also:\r\n\r\nhttps://github.com/cms-gem-daq-project/gem-plotting-tools/pull/2","created_at":"2017-07-12T18:31:45Z","updated_at":"2017-07-18T08:49:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d43954eab17a93af18543b9d2210f242b337fbf2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100/commits","review_comments_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100/comments","review_comment_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/100/comments","statuses_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/statuses/fbff6e159894eba686d2392acdb0549642d8c842","head":{"label":"bdorney:develop","ref":"develop","sha":"fbff6e159894eba686d2392acdb0549642d8c842","user":{"login":"bdorney","id":6432141,"avatar_url":"https://avatars0.githubusercontent.com/u/6432141?v=4","gravatar_id":"","url":"https://api.github.com/users/bdorney","html_url":"https://github.com/bdorney","followers_url":"https://api.github.com/users/bdorney/followers","following_url":"https://api.github.com/users/bdorney/following{/other_user}","gists_url":"https://api.github.com/users/bdorney/gists{/gist_id}","starred_url":"https://api.github.com/users/bdorney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdorney/subscriptions","organizations_url":"https://api.github.com/users/bdorney/orgs","repos_url":"https://api.github.com/users/bdorney/repos","events_url":"https://api.github.com/users/bdorney/events{/privacy}","received_events_url":"https://api.github.com/users/bdorney/received_events","type":"User","site_admin":false},"repo":{"id":73500748,"name":"vfatqc-python-scripts","full_name":"bdorney/vfatqc-python-scripts","owner":{"login":"bdorney","id":6432141,"avatar_url":"https://avatars0.githubusercontent.com/u/6432141?v=4","gravatar_id":"","url":"https://api.github.com/users/bdorney","html_url":"https://github.com/bdorney","followers_url":"https://api.github.com/users/bdorney/followers","following_url":"https://api.github.com/users/bdorney/following{/other_user}","gists_url":"https://api.github.com/users/bdorney/gists{/gist_id}","starred_url":"https://api.github.com/users/bdorney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdorney/subscriptions","organizations_url":"https://api.github.com/users/bdorney/orgs","repos_url":"https://api.github.com/users/bdorney/repos","events_url":"https://api.github.com/users/bdorney/events{/privacy}","received_events_url":"https://api.github.com/users/bdorney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bdorney/vfatqc-python-scripts","description":null,"fork":true,"url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts","forks_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/forks","keys_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/teams","hooks_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/hooks","issue_events_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/issues/events{/number}","events_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/events","assignees_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/assignees{/user}","branches_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/branches{/branch}","tags_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/tags","blobs_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/languages","stargazers_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/stargazers","contributors_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/contributors","subscribers_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/subscribers","subscription_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/subscription","commits_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/contents/{+path}","compare_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/merges","archive_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/downloads","issues_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/issues{/number}","pulls_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/labels{/name}","releases_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/releases{/id}","deployments_url":"https://api.github.com/repos/bdorney/vfatqc-python-scripts/deployments","created_at":"2016-11-11T18:16:19Z","updated_at":"2016-11-11T18:16:25Z","pushed_at":"2017-07-18T08:48:29Z","git_url":"git://github.com/bdorney/vfatqc-python-scripts.git","ssh_url":"git@github.com:bdorney/vfatqc-python-scripts.git","clone_url":"https://github.com/bdorney/vfatqc-python-scripts.git","svn_url":"https://github.com/bdorney/vfatqc-python-scripts","homepage":null,"size":22706,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"cms-gem-daq-project:master","ref":"master","sha":"36f0104c4366b665d2bfdcd86e9c02606327a9cd","user":{"login":"cms-gem-daq-project","id":9051054,"avatar_url":"https://avatars0.githubusercontent.com/u/9051054?v=4","gravatar_id":"","url":"https://api.github.com/users/cms-gem-daq-project","html_url":"https://github.com/cms-gem-daq-project","followers_url":"https://api.github.com/users/cms-gem-daq-project/followers","following_url":"https://api.github.com/users/cms-gem-daq-project/following{/other_user}","gists_url":"https://api.github.com/users/cms-gem-daq-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-gem-daq-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-gem-daq-project/subscriptions","organizations_url":"https://api.github.com/users/cms-gem-daq-project/orgs","repos_url":"https://api.github.com/users/cms-gem-daq-project/repos","events_url":"https://api.github.com/users/cms-gem-daq-project/events{/privacy}","received_events_url":"https://api.github.com/users/cms-gem-daq-project/received_events","type":"Organization","site_admin":false},"repo":{"id":58535542,"name":"vfatqc-python-scripts","full_name":"cms-gem-daq-project/vfatqc-python-scripts","owner":{"login":"cms-gem-daq-project","id":9051054,"avatar_url":"https://avatars0.githubusercontent.com/u/9051054?v=4","gravatar_id":"","url":"https://api.github.com/users/cms-gem-daq-project","html_url":"https://github.com/cms-gem-daq-project","followers_url":"https://api.github.com/users/cms-gem-daq-project/followers","following_url":"https://api.github.com/users/cms-gem-daq-project/following{/other_user}","gists_url":"https://api.github.com/users/cms-gem-daq-project/gists{/gist_id}","starred_url":"https://api.github.com/users/cms-gem-daq-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cms-gem-daq-project/subscriptions","organizations_url":"https://api.github.com/users/cms-gem-daq-project/orgs","repos_url":"https://api.github.com/users/cms-gem-daq-project/repos","events_url":"https://api.github.com/users/cms-gem-daq-project/events{/privacy}","received_events_url":"https://api.github.com/users/cms-gem-daq-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts","description":null,"fork":false,"url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts","forks_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/forks","keys_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/teams","hooks_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/hooks","issue_events_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/events{/number}","events_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/events","assignees_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/assignees{/user}","branches_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/branches{/branch}","tags_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/tags","blobs_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/languages","stargazers_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/stargazers","contributors_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/contributors","subscribers_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/subscribers","subscription_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/subscription","commits_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/contents/{+path}","compare_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/merges","archive_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/downloads","issues_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues{/number}","pulls_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/labels{/name}","releases_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/releases{/id}","deployments_url":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/deployments","created_at":"2016-05-11T10:27:58Z","updated_at":"2017-07-10T12:48:27Z","pushed_at":"2017-07-18T08:48:30Z","git_url":"git://github.com/cms-gem-daq-project/vfatqc-python-scripts.git","ssh_url":"git@github.com:cms-gem-daq-project/vfatqc-python-scripts.git","clone_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts.git","svn_url":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts","homepage":null,"size":22722,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":16,"forks":11,"open_issues":16,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100"},"html":{"href":"https://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/100"},"issue":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/100"},"comments":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/cms-gem-daq-project/vfatqc-python-scripts/statuses/fbff6e159894eba686d2392acdb0549642d8c842"}}}}
{"actor":{"display_login":"bdorney"}}