GitHub PullRequestReviewCommentEvent at 2014-07-30 16:28:22
Repository: obspy
Actor: krischer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/obspy/obspy/pulls/comments/15595047","id":15595047,"diff_hunk":"@@ -0,0 +1,361 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+AH bindings to ObsPy core module.\n+\n+An AH file is used for the storage of binary seismic time series data.\n+The file is portable among machines of varying architecture by virtue of\n+its XDR implementation. It is composed of a variable-sized header containing\n+a number of values followed by the time series data.\n+\n+.. seealso:: ftp://www.orfeus-eu.org/pub/software/mirror/ldeo.columbia/\n+\n+:copyright:\n+    The ObsPy Development Team (devs@obspy.org)\n+:license:\n+    GNU Lesser General Public License, Version 3\n+    (http://www.gnu.org/copyleft/lesser.html)\n+\"\"\"\n+from __future__ import (absolute_import, division, print_function,\n+                        unicode_literals)\n+from future.builtins import *  # NOQA @UnusedWildImport\n+\n+from struct import unpack\n+import xdrlib\n+\n+import numpy as np\n+\n+from obspy import UTCDateTime, Trace, Stream\n+from obspy.core.util.attribdict import AttribDict\n+\n+\n+def is_AH(filename):\n+    \"\"\"\n+    Checks whether a file is AH waveform data or not.\n+\n+    :type filename: str\n+    :param filename: AH file to be checked.\n+    :rtype: bool\n+    :return: ``True`` if a AH waveform file.\n+    \"\"\"\n+    if _get_AH_version(filename):\n+        return True\n+    return False\n+\n+\n+def read_AH(filename, **kwargs):  # @UnusedVariable\n+    \"\"\"\n+    Reads an AH waveform file and returns a Stream object.\n+\n+    .. warning::\n+        This function should NOT be called directly, it registers via the\n+        ObsPy :func:`~obspy.core.stream.read` function, call this instead.\n+\n+    :type filename: str\n+    :param filename: AH file to be read.\n+    :rtype: :class:`~obspy.core.stream.Stream`\n+    :returns: Stream with Traces specified by given file.\n+    \"\"\"\n+    version = _get_AH_version(filename)\n+    if version == 2.0:\n+        return read_AH2(filename)","path":"obspy/ah/core.py","position":60,"original_position":60,"commit_id":"ee4d1f59fb95588b45e80539fdcc5f2b9c03592d","original_commit_id":"ee4d1f59fb95588b45e80539fdcc5f2b9c03592d","user":{"login":"krischer","id":800487,"avatar_url":"https://avatars.githubusercontent.com/u/800487?v=1","gravatar_id":"e7c25516d949af5b9c06c099997735a4","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":"Ah ok. Makes sense. I thought it is completely untested.","created_at":"2014-07-30T16:28:22Z","updated_at":"2014-07-30T16:28:22Z","html_url":"https://github.com/obspy/obspy/pull/851#discussion_r15595047","pull_request_url":"https://api.github.com/repos/obspy/obspy/pulls/851","_links":{"self":{"href":"https://api.github.com/repos/obspy/obspy/pulls/comments/15595047"},"html":{"href":"https://github.com/obspy/obspy/pull/851#discussion_r15595047"},"pull_request":{"href":"https://api.github.com/repos/obspy/obspy/pulls/851"}}},"pull_request":{"url":"https://api.github.com/repos/obspy/obspy/pulls/851","id":19064544,"html_url":"https://github.com/obspy/obspy/pull/851","diff_url":"https://github.com/obspy/obspy/pull/851.diff","patch_url":"https://github.com/obspy/obspy/pull/851.patch","issue_url":"https://api.github.com/repos/obspy/obspy/issues/851","number":851,"state":"open","title":"AH (Ad Hoc) waveform format read support","user":{"login":"barsch","id":602450,"avatar_url":"https://avatars.githubusercontent.com/u/602450?v=1","gravatar_id":"adf22951f22f1b780cd1699548c3bfff","url":"https://api.github.com/users/barsch","html_url":"https://github.com/barsch","followers_url":"https://api.github.com/users/barsch/followers","following_url":"https://api.github.com/users/barsch/following{/other_user}","gists_url":"https://api.github.com/users/barsch/gists{/gist_id}","starred_url":"https://api.github.com/users/barsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsch/subscriptions","organizations_url":"https://api.github.com/users/barsch/orgs","repos_url":"https://api.github.com/users/barsch/repos","events_url":"https://api.github.com/users/barsch/events{/privacy}","received_events_url":"https://api.github.com/users/barsch/received_events","type":"User","site_admin":false},"body":"AH v1 should be fine.\r\nAH v2 tests need some real examples + ASCII equivalents to finish this PR - unfortunatly I couldn't find anything useable :/\r\n\r\nAnyone got some AH v2 files? @jsaul, @jwassermann?","created_at":"2014-07-30T00:57:32Z","updated_at":"2014-07-30T16:28:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cae2710f8df7f044df25a14fd6c57c28e2f37081","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/obspy/obspy/pulls/851/commits","review_comments_url":"https://api.github.com/repos/obspy/obspy/pulls/851/comments","review_comment_url":"https://api.github.com/repos/obspy/obspy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/obspy/obspy/issues/851/comments","statuses_url":"https://api.github.com/repos/obspy/obspy/statuses/ee4d1f59fb95588b45e80539fdcc5f2b9c03592d","head":{"label":"barsch:ah","ref":"ah","sha":"ee4d1f59fb95588b45e80539fdcc5f2b9c03592d","user":{"login":"barsch","id":602450,"avatar_url":"https://avatars.githubusercontent.com/u/602450?v=1","gravatar_id":"adf22951f22f1b780cd1699548c3bfff","url":"https://api.github.com/users/barsch","html_url":"https://github.com/barsch","followers_url":"https://api.github.com/users/barsch/followers","following_url":"https://api.github.com/users/barsch/following{/other_user}","gists_url":"https://api.github.com/users/barsch/gists{/gist_id}","starred_url":"https://api.github.com/users/barsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsch/subscriptions","organizations_url":"https://api.github.com/users/barsch/orgs","repos_url":"https://api.github.com/users/barsch/repos","events_url":"https://api.github.com/users/barsch/events{/privacy}","received_events_url":"https://api.github.com/users/barsch/received_events","type":"User","site_admin":false},"repo":{"id":6581981,"name":"obspy","full_name":"barsch/obspy","owner":{"login":"barsch","id":602450,"avatar_url":"https://avatars.githubusercontent.com/u/602450?v=1","gravatar_id":"adf22951f22f1b780cd1699548c3bfff","url":"https://api.github.com/users/barsch","html_url":"https://github.com/barsch","followers_url":"https://api.github.com/users/barsch/followers","following_url":"https://api.github.com/users/barsch/following{/other_user}","gists_url":"https://api.github.com/users/barsch/gists{/gist_id}","starred_url":"https://api.github.com/users/barsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barsch/subscriptions","organizations_url":"https://api.github.com/users/barsch/orgs","repos_url":"https://api.github.com/users/barsch/repos","events_url":"https://api.github.com/users/barsch/events{/privacy}","received_events_url":"https://api.github.com/users/barsch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/barsch/obspy","description":"ObsPy: A Python Toolbox for seismology/seismological observatories.","fork":true,"url":"https://api.github.com/repos/barsch/obspy","forks_url":"https://api.github.com/repos/barsch/obspy/forks","keys_url":"https://api.github.com/repos/barsch/obspy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/barsch/obspy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/barsch/obspy/teams","hooks_url":"https://api.github.com/repos/barsch/obspy/hooks","issue_events_url":"https://api.github.com/repos/barsch/obspy/issues/events{/number}","events_url":"https://api.github.com/repos/barsch/obspy/events","assignees_url":"https://api.github.com/repos/barsch/obspy/assignees{/user}","branches_url":"https://api.github.com/repos/barsch/obspy/branches{/branch}","tags_url":"https://api.github.com/repos/barsch/obspy/tags","blobs_url":"https://api.github.com/repos/barsch/obspy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/barsch/obspy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/barsch/obspy/git/refs{/sha}","trees_url":"https://api.github.com/repos/barsch/obspy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/barsch/obspy/statuses/{sha}","languages_url":"https://api.github.com/repos/barsch/obspy/languages","stargazers_url":"https://api.github.com/repos/barsch/obspy/stargazers","contributors_url":"https://api.github.com/repos/barsch/obspy/contributors","subscribers_url":"https://api.github.com/repos/barsch/obspy/subscribers","subscription_url":"https://api.github.com/repos/barsch/obspy/subscription","commits_url":"https://api.github.com/repos/barsch/obspy/commits{/sha}","git_commits_url":"https://api.github.com/repos/barsch/obspy/git/commits{/sha}","comments_url":"https://api.github.com/repos/barsch/obspy/comments{/number}","issue_comment_url":"https://api.github.com/repos/barsch/obspy/issues/comments/{number}","contents_url":"https://api.github.com/repos/barsch/obspy/contents/{+path}","compare_url":"https://api.github.com/repos/barsch/obspy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/barsch/obspy/merges","archive_url":"https://api.github.com/repos/barsch/obspy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/barsch/obspy/downloads","issues_url":"https://api.github.com/repos/barsch/obspy/issues{/number}","pulls_url":"https://api.github.com/repos/barsch/obspy/pulls{/number}","milestones_url":"https://api.github.com/repos/barsch/obspy/milestones{/number}","notifications_url":"https://api.github.com/repos/barsch/obspy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/barsch/obspy/labels{/name}","releases_url":"https://api.github.com/repos/barsch/obspy/releases{/id}","created_at":"2012-11-07T16:06:36Z","updated_at":"2013-01-13T00:52:28Z","pushed_at":"2014-07-30T16:05:40Z","git_url":"git://github.com/barsch/obspy.git","ssh_url":"git@github.com:barsch/obspy.git","clone_url":"https://github.com/barsch/obspy.git","svn_url":"https://github.com/barsch/obspy","homepage":"http://www.obspy.org","size":22631,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"75f1cd05d8b792194d7662de5a663eb2d5a035b6","user":{"login":"obspy","id":1701221,"avatar_url":"https://avatars.githubusercontent.com/u/1701221?v=1","gravatar_id":"94146239e96253dbca883ec1229cf985","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=1","gravatar_id":"94146239e96253dbca883ec1229cf985","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}","created_at":"2012-09-08T19:17:46Z","updated_at":"2014-07-24T10:56:33Z","pushed_at":"2014-07-30T09:01:47Z","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":"http://www.obspy.org","size":68906,"stargazers_count":78,"watchers_count":78,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":63,"mirror_url":null,"open_issues_count":59,"forks":63,"open_issues":59,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/obspy/obspy/pulls/851"},"html":{"href":"https://github.com/obspy/obspy/pull/851"},"issue":{"href":"https://api.github.com/repos/obspy/obspy/issues/851"},"comments":{"href":"https://api.github.com/repos/obspy/obspy/issues/851/comments"},"review_comments":{"href":"https://api.github.com/repos/obspy/obspy/pulls/851/comments"},"review_comment":{"href":"https://api.github.com/repos/obspy/obspy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/obspy/obspy/pulls/851/commits"},"statuses":{"href":"https://api.github.com/repos/obspy/obspy/statuses/ee4d1f59fb95588b45e80539fdcc5f2b9c03592d"}}}}