{"action":"created","comment":{"url":"https://api.github.com/repos/chemfiles/cfiles/pulls/comments/115507202","pull_request_review_id":37048323,"id":115507202,"diff_hunk":"@@ -80,9 +108,69 @@ Averager<double> DensityProfile::setup(int argc, const char* argv[]) {\n \n     AveCommand::parse_options(args);\n \n-    options_.npoints = string2long(args.at(\"--points\").asString());\n-    options_.selection = args.at(\"--selection\").asString();\n+    n_axis_ = 0;\n \n+    if (args.at(\"--axis\")) {\n+        if (args.at(\"--axis\").asStringList().size() == 0) {\n+        } else if (args.at(\"--axis\").asStringList().size() == 1) {\n+            n_axis_ ++;\n+            axis_x_ = axis_parse(args.at(\"--axis\").asStringList()[0]);\n+            options_.type_profile[n_axis_ - 1] = 1;\n+        } else if (args.at(\"--axis\").asStringList().size() == 2) {\n+            n_axis_ ++;\n+            options_.type_profile[n_axis_ - 1] = 1;\n+            axis_x_ = axis_parse(args.at(\"--axis\").asStringList()[0]);\n+            n_axis_ ++;\n+            options_.type_profile[n_axis_ - 1] = 1;\n+            axis_y_ = axis_parse(args.at(\"--axis\").asStringList()[1]);\n+        } else {\n+            throw CFilesError(\"Too many axis were given\");\n+        }\n+    }\n+\n+    if (args.at(\"--radial\")) {\n+        if (args.at(\"--radial\").asStringList().size() == 0) {\n+        } else if (args.at(\"--radial\").asStringList().size() == 1) {\n+            n_axis_ ++;\n+            if (n_axis_ == 1) {\n+                axis_x_ = axis_parse(args.at(\"--radial\").asStringList()[0]);\n+            } else if (n_axis_ == 2) {\n+                axis_y_ = axis_parse(args.at(\"--radial\").asStringList()[0]);\n+            } else { \n+                throw CFilesError(\"Too many axis were given\");\n+            }\n+            options_.type_profile[n_axis_ - 1] = 2;\n+        } else if (args.at(\"--radial\").asStringList().size() == 2) {\n+            if (n_axis_ == 2) {\n+                throw CFilesError(\"Too many axis were given\");\n+            } else {\n+                n_axis_ ++;\n+                options_.type_profile[n_axis_ - 1] = 2;\n+                axis_x_ = axis_parse(args.at(\"--radial\").asStringList()[0]);\n+                n_axis_ ++;\n+                options_.type_profile[n_axis_ - 1] = 2;\n+                axis_y_ = axis_parse(args.at(\"--radial\").asStringList()[0]);\n+            }\n+        }\n+    }\n+","path":"src/commands/DensityProfile.cpp","position":138,"original_position":138,"commit_id":"577c767cc4870a727fdfe07f11b675636b430db3","original_commit_id":"577c767cc4870a727fdfe07f11b675636b430db3","user":{"login":"Luthaf","id":6141587,"avatar_url":"https://avatars1.githubusercontent.com/u/6141587?v=3","gravatar_id":"","url":"https://api.github.com/users/Luthaf","html_url":"https://github.com/Luthaf","followers_url":"https://api.github.com/users/Luthaf/followers","following_url":"https://api.github.com/users/Luthaf/following{/other_user}","gists_url":"https://api.github.com/users/Luthaf/gists{/gist_id}","starred_url":"https://api.github.com/users/Luthaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Luthaf/subscriptions","organizations_url":"https://api.github.com/users/Luthaf/orgs","repos_url":"https://api.github.com/users/Luthaf/repos","events_url":"https://api.github.com/users/Luthaf/events{/privacy}","received_events_url":"https://api.github.com/users/Luthaf/received_events","type":"User","site_admin":false},"body":"What happens if no `--axis` nor `--radial` argument are given? ","created_at":"2017-05-09T14:40:31Z","updated_at":"2017-05-09T14:49:25Z","html_url":"https://github.com/chemfiles/cfiles/pull/34#discussion_r115507202","pull_request_url":"https://api.github.com/repos/chemfiles/cfiles/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/chemfiles/cfiles/pulls/comments/115507202"},"html":{"href":"https://github.com/chemfiles/cfiles/pull/34#discussion_r115507202"},"pull_request":{"href":"https://api.github.com/repos/chemfiles/cfiles/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/chemfiles/cfiles/pulls/34","id":119639815,"html_url":"https://github.com/chemfiles/cfiles/pull/34","diff_url":"https://github.com/chemfiles/cfiles/pull/34.diff","patch_url":"https://github.com/chemfiles/cfiles/pull/34.patch","issue_url":"https://api.github.com/repos/chemfiles/cfiles/issues/34","number":34,"state":"open","locked":false,"title":"Density profiles 2D","user":{"login":"lscalfi","id":25686950,"avatar_url":"https://avatars2.githubusercontent.com/u/25686950?v=3","gravatar_id":"","url":"https://api.github.com/users/lscalfi","html_url":"https://github.com/lscalfi","followers_url":"https://api.github.com/users/lscalfi/followers","following_url":"https://api.github.com/users/lscalfi/following{/other_user}","gists_url":"https://api.github.com/users/lscalfi/gists{/gist_id}","starred_url":"https://api.github.com/users/lscalfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lscalfi/subscriptions","organizations_url":"https://api.github.com/users/lscalfi/orgs","repos_url":"https://api.github.com/users/lscalfi/repos","events_url":"https://api.github.com/users/lscalfi/events{/privacy}","received_events_url":"https://api.github.com/users/lscalfi/received_events","type":"User","site_admin":false},"body":"Generalisation of density command to do 2D plots (for example X,Y profiles or R,Z).","created_at":"2017-05-09T11:35:06Z","updated_at":"2017-05-09T14:49:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d58f0ae87b0afa3dae5871b7a6954aae465b8ce","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/chemfiles/cfiles/pulls/34/commits","review_comments_url":"https://api.github.com/repos/chemfiles/cfiles/pulls/34/comments","review_comment_url":"https://api.github.com/repos/chemfiles/cfiles/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chemfiles/cfiles/issues/34/comments","statuses_url":"https://api.github.com/repos/chemfiles/cfiles/statuses/577c767cc4870a727fdfe07f11b675636b430db3","head":{"label":"lscalfi:hist2D","ref":"hist2D","sha":"577c767cc4870a727fdfe07f11b675636b430db3","user":{"login":"lscalfi","id":25686950,"avatar_url":"https://avatars2.githubusercontent.com/u/25686950?v=3","gravatar_id":"","url":"https://api.github.com/users/lscalfi","html_url":"https://github.com/lscalfi","followers_url":"https://api.github.com/users/lscalfi/followers","following_url":"https://api.github.com/users/lscalfi/following{/other_user}","gists_url":"https://api.github.com/users/lscalfi/gists{/gist_id}","starred_url":"https://api.github.com/users/lscalfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lscalfi/subscriptions","organizations_url":"https://api.github.com/users/lscalfi/orgs","repos_url":"https://api.github.com/users/lscalfi/repos","events_url":"https://api.github.com/users/lscalfi/events{/privacy}","received_events_url":"https://api.github.com/users/lscalfi/received_events","type":"User","site_admin":false},"repo":{"id":86682056,"name":"cfiles","full_name":"lscalfi/cfiles","owner":{"login":"lscalfi","id":25686950,"avatar_url":"https://avatars2.githubusercontent.com/u/25686950?v=3","gravatar_id":"","url":"https://api.github.com/users/lscalfi","html_url":"https://github.com/lscalfi","followers_url":"https://api.github.com/users/lscalfi/followers","following_url":"https://api.github.com/users/lscalfi/following{/other_user}","gists_url":"https://api.github.com/users/lscalfi/gists{/gist_id}","starred_url":"https://api.github.com/users/lscalfi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lscalfi/subscriptions","organizations_url":"https://api.github.com/users/lscalfi/orgs","repos_url":"https://api.github.com/users/lscalfi/repos","events_url":"https://api.github.com/users/lscalfi/events{/privacy}","received_events_url":"https://api.github.com/users/lscalfi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lscalfi/cfiles","description":"Analysing trajectories with chemfiles","fork":true,"url":"https://api.github.com/repos/lscalfi/cfiles","forks_url":"https://api.github.com/repos/lscalfi/cfiles/forks","keys_url":"https://api.github.com/repos/lscalfi/cfiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lscalfi/cfiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lscalfi/cfiles/teams","hooks_url":"https://api.github.com/repos/lscalfi/cfiles/hooks","issue_events_url":"https://api.github.com/repos/lscalfi/cfiles/issues/events{/number}","events_url":"https://api.github.com/repos/lscalfi/cfiles/events","assignees_url":"https://api.github.com/repos/lscalfi/cfiles/assignees{/user}","branches_url":"https://api.github.com/repos/lscalfi/cfiles/branches{/branch}","tags_url":"https://api.github.com/repos/lscalfi/cfiles/tags","blobs_url":"https://api.github.com/repos/lscalfi/cfiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lscalfi/cfiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lscalfi/cfiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/lscalfi/cfiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lscalfi/cfiles/statuses/{sha}","languages_url":"https://api.github.com/repos/lscalfi/cfiles/languages","stargazers_url":"https://api.github.com/repos/lscalfi/cfiles/stargazers","contributors_url":"https://api.github.com/repos/lscalfi/cfiles/contributors","subscribers_url":"https://api.github.com/repos/lscalfi/cfiles/subscribers","subscription_url":"https://api.github.com/repos/lscalfi/cfiles/subscription","commits_url":"https://api.github.com/repos/lscalfi/cfiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/lscalfi/cfiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/lscalfi/cfiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/lscalfi/cfiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/lscalfi/cfiles/contents/{+path}","compare_url":"https://api.github.com/repos/lscalfi/cfiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lscalfi/cfiles/merges","archive_url":"https://api.github.com/repos/lscalfi/cfiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lscalfi/cfiles/downloads","issues_url":"https://api.github.com/repos/lscalfi/cfiles/issues{/number}","pulls_url":"https://api.github.com/repos/lscalfi/cfiles/pulls{/number}","milestones_url":"https://api.github.com/repos/lscalfi/cfiles/milestones{/number}","notifications_url":"https://api.github.com/repos/lscalfi/cfiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lscalfi/cfiles/labels{/name}","releases_url":"https://api.github.com/repos/lscalfi/cfiles/releases{/id}","deployments_url":"https://api.github.com/repos/lscalfi/cfiles/deployments","created_at":"2017-03-30T09:05:05Z","updated_at":"2017-03-30T09:05:06Z","pushed_at":"2017-05-09T13:40:31Z","git_url":"git://github.com/lscalfi/cfiles.git","ssh_url":"git@github.com:lscalfi/cfiles.git","clone_url":"https://github.com/lscalfi/cfiles.git","svn_url":"https://github.com/lscalfi/cfiles","homepage":"https://chemfiles.github.io/","size":758,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"chemfiles:master","ref":"master","sha":"8747a190dd3adef61ee812705380d9f96f7ad41a","user":{"login":"chemfiles","id":15002707,"avatar_url":"https://avatars1.githubusercontent.com/u/15002707?v=3","gravatar_id":"","url":"https://api.github.com/users/chemfiles","html_url":"https://github.com/chemfiles","followers_url":"https://api.github.com/users/chemfiles/followers","following_url":"https://api.github.com/users/chemfiles/following{/other_user}","gists_url":"https://api.github.com/users/chemfiles/gists{/gist_id}","starred_url":"https://api.github.com/users/chemfiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chemfiles/subscriptions","organizations_url":"https://api.github.com/users/chemfiles/orgs","repos_url":"https://api.github.com/users/chemfiles/repos","events_url":"https://api.github.com/users/chemfiles/events{/privacy}","received_events_url":"https://api.github.com/users/chemfiles/received_events","type":"Organization","site_admin":false},"repo":{"id":37726986,"name":"cfiles","full_name":"chemfiles/cfiles","owner":{"login":"chemfiles","id":15002707,"avatar_url":"https://avatars1.githubusercontent.com/u/15002707?v=3","gravatar_id":"","url":"https://api.github.com/users/chemfiles","html_url":"https://github.com/chemfiles","followers_url":"https://api.github.com/users/chemfiles/followers","following_url":"https://api.github.com/users/chemfiles/following{/other_user}","gists_url":"https://api.github.com/users/chemfiles/gists{/gist_id}","starred_url":"https://api.github.com/users/chemfiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chemfiles/subscriptions","organizations_url":"https://api.github.com/users/chemfiles/orgs","repos_url":"https://api.github.com/users/chemfiles/repos","events_url":"https://api.github.com/users/chemfiles/events{/privacy}","received_events_url":"https://api.github.com/users/chemfiles/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chemfiles/cfiles","description":"Analysing trajectories with chemfiles","fork":false,"url":"https://api.github.com/repos/chemfiles/cfiles","forks_url":"https://api.github.com/repos/chemfiles/cfiles/forks","keys_url":"https://api.github.com/repos/chemfiles/cfiles/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chemfiles/cfiles/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chemfiles/cfiles/teams","hooks_url":"https://api.github.com/repos/chemfiles/cfiles/hooks","issue_events_url":"https://api.github.com/repos/chemfiles/cfiles/issues/events{/number}","events_url":"https://api.github.com/repos/chemfiles/cfiles/events","assignees_url":"https://api.github.com/repos/chemfiles/cfiles/assignees{/user}","branches_url":"https://api.github.com/repos/chemfiles/cfiles/branches{/branch}","tags_url":"https://api.github.com/repos/chemfiles/cfiles/tags","blobs_url":"https://api.github.com/repos/chemfiles/cfiles/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chemfiles/cfiles/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chemfiles/cfiles/git/refs{/sha}","trees_url":"https://api.github.com/repos/chemfiles/cfiles/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chemfiles/cfiles/statuses/{sha}","languages_url":"https://api.github.com/repos/chemfiles/cfiles/languages","stargazers_url":"https://api.github.com/repos/chemfiles/cfiles/stargazers","contributors_url":"https://api.github.com/repos/chemfiles/cfiles/contributors","subscribers_url":"https://api.github.com/repos/chemfiles/cfiles/subscribers","subscription_url":"https://api.github.com/repos/chemfiles/cfiles/subscription","commits_url":"https://api.github.com/repos/chemfiles/cfiles/commits{/sha}","git_commits_url":"https://api.github.com/repos/chemfiles/cfiles/git/commits{/sha}","comments_url":"https://api.github.com/repos/chemfiles/cfiles/comments{/number}","issue_comment_url":"https://api.github.com/repos/chemfiles/cfiles/issues/comments{/number}","contents_url":"https://api.github.com/repos/chemfiles/cfiles/contents/{+path}","compare_url":"https://api.github.com/repos/chemfiles/cfiles/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chemfiles/cfiles/merges","archive_url":"https://api.github.com/repos/chemfiles/cfiles/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chemfiles/cfiles/downloads","issues_url":"https://api.github.com/repos/chemfiles/cfiles/issues{/number}","pulls_url":"https://api.github.com/repos/chemfiles/cfiles/pulls{/number}","milestones_url":"https://api.github.com/repos/chemfiles/cfiles/milestones{/number}","notifications_url":"https://api.github.com/repos/chemfiles/cfiles/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chemfiles/cfiles/labels{/name}","releases_url":"https://api.github.com/repos/chemfiles/cfiles/releases{/id}","deployments_url":"https://api.github.com/repos/chemfiles/cfiles/deployments","created_at":"2015-06-19T14:41:20Z","updated_at":"2017-05-06T14:35:36Z","pushed_at":"2017-05-09T13:40:33Z","git_url":"git://github.com/chemfiles/cfiles.git","ssh_url":"git@github.com:chemfiles/cfiles.git","clone_url":"https://github.com/chemfiles/cfiles.git","svn_url":"https://github.com/chemfiles/cfiles","homepage":"https://chemfiles.org/","size":758,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chemfiles/cfiles/pulls/34"},"html":{"href":"https://github.com/chemfiles/cfiles/pull/34"},"issue":{"href":"https://api.github.com/repos/chemfiles/cfiles/issues/34"},"comments":{"href":"https://api.github.com/repos/chemfiles/cfiles/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/chemfiles/cfiles/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/chemfiles/cfiles/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chemfiles/cfiles/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/chemfiles/cfiles/statuses/577c767cc4870a727fdfe07f11b675636b430db3"}}}}
{"actor":{"display_login":"Luthaf"}}