{"action":"created","comment":{"url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/comments/226969337","pull_request_review_id":166902417,"id":226969337,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjk2OTMzNw==","diff_hunk":"@@ -0,0 +1,376 @@\n+#!/bin/env python\n+\"\"\"\n+    Script to analyze sbitreadout data\n+    By: Caterina Aruta (caterina.aruta@cern.ch) and Francesco Ivone (francesco.ivone@cern.ch)\n+    \"\"\"\n+if __name__ == '__main__':\n+    import ROOT as r","path":"anaSbitReadout.py","position":7,"original_position":7,"commit_id":"1a85e3f7766d2724e1ec18f65d74aed1e067c23e","original_commit_id":"1a85e3f7766d2724e1ec18f65d74aed1e067c23e","user":{"login":"bdorney","id":6432141,"node_id":"MDQ6VXNlcjY0MzIxNDE=","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":"Please address [this comment](\r\nhttps://github.com/cms-gem-daq-project/vfatqc-python-scripts/pull/208#discussion_r226918729) from @jsturdy ","created_at":"2018-10-22T12:19:36Z","updated_at":"2018-10-22T12:19:36Z","html_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/161#discussion_r226969337","pull_request_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/comments/226969337"},"html":{"href":"https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/161#discussion_r226969337"},"pull_request":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161","id":224650970,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NjUwOTcw","html_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/161","diff_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/161.diff","patch_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/161.patch","issue_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues/161","number":161,"state":"open","locked":false,"title":"Create anaSbitReadout.py","user":{"login":"fraivone","id":41416999,"node_id":"MDQ6VXNlcjQxNDE2OTk5","avatar_url":"https://avatars3.githubusercontent.com/u/41416999?v=4","gravatar_id":"","url":"https://api.github.com/users/fraivone","html_url":"https://github.com/fraivone","followers_url":"https://api.github.com/users/fraivone/followers","following_url":"https://api.github.com/users/fraivone/following{/other_user}","gists_url":"https://api.github.com/users/fraivone/gists{/gist_id}","starred_url":"https://api.github.com/users/fraivone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fraivone/subscriptions","organizations_url":"https://api.github.com/users/fraivone/orgs","repos_url":"https://api.github.com/users/fraivone/repos","events_url":"https://api.github.com/users/fraivone/events{/privacy}","received_events_url":"https://api.github.com/users/fraivone/received_events","type":"User","site_admin":false},"body":"This script unpacks and plots data acquired with sbitReadout.py. The outputs are saved in `inputfolder/sbitReadOut/`\r\n## IMPORTANT\r\n1. the function getMapping in `gempython/gemplotting/utils/anautilities` needs to be modified. At the moment it works with VFAT2 map, in which channel number starts from 1. In order to use the script, I modified getMapping in my virtual environment as suggested here https://mattermost.web.cern.ch/cms-gem-daq/pl/y6r6cqn1rbfa7m38iwn1hb9t5e\r\n5. in the folder `gempython/gemplotting/mapping/` there must be located the files named `shortChannelMap_VFAT3-HV3b-V1_VFAT3-HV3b-V2.txt` `longChannelMap_VFAT3-HV3b-V1_VFAT3-HV3b-V2.txt`, which are the outputs of Louis's pull request https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/134/files#diff-5a657d72aa6d1b867b7000684423a4b1\r\n### USAGE EXAMPLE\r\n```bash\r\nanaSbitReadout -i folder_containing_sbitReadout_outputs/ -t short\r\n```\r\n### FURTHER DEVELOPMENTS\r\n1. Default GEBType is long, so the user may run the script without specifying it  while working with a short GEB. This will cause a bad string <-> channel mapping\r\n2. The path to the .txt file with the channel <-> string mapping could be provided as input; it would be easier to use different mappings\r\n3. An option to mask noisy channel or whole vfat could be useful\r\n### KNOWN ISSUES\r\n* While loading the .dat file, ROOT returns this warning: \r\n```\r\nWarning in <TTree::ReadStream>: Couldn t read formatted data in \"evtNum/i:sbitClusterData0/i:sbitClusterData1/i:sbitClusterData2/i:sbitClusterData3/i:sbitClusterData4/i:sbitClusterData5/i:sbitClusterData6/i:sbitClusterData7/i\" for branch evtNum on line 1; ignoring line\r\n``` \r\nI think it's cause ROOT doesn't expect to find headers in the .dat files opened with the ReadFile function.  At the moment I don't know which is the simplest way to solve this (changing sbitReadout.py? changing the .dat files in this script?).\r\n* the parser is imported from `gempython/gemplotting/utils/anaoptions`, so it contains more options than actually implemented. This is a problem for the consistency of the help menu. At the moment I don't know how to show only the used options in the help menu\r\n\r\n### Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n### Screenshots (if appropriate):\r\nExample of output in case of a Cd109 source placed underneath VFAT7\r\n![immagine](https://user-images.githubusercontent.com/41416999/47267897-03a15100-d54a-11e8-949f-d87ed74743af.png)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [ ] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [ ] I have added tests to cover my changes.\r\n- [ ] All new and existing tests passed.\r\n\r\n<!--- Template thanks to https://www.talater.com/open-source-templates/#/page/99 -->\r\n","created_at":"2018-10-22T11:25:48Z","updated_at":"2018-10-22T12:19:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4bfb858074b84ff96464809934b4252fa2c9750","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161/commits","review_comments_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161/comments","review_comment_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues/161/comments","statuses_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/statuses/1a85e3f7766d2724e1ec18f65d74aed1e067c23e","head":{"label":"fraivone:patch-1","ref":"patch-1","sha":"1a85e3f7766d2724e1ec18f65d74aed1e067c23e","user":{"login":"fraivone","id":41416999,"node_id":"MDQ6VXNlcjQxNDE2OTk5","avatar_url":"https://avatars3.githubusercontent.com/u/41416999?v=4","gravatar_id":"","url":"https://api.github.com/users/fraivone","html_url":"https://github.com/fraivone","followers_url":"https://api.github.com/users/fraivone/followers","following_url":"https://api.github.com/users/fraivone/following{/other_user}","gists_url":"https://api.github.com/users/fraivone/gists{/gist_id}","starred_url":"https://api.github.com/users/fraivone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fraivone/subscriptions","organizations_url":"https://api.github.com/users/fraivone/orgs","repos_url":"https://api.github.com/users/fraivone/repos","events_url":"https://api.github.com/users/fraivone/events{/privacy}","received_events_url":"https://api.github.com/users/fraivone/received_events","type":"User","site_admin":false},"repo":{"id":154102987,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQxMDI5ODc=","name":"gem-plotting-tools","full_name":"fraivone/gem-plotting-tools","private":false,"owner":{"login":"fraivone","id":41416999,"node_id":"MDQ6VXNlcjQxNDE2OTk5","avatar_url":"https://avatars3.githubusercontent.com/u/41416999?v=4","gravatar_id":"","url":"https://api.github.com/users/fraivone","html_url":"https://github.com/fraivone","followers_url":"https://api.github.com/users/fraivone/followers","following_url":"https://api.github.com/users/fraivone/following{/other_user}","gists_url":"https://api.github.com/users/fraivone/gists{/gist_id}","starred_url":"https://api.github.com/users/fraivone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fraivone/subscriptions","organizations_url":"https://api.github.com/users/fraivone/orgs","repos_url":"https://api.github.com/users/fraivone/repos","events_url":"https://api.github.com/users/fraivone/events{/privacy}","received_events_url":"https://api.github.com/users/fraivone/received_events","type":"User","site_admin":false},"html_url":"https://github.com/fraivone/gem-plotting-tools","description":"Repository for GEM commissioning plotting tools","fork":true,"url":"https://api.github.com/repos/fraivone/gem-plotting-tools","forks_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/forks","keys_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/teams","hooks_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/hooks","issue_events_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/issues/events{/number}","events_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/events","assignees_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/assignees{/user}","branches_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/branches{/branch}","tags_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/tags","blobs_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/languages","stargazers_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/stargazers","contributors_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/contributors","subscribers_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/subscribers","subscription_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/subscription","commits_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/contents/{+path}","compare_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/merges","archive_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/downloads","issues_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/issues{/number}","pulls_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/labels{/name}","releases_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/releases{/id}","deployments_url":"https://api.github.com/repos/fraivone/gem-plotting-tools/deployments","created_at":"2018-10-22T07:29:05Z","updated_at":"2018-10-22T07:29:15Z","pushed_at":"2018-10-22T11:13:03Z","git_url":"git://github.com/fraivone/gem-plotting-tools.git","ssh_url":"git@github.com:fraivone/gem-plotting-tools.git","clone_url":"https://github.com/fraivone/gem-plotting-tools.git","svn_url":"https://github.com/fraivone/gem-plotting-tools","homepage":null,"size":955,"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,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"cms-gem-daq-project:develop","ref":"develop","sha":"44030d02e019c065e0e9cec140f77740b65c9692","user":{"login":"cms-gem-daq-project","id":9051054,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwNTEwNTQ=","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":92520679,"node_id":"MDEwOlJlcG9zaXRvcnk5MjUyMDY3OQ==","name":"gem-plotting-tools","full_name":"cms-gem-daq-project/gem-plotting-tools","private":false,"owner":{"login":"cms-gem-daq-project","id":9051054,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwNTEwNTQ=","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},"html_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools","description":"Repository for GEM commissioning plotting tools","fork":false,"url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools","forks_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/forks","keys_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/teams","hooks_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/hooks","issue_events_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues/events{/number}","events_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/events","assignees_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/assignees{/user}","branches_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/branches{/branch}","tags_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/tags","blobs_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/languages","stargazers_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/stargazers","contributors_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/contributors","subscribers_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/subscribers","subscription_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/subscription","commits_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/contents/{+path}","compare_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/merges","archive_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/downloads","issues_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues{/number}","pulls_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/labels{/name}","releases_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/releases{/id}","deployments_url":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/deployments","created_at":"2017-05-26T14:50:06Z","updated_at":"2018-10-19T14:24:04Z","pushed_at":"2018-10-22T11:25:49Z","git_url":"git://github.com/cms-gem-daq-project/gem-plotting-tools.git","ssh_url":"git@github.com:cms-gem-daq-project/gem-plotting-tools.git","clone_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools.git","svn_url":"https://github.com/cms-gem-daq-project/gem-plotting-tools","homepage":null,"size":955,"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":14,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":14,"open_issues":18,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161"},"html":{"href":"https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/161"},"issue":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues/161"},"comments":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/cms-gem-daq-project/gem-plotting-tools/statuses/1a85e3f7766d2724e1ec18f65d74aed1e067c23e"}},"author_association":"NONE"}}
{"actor":{"display_login":"bdorney"}}