{"action":"created","comment":{"url":"https://api.github.com/repos/project8/katydid/pulls/comments/192515972","pull_request_review_id":125315699,"id":192515972,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjUxNTk3Mg==","diff_hunk":"@@ -0,0 +1,126 @@\n+/*\n+ * KTSequentialLineData.cc\n+ *\n+ *  Created on: Mar 10, 2016\n+ *      Author: Christine\n+ */\n+\n+#include <KTSequentialLineData.hh>\n+\n+#include \"KTLogger.hh\"\n+\n+#include <iostream>\n+#include <cmath>\n+#include <algorithm>\n+\n+namespace Katydid\n+{\n+    const std::string KTSequentialLineData::sName(\"sequential-line\");\n+\tKTLOGGER(seqlog, \"KTSeqLine\");\n+\n+    KTSequentialLineData::KTSequentialLineData():\n+        fStartTimeInRunC(0.0),\n+        fStartTimeInAcq(0.0),\n+        fEndTimeInRunC(0.0),\n+        fEndTimeInAcq(0.0),\n+        fStartFrequency(0.0),\n+        fEndFrequency(0.0),\n+        fInitialSlope(0.0),\n+        fSlope(0.0),\n+        fNPoints(0),\n+        fComponent(0),\n+        fAmplitudeSum(0.0),\n+        fSNRSum(0.0),\n+        fNUPSum(0.0),\n+        fAcquisitionID(0),\n+        fCandidateID(0),\n+        fMinPoints(0),\n+        fStartFrequencySigma(0.),\n+        fEndFrequencySigma(0.),\n+        fSumX(0.),\n+        fSumY(0.),\n+        fSumXY(0.),\n+        fSumXX(0.)\n+        {}\n+\n+    KTSequentialLineData::~KTSequentialLineData()\n+    {}\n+\n+    void KTSequentialLineData::AddPoint( const KTDiscriminatedPoint& point )\n+    {\n+        fAmplitudeList.push_back(point.fNeighborhoodAmplitude);\n+        fSNRList.push_back(point.fNeighborhoodAmplitude/point.fMean);\n+\n+        fLinePoints.insert(point);\n+        //KTINFO(seqlog, \"Adding point line \"<<fLinePoints.size());\n+        this->UpdateLineProperties();\n+    }\n+\n+    void KTSequentialLineData::LineSNRTrimming( const double& trimmingThreshold, const unsigned& minPoints )\n+    {\n+        //KTDEBUG( seqlog, \"Trimming line edges. Trimming SNR threshold is \"<<trimmingThreshold );\n+\n+        if ( !fSNRList.empty() )\n+        {\n+            while ( fSNRList.back() < trimmingThreshold and fNPoints >= minPoints )\n+            {\n+                KTDEBUG( seqlog, \"SNR is \"<<fSNRList.back() );\n+                fAmplitudeList.erase(fAmplitudeList.end() -1);\n+                fSNRList.erase(fSNRList.end() -1);\n+                fLinePoints.erase(*fLinePoints.rbegin());\n+                fNPoints = fLinePoints.size();\n+            }\n+            while ( fSNRList.front() < trimmingThreshold and fNPoints >= minPoints )\n+            {\n+                KTDEBUG( seqlog, \"SNR is \"<<fSNRList.back() );\n+                fAmplitudeList.erase(fAmplitudeList.begin());\n+                fSNRList.erase(fSNRList.begin());\n+                fLinePoints.erase(*fLinePoints.begin());\n+                fNPoints = fLinePoints.size();\n+            }\n+        }\n+        SetStartTimeInRunC( fLinePoints.begin()->fTimeInRunC);\n+        SetStartFrequency( fLinePoints.begin()->fFrequency);\n+        SetStartTimeInAcq( fLinePoints.begin()->fTimeInAcq);\n+\n+        fAmplitudeSum = 0.;\n+        fSNRSum = 0;\n+        fNUPSum = 0;\n+\n+        for(KTDiscriminatedPoints::iterator pointIt = fLinePoints.begin(); pointIt != fLinePoints.end(); ++pointIt)\n+        {\n+            fAmplitudeSum += pointIt->fNeighborhoodAmplitude;\n+            fSNRSum += pointIt->fNeighborhoodAmplitude/pointIt->fMean;\n+            fNUPSum += ( pointIt->fNeighborhoodAmplitude - pointIt->fMean ) / sqrt( pointIt->fVariance );\n+        }\n+        SetEndTimeInRunC( fLinePoints.rbegin()->fTimeInRunC);\n+        SetEndTimeInAcq( fLinePoints.rbegin()->fTimeInAcq);\n+        SetEndFrequency( fLinePoints.rbegin()->fFrequency);\n+    }\n+\n+\n+    inline void KTSequentialLineData::UpdateLineProperties()\n+    {\n+        //KTDEBUG(seqlog, \"Updating line parameters\");\n+        SetNPoints( fLinePoints.size() );\n+        if ( fNPoints == 1 )","path":"Source/Data/SpectrumAnalysis/KTSequentialLineData.cc","position":106,"original_position":106,"commit_id":"759f59990350c3268164d7697f67d8f0d70b99a2","original_commit_id":"759f59990350c3268164d7697f67d8f0d70b99a2","user":{"login":"guiguem","id":16764756,"node_id":"MDQ6VXNlcjE2NzY0NzU2","avatar_url":"https://avatars0.githubusercontent.com/u/16764756?v=4","gravatar_id":"","url":"https://api.github.com/users/guiguem","html_url":"https://github.com/guiguem","followers_url":"https://api.github.com/users/guiguem/followers","following_url":"https://api.github.com/users/guiguem/following{/other_user}","gists_url":"https://api.github.com/users/guiguem/gists{/gist_id}","starred_url":"https://api.github.com/users/guiguem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guiguem/subscriptions","organizations_url":"https://api.github.com/users/guiguem/orgs","repos_url":"https://api.github.com/users/guiguem/repos","events_url":"https://api.github.com/users/guiguem/events{/privacy}","received_events_url":"https://api.github.com/users/guiguem/received_events","type":"User","site_admin":false},"body":"Why two cases here for the same action?","created_at":"2018-06-01T21:07:42Z","updated_at":"2018-06-01T21:43:10Z","html_url":"https://github.com/project8/katydid/pull/146#discussion_r192515972","pull_request_url":"https://api.github.com/repos/project8/katydid/pulls/146","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/project8/katydid/pulls/comments/192515972"},"html":{"href":"https://github.com/project8/katydid/pull/146#discussion_r192515972"},"pull_request":{"href":"https://api.github.com/repos/project8/katydid/pulls/146"}}},"pull_request":{"url":"https://api.github.com/repos/project8/katydid/pulls/146","id":191900094,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxOTAwMDk0","html_url":"https://github.com/project8/katydid/pull/146","diff_url":"https://github.com/project8/katydid/pull/146.diff","patch_url":"https://github.com/project8/katydid/pull/146.patch","issue_url":"https://api.github.com/repos/project8/katydid/issues/146","number":146,"state":"open","locked":false,"title":"Feature/new track properties","user":{"login":"cclaessens","id":16554883,"node_id":"MDQ6VXNlcjE2NTU0ODgz","avatar_url":"https://avatars3.githubusercontent.com/u/16554883?v=4","gravatar_id":"","url":"https://api.github.com/users/cclaessens","html_url":"https://github.com/cclaessens","followers_url":"https://api.github.com/users/cclaessens/followers","following_url":"https://api.github.com/users/cclaessens/following{/other_user}","gists_url":"https://api.github.com/users/cclaessens/gists{/gist_id}","starred_url":"https://api.github.com/users/cclaessens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cclaessens/subscriptions","organizations_url":"https://api.github.com/users/cclaessens/orgs","repos_url":"https://api.github.com/users/cclaessens/repos","events_url":"https://api.github.com/users/cclaessens/events{/privacy}","received_events_url":"https://api.github.com/users/cclaessens/received_events","type":"User","site_admin":false},"body":"This will solve the issues #134 #130 #138\r\n\r\nRegarding issue #135:\r\nI did not remove the slot that takes discriminated points and the power spectrum slice to sum over adjacent bins. Instead I added a second slot that only takes discriminated points.\r\n\r\nTested with TestSequentialTrackFinder.cc","created_at":"2018-05-31T23:35:35Z","updated_at":"2018-06-01T21:43:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b18a9d4b92cc2fdc474bc7603c878958f1fbef19","assignee":null,"assignees":[],"requested_reviewers":[{"login":"nsoblath","id":829991,"node_id":"MDQ6VXNlcjgyOTk5MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/829991?v=4","gravatar_id":"","url":"https://api.github.com/users/nsoblath","html_url":"https://github.com/nsoblath","followers_url":"https://api.github.com/users/nsoblath/followers","following_url":"https://api.github.com/users/nsoblath/following{/other_user}","gists_url":"https://api.github.com/users/nsoblath/gists{/gist_id}","starred_url":"https://api.github.com/users/nsoblath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsoblath/subscriptions","organizations_url":"https://api.github.com/users/nsoblath/orgs","repos_url":"https://api.github.com/users/nsoblath/repos","events_url":"https://api.github.com/users/nsoblath/events{/privacy}","received_events_url":"https://api.github.com/users/nsoblath/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/project8/katydid/pulls/146/commits","review_comments_url":"https://api.github.com/repos/project8/katydid/pulls/146/comments","review_comment_url":"https://api.github.com/repos/project8/katydid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project8/katydid/issues/146/comments","statuses_url":"https://api.github.com/repos/project8/katydid/statuses/759f59990350c3268164d7697f67d8f0d70b99a2","head":{"label":"project8:feature/new-track-properties","ref":"feature/new-track-properties","sha":"759f59990350c3268164d7697f67d8f0d70b99a2","user":{"login":"project8","id":664678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NDY3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/664678?v=4","gravatar_id":"","url":"https://api.github.com/users/project8","html_url":"https://github.com/project8","followers_url":"https://api.github.com/users/project8/followers","following_url":"https://api.github.com/users/project8/following{/other_user}","gists_url":"https://api.github.com/users/project8/gists{/gist_id}","starred_url":"https://api.github.com/users/project8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project8/subscriptions","organizations_url":"https://api.github.com/users/project8/orgs","repos_url":"https://api.github.com/users/project8/repos","events_url":"https://api.github.com/users/project8/events{/privacy}","received_events_url":"https://api.github.com/users/project8/received_events","type":"Organization","site_admin":false},"repo":{"id":2381397,"node_id":"MDEwOlJlcG9zaXRvcnkyMzgxMzk3","name":"katydid","full_name":"project8/katydid","owner":{"login":"project8","id":664678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NDY3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/664678?v=4","gravatar_id":"","url":"https://api.github.com/users/project8","html_url":"https://github.com/project8","followers_url":"https://api.github.com/users/project8/followers","following_url":"https://api.github.com/users/project8/following{/other_user}","gists_url":"https://api.github.com/users/project8/gists{/gist_id}","starred_url":"https://api.github.com/users/project8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project8/subscriptions","organizations_url":"https://api.github.com/users/project8/orgs","repos_url":"https://api.github.com/users/project8/repos","events_url":"https://api.github.com/users/project8/events{/privacy}","received_events_url":"https://api.github.com/users/project8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project8/katydid","description":"Project 8 data analysis package","fork":false,"url":"https://api.github.com/repos/project8/katydid","forks_url":"https://api.github.com/repos/project8/katydid/forks","keys_url":"https://api.github.com/repos/project8/katydid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project8/katydid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project8/katydid/teams","hooks_url":"https://api.github.com/repos/project8/katydid/hooks","issue_events_url":"https://api.github.com/repos/project8/katydid/issues/events{/number}","events_url":"https://api.github.com/repos/project8/katydid/events","assignees_url":"https://api.github.com/repos/project8/katydid/assignees{/user}","branches_url":"https://api.github.com/repos/project8/katydid/branches{/branch}","tags_url":"https://api.github.com/repos/project8/katydid/tags","blobs_url":"https://api.github.com/repos/project8/katydid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project8/katydid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project8/katydid/git/refs{/sha}","trees_url":"https://api.github.com/repos/project8/katydid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project8/katydid/statuses/{sha}","languages_url":"https://api.github.com/repos/project8/katydid/languages","stargazers_url":"https://api.github.com/repos/project8/katydid/stargazers","contributors_url":"https://api.github.com/repos/project8/katydid/contributors","subscribers_url":"https://api.github.com/repos/project8/katydid/subscribers","subscription_url":"https://api.github.com/repos/project8/katydid/subscription","commits_url":"https://api.github.com/repos/project8/katydid/commits{/sha}","git_commits_url":"https://api.github.com/repos/project8/katydid/git/commits{/sha}","comments_url":"https://api.github.com/repos/project8/katydid/comments{/number}","issue_comment_url":"https://api.github.com/repos/project8/katydid/issues/comments{/number}","contents_url":"https://api.github.com/repos/project8/katydid/contents/{+path}","compare_url":"https://api.github.com/repos/project8/katydid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project8/katydid/merges","archive_url":"https://api.github.com/repos/project8/katydid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project8/katydid/downloads","issues_url":"https://api.github.com/repos/project8/katydid/issues{/number}","pulls_url":"https://api.github.com/repos/project8/katydid/pulls{/number}","milestones_url":"https://api.github.com/repos/project8/katydid/milestones{/number}","notifications_url":"https://api.github.com/repos/project8/katydid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project8/katydid/labels{/name}","releases_url":"https://api.github.com/repos/project8/katydid/releases{/id}","deployments_url":"https://api.github.com/repos/project8/katydid/deployments","created_at":"2011-09-13T21:07:40Z","updated_at":"2018-05-31T17:24:38Z","pushed_at":"2018-06-01T21:30:08Z","git_url":"git://github.com/project8/katydid.git","ssh_url":"git@github.com:project8/katydid.git","clone_url":"https://github.com/project8/katydid.git","svn_url":"https://github.com/project8/katydid","homepage":"","size":104363,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":63,"watchers":3,"default_branch":"develop"}},"base":{"label":"project8:feature/trac_snr_and_nup_project","ref":"feature/trac_snr_and_nup_project","sha":"52dd2b1857ba5fafb8c9893e742de4ad29f45248","user":{"login":"project8","id":664678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NDY3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/664678?v=4","gravatar_id":"","url":"https://api.github.com/users/project8","html_url":"https://github.com/project8","followers_url":"https://api.github.com/users/project8/followers","following_url":"https://api.github.com/users/project8/following{/other_user}","gists_url":"https://api.github.com/users/project8/gists{/gist_id}","starred_url":"https://api.github.com/users/project8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project8/subscriptions","organizations_url":"https://api.github.com/users/project8/orgs","repos_url":"https://api.github.com/users/project8/repos","events_url":"https://api.github.com/users/project8/events{/privacy}","received_events_url":"https://api.github.com/users/project8/received_events","type":"Organization","site_admin":false},"repo":{"id":2381397,"node_id":"MDEwOlJlcG9zaXRvcnkyMzgxMzk3","name":"katydid","full_name":"project8/katydid","owner":{"login":"project8","id":664678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NDY3OA==","avatar_url":"https://avatars3.githubusercontent.com/u/664678?v=4","gravatar_id":"","url":"https://api.github.com/users/project8","html_url":"https://github.com/project8","followers_url":"https://api.github.com/users/project8/followers","following_url":"https://api.github.com/users/project8/following{/other_user}","gists_url":"https://api.github.com/users/project8/gists{/gist_id}","starred_url":"https://api.github.com/users/project8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project8/subscriptions","organizations_url":"https://api.github.com/users/project8/orgs","repos_url":"https://api.github.com/users/project8/repos","events_url":"https://api.github.com/users/project8/events{/privacy}","received_events_url":"https://api.github.com/users/project8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project8/katydid","description":"Project 8 data analysis package","fork":false,"url":"https://api.github.com/repos/project8/katydid","forks_url":"https://api.github.com/repos/project8/katydid/forks","keys_url":"https://api.github.com/repos/project8/katydid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project8/katydid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project8/katydid/teams","hooks_url":"https://api.github.com/repos/project8/katydid/hooks","issue_events_url":"https://api.github.com/repos/project8/katydid/issues/events{/number}","events_url":"https://api.github.com/repos/project8/katydid/events","assignees_url":"https://api.github.com/repos/project8/katydid/assignees{/user}","branches_url":"https://api.github.com/repos/project8/katydid/branches{/branch}","tags_url":"https://api.github.com/repos/project8/katydid/tags","blobs_url":"https://api.github.com/repos/project8/katydid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project8/katydid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project8/katydid/git/refs{/sha}","trees_url":"https://api.github.com/repos/project8/katydid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project8/katydid/statuses/{sha}","languages_url":"https://api.github.com/repos/project8/katydid/languages","stargazers_url":"https://api.github.com/repos/project8/katydid/stargazers","contributors_url":"https://api.github.com/repos/project8/katydid/contributors","subscribers_url":"https://api.github.com/repos/project8/katydid/subscribers","subscription_url":"https://api.github.com/repos/project8/katydid/subscription","commits_url":"https://api.github.com/repos/project8/katydid/commits{/sha}","git_commits_url":"https://api.github.com/repos/project8/katydid/git/commits{/sha}","comments_url":"https://api.github.com/repos/project8/katydid/comments{/number}","issue_comment_url":"https://api.github.com/repos/project8/katydid/issues/comments{/number}","contents_url":"https://api.github.com/repos/project8/katydid/contents/{+path}","compare_url":"https://api.github.com/repos/project8/katydid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project8/katydid/merges","archive_url":"https://api.github.com/repos/project8/katydid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project8/katydid/downloads","issues_url":"https://api.github.com/repos/project8/katydid/issues{/number}","pulls_url":"https://api.github.com/repos/project8/katydid/pulls{/number}","milestones_url":"https://api.github.com/repos/project8/katydid/milestones{/number}","notifications_url":"https://api.github.com/repos/project8/katydid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project8/katydid/labels{/name}","releases_url":"https://api.github.com/repos/project8/katydid/releases{/id}","deployments_url":"https://api.github.com/repos/project8/katydid/deployments","created_at":"2011-09-13T21:07:40Z","updated_at":"2018-05-31T17:24:38Z","pushed_at":"2018-06-01T21:30:08Z","git_url":"git://github.com/project8/katydid.git","ssh_url":"git@github.com:project8/katydid.git","clone_url":"https://github.com/project8/katydid.git","svn_url":"https://github.com/project8/katydid","homepage":"","size":104363,"stargazers_count":3,"watchers_count":3,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":63,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":63,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/project8/katydid/pulls/146"},"html":{"href":"https://github.com/project8/katydid/pull/146"},"issue":{"href":"https://api.github.com/repos/project8/katydid/issues/146"},"comments":{"href":"https://api.github.com/repos/project8/katydid/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/project8/katydid/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/project8/katydid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project8/katydid/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/project8/katydid/statuses/759f59990350c3268164d7697f67d8f0d70b99a2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"guiguem"}}