{"action":"created","comment":{"url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/comments/27253191","id":27253191,"diff_hunk":"@@ -0,0 +1,127 @@\n+# K-USGS Algorithm #\n+Algorithm Theoretical Basis for \"K-USGS\"\n+\n+E. Joshua Rigler &lt;[erigler@usgs.gov](mailto:erigler@usgs.gov)&gt;\n+\n+Edward A. McWhirter Jr. &lt;[emcwhirter@usgs.gov](mailto:emcwhirter@usgs.gov)&gt;\n+\n+\n+## Summary ##\n+\n+K-Indices are used as an approximate measure of magnetic activity at an\n+observatory over a 3-hour window. A scale is adopted for each observatory based\n+on the typical distribution of magnetic activity at that location. The scale is\n+divided into intervals that a translated to values 0 through 9.\n+\n+\n+## Background and Motivation ##\n+\n+The 3-hour K-Index was introduced by [Bartels (1939)](#bartels-1939) as a\n+measure of irregular and rapid storm-time magnetic activity. This same process\n+was defined in detail by [Mayaud (1957)](#mayaud-1957). It was designed to be\n+insensitive to longer term components of magnetic variation and to normalize the\n+occurrence frequency of individual K values among many observatories, over many\n+years. Thus, with this method, there is a separate K-Index for each observatory.\n+It has come to be used much more generally as a measure of the magnetic activity\n+at an observatory at any given time, as opposed to just during magnetic storms.\n+\n+The K-USGS algorithm differs from other K-Indices algorithms in one regard. A\n+non-K variation curve is calculated for each day instead of using the typical\n+Solar Quiet (SQ) algorithm as an input, which means that K-USGS can be\n+calculated with just the raw time-series data as inputs.\n+\n+The USGS has been producing digital K-Indices since 1979. The K-USGS algorithm\n+was one of many written to attempt to simulate the previously used hand-scaled\n+process as closely as possible, and was one of the four to be officially\n+accepted by an IAGA Working Group V during the Vienna IUGG General Assembly in\n+1991. This method is described in \"[Wilson (1987)](#wilson-1987). The algorithm\n+was tested and found acceptable in 1990 using IAGA WG-5 data. It was tested\n+again in 2010 using a subset of USGS data, and was found to still be acceptable\n+for producing K-Indices.\n+\n+In general, the K-USGS algorithm consists of these steps:\n+ 1. Eliminate any 1-Minute Values and Mean Hourly Values that fall outside of\n+    acceptable statistical limits.\n+ 2. Create daily SR-curves for every day in the selected data window.\n+ 3. Remove the SR-curve to find the K variation of the data.","path":"docs/K-USGS.md","position":46,"original_position":46,"commit_id":"22abf119df4e4922986b20fefae29372748e1f4b","original_commit_id":"22abf119df4e4922986b20fefae29372748e1f4b","user":{"login":"hasimpson-usgs","id":4752380,"avatar_url":"https://avatars.githubusercontent.com/u/4752380?v=3","gravatar_id":"","url":"https://api.github.com/users/hasimpson-usgs","html_url":"https://github.com/hasimpson-usgs","followers_url":"https://api.github.com/users/hasimpson-usgs/followers","following_url":"https://api.github.com/users/hasimpson-usgs/following{/other_user}","gists_url":"https://api.github.com/users/hasimpson-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/hasimpson-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasimpson-usgs/subscriptions","organizations_url":"https://api.github.com/users/hasimpson-usgs/orgs","repos_url":"https://api.github.com/users/hasimpson-usgs/repos","events_url":"https://api.github.com/users/hasimpson-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/hasimpson-usgs/received_events","type":"User","site_admin":false},"body":"Can you put these in the comment section of github?\n\nOn Thu, Mar 26, 2015 at 2:33 PM, erigler-usgs <notifications@github.com>\nwrote:\n\n> In docs/K-USGS.md\n> <https://github.com/usgs/geomag-algorithms/pull/17#discussion_r27253046>:\n>\n> > +calculated with just the raw time-series data as inputs.\n> > +\n> > +The USGS has been producing digital K-Indices since 1979. The K-USGS algorithm\n> > +was one of many written to attempt to simulate the previously used hand-scaled\n> > +process as closely as possible, and was one of the four to be officially\n> > +accepted by an IAGA Working Group V during the Vienna IUGG General Assembly in\n> > +1991. This method is described in \"[Wilson (1987)](#wilson-1987). The algorithm\n> > +was tested and found acceptable in 1990 using IAGA WG-5 data. It was tested\n> > +again in 2010 using a subset of USGS data, and was found to still be acceptable\n> > +for producing K-Indices.\n> > +\n> > +In general, the K-USGS algorithm consists of these steps:\n> > + 1. Eliminate any 1-Minute Values and Mean Hourly Values that fall outside of\n> > +    acceptable statistical limits.\n> > + 2. Create daily SR-curves for every day in the selected data window.\n> > + 3. Remove the SR-curve to find the K variation of the data.\n>\n> Replace \"Remove\" with \"Subtract\" to avoid ambiguity.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/usgs/geomag-algorithms/pull/17/files#r27253046>.\n>\n\n\n\n-- \nHal Simpson\nIT Specialist\nUSGS Geomagnetism Program\nOffice:303-273-8459\nEmail:hasimpson@usgs.gov\n","created_at":"2015-03-26T20:35:06Z","updated_at":"2015-03-26T20:35:06Z","html_url":"https://github.com/usgs/geomag-algorithms/pull/17#discussion_r27253191","pull_request_url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/comments/27253191"},"html":{"href":"https://github.com/usgs/geomag-algorithms/pull/17#discussion_r27253191"},"pull_request":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17","id":32028129,"html_url":"https://github.com/usgs/geomag-algorithms/pull/17","diff_url":"https://github.com/usgs/geomag-algorithms/pull/17.diff","patch_url":"https://github.com/usgs/geomag-algorithms/pull/17.patch","issue_url":"https://api.github.com/repos/usgs/geomag-algorithms/issues/17","number":17,"state":"open","locked":false,"title":"K readme","user":{"login":"emcwhirter-usgs","id":3341360,"avatar_url":"https://avatars.githubusercontent.com/u/3341360?v=3","gravatar_id":"","url":"https://api.github.com/users/emcwhirter-usgs","html_url":"https://github.com/emcwhirter-usgs","followers_url":"https://api.github.com/users/emcwhirter-usgs/followers","following_url":"https://api.github.com/users/emcwhirter-usgs/following{/other_user}","gists_url":"https://api.github.com/users/emcwhirter-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/emcwhirter-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcwhirter-usgs/subscriptions","organizations_url":"https://api.github.com/users/emcwhirter-usgs/orgs","repos_url":"https://api.github.com/users/emcwhirter-usgs/repos","events_url":"https://api.github.com/users/emcwhirter-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/emcwhirter-usgs/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-26T15:25:05Z","updated_at":"2015-03-26T20:35:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1cbda2f11b16aca9efba389faa96365436cccb99","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17/commits","review_comments_url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17/comments","review_comment_url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/usgs/geomag-algorithms/issues/17/comments","statuses_url":"https://api.github.com/repos/usgs/geomag-algorithms/statuses/22abf119df4e4922986b20fefae29372748e1f4b","head":{"label":"emcwhirter-usgs:K-readme","ref":"K-readme","sha":"22abf119df4e4922986b20fefae29372748e1f4b","user":{"login":"emcwhirter-usgs","id":3341360,"avatar_url":"https://avatars.githubusercontent.com/u/3341360?v=3","gravatar_id":"","url":"https://api.github.com/users/emcwhirter-usgs","html_url":"https://github.com/emcwhirter-usgs","followers_url":"https://api.github.com/users/emcwhirter-usgs/followers","following_url":"https://api.github.com/users/emcwhirter-usgs/following{/other_user}","gists_url":"https://api.github.com/users/emcwhirter-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/emcwhirter-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcwhirter-usgs/subscriptions","organizations_url":"https://api.github.com/users/emcwhirter-usgs/orgs","repos_url":"https://api.github.com/users/emcwhirter-usgs/repos","events_url":"https://api.github.com/users/emcwhirter-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/emcwhirter-usgs/received_events","type":"User","site_admin":false},"repo":{"id":31607991,"name":"geomag-algorithms","full_name":"emcwhirter-usgs/geomag-algorithms","owner":{"login":"emcwhirter-usgs","id":3341360,"avatar_url":"https://avatars.githubusercontent.com/u/3341360?v=3","gravatar_id":"","url":"https://api.github.com/users/emcwhirter-usgs","html_url":"https://github.com/emcwhirter-usgs","followers_url":"https://api.github.com/users/emcwhirter-usgs/followers","following_url":"https://api.github.com/users/emcwhirter-usgs/following{/other_user}","gists_url":"https://api.github.com/users/emcwhirter-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/emcwhirter-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emcwhirter-usgs/subscriptions","organizations_url":"https://api.github.com/users/emcwhirter-usgs/orgs","repos_url":"https://api.github.com/users/emcwhirter-usgs/repos","events_url":"https://api.github.com/users/emcwhirter-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/emcwhirter-usgs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emcwhirter-usgs/geomag-algorithms","description":"","fork":true,"url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms","forks_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/forks","keys_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/teams","hooks_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/hooks","issue_events_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/events","assignees_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/tags","blobs_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/languages","stargazers_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/stargazers","contributors_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/contributors","subscribers_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/subscribers","subscription_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/subscription","commits_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/merges","archive_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/downloads","issues_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/labels{/name}","releases_url":"https://api.github.com/repos/emcwhirter-usgs/geomag-algorithms/releases{/id}","created_at":"2015-03-03T16:18:18Z","updated_at":"2015-03-03T16:18:19Z","pushed_at":"2015-03-20T16:14:58Z","git_url":"git://github.com/emcwhirter-usgs/geomag-algorithms.git","ssh_url":"git@github.com:emcwhirter-usgs/geomag-algorithms.git","clone_url":"https://github.com/emcwhirter-usgs/geomag-algorithms.git","svn_url":"https://github.com/emcwhirter-usgs/geomag-algorithms","homepage":null,"size":2598,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"usgs:master","ref":"master","sha":"1657d235970632b3692b8e653f87bfc0fb190ac5","user":{"login":"usgs","id":1091434,"avatar_url":"https://avatars.githubusercontent.com/u/1091434?v=3","gravatar_id":"","url":"https://api.github.com/users/usgs","html_url":"https://github.com/usgs","followers_url":"https://api.github.com/users/usgs/followers","following_url":"https://api.github.com/users/usgs/following{/other_user}","gists_url":"https://api.github.com/users/usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usgs/subscriptions","organizations_url":"https://api.github.com/users/usgs/orgs","repos_url":"https://api.github.com/users/usgs/repos","events_url":"https://api.github.com/users/usgs/events{/privacy}","received_events_url":"https://api.github.com/users/usgs/received_events","type":"Organization","site_admin":false},"repo":{"id":24066826,"name":"geomag-algorithms","full_name":"usgs/geomag-algorithms","owner":{"login":"usgs","id":1091434,"avatar_url":"https://avatars.githubusercontent.com/u/1091434?v=3","gravatar_id":"","url":"https://api.github.com/users/usgs","html_url":"https://github.com/usgs","followers_url":"https://api.github.com/users/usgs/followers","following_url":"https://api.github.com/users/usgs/following{/other_user}","gists_url":"https://api.github.com/users/usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usgs/subscriptions","organizations_url":"https://api.github.com/users/usgs/orgs","repos_url":"https://api.github.com/users/usgs/repos","events_url":"https://api.github.com/users/usgs/events{/privacy}","received_events_url":"https://api.github.com/users/usgs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/usgs/geomag-algorithms","description":"","fork":false,"url":"https://api.github.com/repos/usgs/geomag-algorithms","forks_url":"https://api.github.com/repos/usgs/geomag-algorithms/forks","keys_url":"https://api.github.com/repos/usgs/geomag-algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/usgs/geomag-algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/usgs/geomag-algorithms/teams","hooks_url":"https://api.github.com/repos/usgs/geomag-algorithms/hooks","issue_events_url":"https://api.github.com/repos/usgs/geomag-algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/usgs/geomag-algorithms/events","assignees_url":"https://api.github.com/repos/usgs/geomag-algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/usgs/geomag-algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/usgs/geomag-algorithms/tags","blobs_url":"https://api.github.com/repos/usgs/geomag-algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/usgs/geomag-algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/usgs/geomag-algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/usgs/geomag-algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/usgs/geomag-algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/usgs/geomag-algorithms/languages","stargazers_url":"https://api.github.com/repos/usgs/geomag-algorithms/stargazers","contributors_url":"https://api.github.com/repos/usgs/geomag-algorithms/contributors","subscribers_url":"https://api.github.com/repos/usgs/geomag-algorithms/subscribers","subscription_url":"https://api.github.com/repos/usgs/geomag-algorithms/subscription","commits_url":"https://api.github.com/repos/usgs/geomag-algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/usgs/geomag-algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/usgs/geomag-algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/usgs/geomag-algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/usgs/geomag-algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/usgs/geomag-algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/usgs/geomag-algorithms/merges","archive_url":"https://api.github.com/repos/usgs/geomag-algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/usgs/geomag-algorithms/downloads","issues_url":"https://api.github.com/repos/usgs/geomag-algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/usgs/geomag-algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/usgs/geomag-algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/usgs/geomag-algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/usgs/geomag-algorithms/labels{/name}","releases_url":"https://api.github.com/repos/usgs/geomag-algorithms/releases{/id}","created_at":"2014-09-15T17:53:56Z","updated_at":"2015-03-18T19:40:37Z","pushed_at":"2015-03-26T15:25:05Z","git_url":"git://github.com/usgs/geomag-algorithms.git","ssh_url":"git@github.com:usgs/geomag-algorithms.git","clone_url":"https://github.com/usgs/geomag-algorithms.git","svn_url":"https://github.com/usgs/geomag-algorithms","homepage":null,"size":2930,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":6,"forks":4,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17"},"html":{"href":"https://github.com/usgs/geomag-algorithms/pull/17"},"issue":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/issues/17"},"comments":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/usgs/geomag-algorithms/statuses/22abf119df4e4922986b20fefae29372748e1f4b"}}}}