{"action":"created","comment":{"url":"https://api.github.com/repos/obspy/obspy/pulls/comments/67603638","id":67603638,"diff_hunk":"@@ -0,0 +1,146 @@\n+# -*- coding: utf-8 -*-\n+# reads Guralp Compressed Format (GCF) Files\n+# By Ran Novitsky Nof @ BSL, 2016\n+# ran.nof@gmail.com\n+# Based on Guralp's GCF reference (GCF-RFC-GCFR, Issue C, 2011-01-05)\n+# more details available from: http://www.guralp.com/apps/ok?doc=GCF_Intro\n+# last access: June, 2016\n+from __future__ import (absolute_import, division, print_function,\n+                        unicode_literals)\n+from future.builtins import *  # NOQA\n+\n+import numpy as np\n+\n+from obspy import UTCDateTime\n+\n+sps_d = {  # Table 3.1: special sample rates\n+    157: 0.1,\n+    161: 0.125,\n+    162: 0.2,\n+    164: 0.25,\n+    167: 0.5,\n+    171: 400,\n+    174: 500,\n+    176: 1000,\n+    179: 2000,\n+    181: 4000}\n+time_offsets_d = {  # Table 3.1: Time fractional offset denominator\n+    171: 8.,\n+    174: 2.,\n+    176: 4.,\n+    179: 8.,\n+    181: 16.}\n+compression_d = {  # Table 3.2: format field to data type\n+    1: '>i4',\n+    2: '>i2',\n+    4: '>i1'}\n+bits_d = {  # Table 3.2: format field to data bytes\n+    1: 4,  # 32bits\n+    2: 2,  # 16bits\n+    4: 1}   # 8bits\n+\n+\n+def is_gcf(f):\n+    'Test if file is GCF by reading at least 1 data block'\n+    header, data = read_data_block(f)\n+\n+\n+def decode36(data):\n+    'Decode base 36 data'\n+    # http://geophysics.eas.gatech.edu/GTEQ/Scream4.4/Decoding_Base_36_numbers_C.htm\n+    s = ''\n+    while data:\n+        imed = data % 36\n+        if imed > 9:\n+            imed += 7\n+        s = chr(imed + 48) + s\n+        data = data / 36\n+    return s\n+\n+\n+def decode_date_time(data):\n+    '''Decode date and time field.\n+    The date code is a 32 bit value specifying the start time of the block.\n+    Bits 0-16 contain the number of seconds since midnight,\n+    and bits 17-31 the number of days since 17th November 1989.'''","path":"obspy/io/gcf/libgcf.py","position":65,"original_position":65,"commit_id":"437b9e9d27f756fd8686345b9ee003fe44c8949e","original_commit_id":"437b9e9d27f756fd8686345b9ee003fe44c8949e","user":{"login":"krischer","id":800487,"avatar_url":"https://avatars.githubusercontent.com/u/800487?v=3","gravatar_id":"","url":"https://api.github.com/users/krischer","html_url":"https://github.com/krischer","followers_url":"https://api.github.com/users/krischer/followers","following_url":"https://api.github.com/users/krischer/following{/other_user}","gists_url":"https://api.github.com/users/krischer/gists{/gist_id}","starred_url":"https://api.github.com/users/krischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krischer/subscriptions","organizations_url":"https://api.github.com/users/krischer/orgs","repos_url":"https://api.github.com/users/krischer/repos","events_url":"https://api.github.com/users/krischer/events{/privacy}","received_events_url":"https://api.github.com/users/krischer/received_events","type":"User","site_admin":false},"body":"Can you change all these docstrings to\r\n\r\n```python\r\ndef decode_date_time(...):\r\n    \"\"\"\r\n    ...\r\n    \"\"\"\r\n```\r\n\r\nwhich is consistent with the rest of ObsPy and also what you did in `core.py`.","created_at":"2016-06-18T17:11:56Z","updated_at":"2016-06-18T17:11:56Z","html_url":"https://github.com/obspy/obspy/pull/1449#discussion_r67603638","pull_request_url":"https://api.github.com/repos/obspy/obspy/pulls/1449","_links":{"self":{"href":"https://api.github.com/repos/obspy/obspy/pulls/comments/67603638"},"html":{"href":"https://github.com/obspy/obspy/pull/1449#discussion_r67603638"},"pull_request":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1449"}}},"pull_request":{"url":"https://api.github.com/repos/obspy/obspy/pulls/1449","id":73264698,"html_url":"https://github.com/obspy/obspy/pull/1449","diff_url":"https://github.com/obspy/obspy/pull/1449.diff","patch_url":"https://github.com/obspy/obspy/pull/1449.patch","issue_url":"https://api.github.com/repos/obspy/obspy/issues/1449","number":1449,"state":"open","locked":false,"title":"Add Güralp Compressed File (GCF) read support","user":{"login":"rannof","id":10617458,"avatar_url":"https://avatars.githubusercontent.com/u/10617458?v=3","gravatar_id":"","url":"https://api.github.com/users/rannof","html_url":"https://github.com/rannof","followers_url":"https://api.github.com/users/rannof/followers","following_url":"https://api.github.com/users/rannof/following{/other_user}","gists_url":"https://api.github.com/users/rannof/gists{/gist_id}","starred_url":"https://api.github.com/users/rannof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rannof/subscriptions","organizations_url":"https://api.github.com/users/rannof/orgs","repos_url":"https://api.github.com/users/rannof/repos","events_url":"https://api.github.com/users/rannof/events{/privacy}","received_events_url":"https://api.github.com/users/rannof/received_events","type":"User","site_admin":false},"body":"I think some changes should also be made to the core.base module, but I'm not sure exactly what.","created_at":"2016-06-09T18:41:33Z","updated_at":"2016-06-18T17:11:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7dbc38e95aba88c2a8052022df03190daabf23bd","assignee":null,"milestone":{"url":"https://api.github.com/repos/obspy/obspy/milestones/12","html_url":"https://github.com/obspy/obspy/milestones/1.1.0","labels_url":"https://api.github.com/repos/obspy/obspy/milestones/12/labels","id":1383698,"number":12,"title":"1.1.0","description":"","creator":{"login":"megies","id":1842780,"avatar_url":"https://avatars.githubusercontent.com/u/1842780?v=3","gravatar_id":"","url":"https://api.github.com/users/megies","html_url":"https://github.com/megies","followers_url":"https://api.github.com/users/megies/followers","following_url":"https://api.github.com/users/megies/following{/other_user}","gists_url":"https://api.github.com/users/megies/gists{/gist_id}","starred_url":"https://api.github.com/users/megies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megies/subscriptions","organizations_url":"https://api.github.com/users/megies/orgs","repos_url":"https://api.github.com/users/megies/repos","events_url":"https://api.github.com/users/megies/events{/privacy}","received_events_url":"https://api.github.com/users/megies/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":21,"state":"open","created_at":"2015-10-29T15:40:55Z","updated_at":"2016-06-16T09:18:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/obspy/obspy/pulls/1449/commits","review_comments_url":"https://api.github.com/repos/obspy/obspy/pulls/1449/comments","review_comment_url":"https://api.github.com/repos/obspy/obspy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/1449/comments","statuses_url":"https://api.github.com/repos/obspy/obspy/statuses/437b9e9d27f756fd8686345b9ee003fe44c8949e","head":{"label":"rannof:master","ref":"master","sha":"437b9e9d27f756fd8686345b9ee003fe44c8949e","user":{"login":"rannof","id":10617458,"avatar_url":"https://avatars.githubusercontent.com/u/10617458?v=3","gravatar_id":"","url":"https://api.github.com/users/rannof","html_url":"https://github.com/rannof","followers_url":"https://api.github.com/users/rannof/followers","following_url":"https://api.github.com/users/rannof/following{/other_user}","gists_url":"https://api.github.com/users/rannof/gists{/gist_id}","starred_url":"https://api.github.com/users/rannof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rannof/subscriptions","organizations_url":"https://api.github.com/users/rannof/orgs","repos_url":"https://api.github.com/users/rannof/repos","events_url":"https://api.github.com/users/rannof/events{/privacy}","received_events_url":"https://api.github.com/users/rannof/received_events","type":"User","site_admin":false},"repo":{"id":58757415,"name":"obspy","full_name":"rannof/obspy","owner":{"login":"rannof","id":10617458,"avatar_url":"https://avatars.githubusercontent.com/u/10617458?v=3","gravatar_id":"","url":"https://api.github.com/users/rannof","html_url":"https://github.com/rannof","followers_url":"https://api.github.com/users/rannof/followers","following_url":"https://api.github.com/users/rannof/following{/other_user}","gists_url":"https://api.github.com/users/rannof/gists{/gist_id}","starred_url":"https://api.github.com/users/rannof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rannof/subscriptions","organizations_url":"https://api.github.com/users/rannof/orgs","repos_url":"https://api.github.com/users/rannof/repos","events_url":"https://api.github.com/users/rannof/events{/privacy}","received_events_url":"https://api.github.com/users/rannof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rannof/obspy","description":"ObsPy: A Python Toolbox for seismology/seismological observatories.","fork":true,"url":"https://api.github.com/repos/rannof/obspy","forks_url":"https://api.github.com/repos/rannof/obspy/forks","keys_url":"https://api.github.com/repos/rannof/obspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rannof/obspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rannof/obspy/teams","hooks_url":"https://api.github.com/repos/rannof/obspy/hooks","issue_events_url":"https://api.github.com/repos/rannof/obspy/issues/events{/number}","events_url":"https://api.github.com/repos/rannof/obspy/events","assignees_url":"https://api.github.com/repos/rannof/obspy/assignees{/user}","branches_url":"https://api.github.com/repos/rannof/obspy/branches{/branch}","tags_url":"https://api.github.com/repos/rannof/obspy/tags","blobs_url":"https://api.github.com/repos/rannof/obspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rannof/obspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rannof/obspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rannof/obspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rannof/obspy/statuses/{sha}","languages_url":"https://api.github.com/repos/rannof/obspy/languages","stargazers_url":"https://api.github.com/repos/rannof/obspy/stargazers","contributors_url":"https://api.github.com/repos/rannof/obspy/contributors","subscribers_url":"https://api.github.com/repos/rannof/obspy/subscribers","subscription_url":"https://api.github.com/repos/rannof/obspy/subscription","commits_url":"https://api.github.com/repos/rannof/obspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rannof/obspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rannof/obspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rannof/obspy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rannof/obspy/contents/{+path}","compare_url":"https://api.github.com/repos/rannof/obspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rannof/obspy/merges","archive_url":"https://api.github.com/repos/rannof/obspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rannof/obspy/downloads","issues_url":"https://api.github.com/repos/rannof/obspy/issues{/number}","pulls_url":"https://api.github.com/repos/rannof/obspy/pulls{/number}","milestones_url":"https://api.github.com/repos/rannof/obspy/milestones{/number}","notifications_url":"https://api.github.com/repos/rannof/obspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rannof/obspy/labels{/name}","releases_url":"https://api.github.com/repos/rannof/obspy/releases{/id}","deployments_url":"https://api.github.com/repos/rannof/obspy/deployments","created_at":"2016-05-13T16:51:16Z","updated_at":"2016-05-13T16:51:23Z","pushed_at":"2016-06-18T16:58:43Z","git_url":"git://github.com/rannof/obspy.git","ssh_url":"git@github.com:rannof/obspy.git","clone_url":"https://github.com/rannof/obspy.git","svn_url":"https://github.com/rannof/obspy","homepage":"http://www.obspy.org","size":75920,"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":"obspy:master","ref":"master","sha":"105bcdc4a0fccc8190f503758e86c22b3ece84f0","user":{"login":"obspy","id":1701221,"avatar_url":"https://avatars.githubusercontent.com/u/1701221?v=3","gravatar_id":"","url":"https://api.github.com/users/obspy","html_url":"https://github.com/obspy","followers_url":"https://api.github.com/users/obspy/followers","following_url":"https://api.github.com/users/obspy/following{/other_user}","gists_url":"https://api.github.com/users/obspy/gists{/gist_id}","starred_url":"https://api.github.com/users/obspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obspy/subscriptions","organizations_url":"https://api.github.com/users/obspy/orgs","repos_url":"https://api.github.com/users/obspy/repos","events_url":"https://api.github.com/users/obspy/events{/privacy}","received_events_url":"https://api.github.com/users/obspy/received_events","type":"Organization","site_admin":false},"repo":{"id":5731348,"name":"obspy","full_name":"obspy/obspy","owner":{"login":"obspy","id":1701221,"avatar_url":"https://avatars.githubusercontent.com/u/1701221?v=3","gravatar_id":"","url":"https://api.github.com/users/obspy","html_url":"https://github.com/obspy","followers_url":"https://api.github.com/users/obspy/followers","following_url":"https://api.github.com/users/obspy/following{/other_user}","gists_url":"https://api.github.com/users/obspy/gists{/gist_id}","starred_url":"https://api.github.com/users/obspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obspy/subscriptions","organizations_url":"https://api.github.com/users/obspy/orgs","repos_url":"https://api.github.com/users/obspy/repos","events_url":"https://api.github.com/users/obspy/events{/privacy}","received_events_url":"https://api.github.com/users/obspy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/obspy/obspy","description":"ObsPy: A Python Toolbox for seismology/seismological observatories.","fork":false,"url":"https://api.github.com/repos/obspy/obspy","forks_url":"https://api.github.com/repos/obspy/obspy/forks","keys_url":"https://api.github.com/repos/obspy/obspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/obspy/obspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/obspy/obspy/teams","hooks_url":"https://api.github.com/repos/obspy/obspy/hooks","issue_events_url":"https://api.github.com/repos/obspy/obspy/issues/events{/number}","events_url":"https://api.github.com/repos/obspy/obspy/events","assignees_url":"https://api.github.com/repos/obspy/obspy/assignees{/user}","branches_url":"https://api.github.com/repos/obspy/obspy/branches{/branch}","tags_url":"https://api.github.com/repos/obspy/obspy/tags","blobs_url":"https://api.github.com/repos/obspy/obspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/obspy/obspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/obspy/obspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/obspy/obspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/obspy/obspy/statuses/{sha}","languages_url":"https://api.github.com/repos/obspy/obspy/languages","stargazers_url":"https://api.github.com/repos/obspy/obspy/stargazers","contributors_url":"https://api.github.com/repos/obspy/obspy/contributors","subscribers_url":"https://api.github.com/repos/obspy/obspy/subscribers","subscription_url":"https://api.github.com/repos/obspy/obspy/subscription","commits_url":"https://api.github.com/repos/obspy/obspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/obspy/obspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/obspy/obspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/obspy/obspy/issues/comments{/number}","contents_url":"https://api.github.com/repos/obspy/obspy/contents/{+path}","compare_url":"https://api.github.com/repos/obspy/obspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/obspy/obspy/merges","archive_url":"https://api.github.com/repos/obspy/obspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/obspy/obspy/downloads","issues_url":"https://api.github.com/repos/obspy/obspy/issues{/number}","pulls_url":"https://api.github.com/repos/obspy/obspy/pulls{/number}","milestones_url":"https://api.github.com/repos/obspy/obspy/milestones{/number}","notifications_url":"https://api.github.com/repos/obspy/obspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/obspy/obspy/labels{/name}","releases_url":"https://api.github.com/repos/obspy/obspy/releases{/id}","deployments_url":"https://api.github.com/repos/obspy/obspy/deployments","created_at":"2012-09-08T19:17:46Z","updated_at":"2016-06-17T14:46:35Z","pushed_at":"2016-06-18T16:58:45Z","git_url":"git://github.com/obspy/obspy.git","ssh_url":"git@github.com:obspy/obspy.git","clone_url":"https://github.com/obspy/obspy.git","svn_url":"https://github.com/obspy/obspy","homepage":"https://www.obspy.org","size":95136,"stargazers_count":216,"watchers_count":216,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":160,"mirror_url":null,"open_issues_count":177,"forks":160,"open_issues":177,"watchers":216,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1449"},"html":{"href":"https://github.com/obspy/obspy/pull/1449"},"issue":{"href":"https://api.github.com/repos/obspy/obspy/issues/1449"},"comments":{"href":"https://api.github.com/repos/obspy/obspy/issues/1449/comments"},"review_comments":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1449/comments"},"review_comment":{"href":"https://api.github.com/repos/obspy/obspy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/obspy/obspy/pulls/1449/commits"},"statuses":{"href":"https://api.github.com/repos/obspy/obspy/statuses/437b9e9d27f756fd8686345b9ee003fe44c8949e"}}}}
{"actor":{"display_login":"krischer"}}