From 4a1854a8618ea2839482bf548842f675f489f26b Mon Sep 17 00:00:00 2001 From: ThomasLecocq Date: Mon, 13 Mar 2017 15:40:07 +0100 Subject: [PATCH 1/5] renaming obspy.io.datamark to obspy.io.win --- CHANGELOG.txt | 19 ++++-- obspy/core/util/base.py | 2 +- obspy/io/{datamark => win}/README.txt | 0 obspy/io/{datamark => win}/__init__.py | 4 +- obspy/io/{datamark => win}/core.py | 18 +++--- .../docs/E-MAN_LS-7000XT_7_format.pdf | Bin .../docs/Re__DataMark_format_description.eml | 60 +++++++++--------- obspy/io/{datamark => win}/tests/__init__.py | 2 +- .../{datamark => win}/tests/data/10030302.00 | Bin .../{datamark => win}/tests/data/10030302.01 | Bin .../{datamark => win}/tests/data/10030302.02 | Bin .../{datamark => win}/tests/data/10030302.03 | Bin .../{datamark => win}/tests/data/10030302.04 | Bin .../{datamark => win}/tests/data/10030302.05 | Bin .../{datamark => win}/tests/data/10030302.06 | Bin .../{datamark => win}/tests/data/10030302.07 | Bin .../{datamark => win}/tests/data/10030302.08 | Bin .../{datamark => win}/tests/data/10030302.09 | Bin .../{datamark => win}/tests/data/10030302.10 | Bin obspy/io/{datamark => win}/tests/test_core.py | 10 +-- setup.py | 10 +-- 21 files changed, 65 insertions(+), 60 deletions(-) rename obspy/io/{datamark => win}/README.txt (100%) rename obspy/io/{datamark => win}/__init__.py (82%) rename obspy/io/{datamark => win}/core.py (92%) rename obspy/io/{datamark => win}/docs/E-MAN_LS-7000XT_7_format.pdf (100%) rename obspy/io/{datamark => win}/docs/Re__DataMark_format_description.eml (96%) rename obspy/io/{datamark => win}/tests/__init__.py (93%) rename obspy/io/{datamark => win}/tests/data/10030302.00 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.01 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.02 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.03 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.04 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.05 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.06 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.07 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.08 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.09 (100%) rename obspy/io/{datamark => win}/tests/data/10030302.10 (100%) rename obspy/io/{datamark => win}/tests/test_core.py (90%) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7ab7389d927..b79a81c0231 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -59,20 +59,23 @@ master: (doi: 10.5281/zenodo.165135) goes to white instead of yellow but remains perceptually uniform. It is especially useful for printing when an image should merge with the white background. - - obspy.imaging.waveform + - obspy.imaging.waveform: * Support for filling the wiggles when plotting sections (horizontal and vertical, see #1445). - - obspy.io.gse2 + - obspy.io.datamark: + * Renamed without deprectation to obspy.io.win to match its original name. + Datamark is a datalogger, saving the WIN format. + - obspy.io.gse2: * Read support for GSE2.0 bulletin (see #1528) - - obspy.io.nlloc + - obspy.io.nlloc: * Also parse author information and COMMENT line (see #1484) - - obspy.io.quakeml + - obspy.io.quakeml: * Read and write support for nested custom tags (see #1463) - - obspy.io.seiscomp + - obspy.io.seiscomp: * Write support for SC3ML event (see #1638) - - obspy.io.stationtxt + - obspy.io.stationtxt: * Write support for stationtxt format (see #1466) - - obspy.io.stationxml + - obspy.io.stationxml: * Read and write support for custom tags (see #1024) * No longer add the (unused) time zone field to StationXML datetimes to follow the example of big data centers. (see #1572) @@ -94,6 +97,8 @@ master: (doi: 10.5281/zenodo.165135) * Set preferred origin of event (see #1570) - obspy.io.nordic: * Add Nordic format (s-file) read/write (see #1517) + - obspy.io.win: + * see obspy.io.datamark. - obspy.io.xseed: * Added azimuth and dip to the get_coordinates() function. (see #1315) - obspy.scripts: diff --git a/obspy/core/util/base.py b/obspy/core/util/base.py index e0e2babf87d..fbe0fa086d2 100644 --- a/obspy/core/util/base.py +++ b/obspy/core/util/base.py @@ -32,7 +32,7 @@ # defining ObsPy modules currently used by runtests and the path function DEFAULT_MODULES = ['clients.filesystem', 'core', 'db', 'geodetics', 'imaging', 'io.ah', 'io.ascii', 'io.cmtsolution', 'io.cnv', 'io.css', - 'io.datamark', 'io.gcf', 'io.gse2', 'io.json', + 'io.win', 'io.gcf', 'io.gse2', 'io.json', 'io.kinemetrics', 'io.kml', 'io.mseed', 'io.ndk', 'io.nied', 'io.nlloc', 'io.nordic', 'io.pdas', 'io.pde', 'io.quakeml', 'io.reftek', 'io.sac', 'io.seg2', 'io.segy', diff --git a/obspy/io/datamark/README.txt b/obspy/io/win/README.txt similarity index 100% rename from obspy/io/datamark/README.txt rename to obspy/io/win/README.txt diff --git a/obspy/io/datamark/__init__.py b/obspy/io/win/__init__.py similarity index 82% rename from obspy/io/datamark/__init__.py rename to obspy/io/win/__init__.py index 1a66bdc1009..46c1f42c512 100644 --- a/obspy/io/datamark/__init__.py +++ b/obspy/io/win/__init__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- """ -obspy.io.datamark - DataMark read support for ObsPy +obspy.io.win - WIN read support for ObsPy =================================================== -This module provides read support for DataMark waveform data. +This module provides read support for WIN waveform data. :copyright: The ObsPy Development Team (devs@obspy.org), Thomas Lecocq, Adolfo Inza & diff --git a/obspy/io/datamark/core.py b/obspy/io/win/core.py similarity index 92% rename from obspy/io/datamark/core.py rename to obspy/io/win/core.py index 61d7ebfb06b..d4e46483284 100644 --- a/obspy/io/datamark/core.py +++ b/obspy/io/win/core.py @@ -14,14 +14,14 @@ from obspy import Stream, Trace, UTCDateTime -def _is_datamark(filename, century="20"): # @UnusedVariable +def _is_win(filename, century="20"): # @UnusedVariable """ - Checks whether a file is DATAMARK or not. + Checks whether a file is WIN or not. :type filename: str - :param filename: DATAMARK file to be checked. + :param filename: WIN file to be checked. :rtype: bool - :return: ``True`` if a DATAMARK file. + :return: ``True`` if a WIN file. """ # as long we don't have full format description we just try to read the # file like _read_datamark and check for errors @@ -52,17 +52,17 @@ def _is_datamark(filename, century="20"): # @UnusedVariable return True -def _read_datamark(filename, century="20", **kwargs): # @UnusedVariable +def _read_win(filename, century="20", **kwargs): # @UnusedVariable """ - Reads a DATAMARK file and returns a Stream object. + Reads a WIN file and returns a Stream object. .. warning:: This function should NOT be called directly, it registers via the ObsPy :func:`~obspy.core.stream.read` function, call this instead. :type filename: str - :param filename: DATAMARK file to be read. - :param century: DATAMARK stores year as 2 numbers, need century to + :param filename: WIN file to be read. + :param century: WIN stores year as 2 numbers, need century to construct proper datetime. :rtype: :class:`~obspy.core.stream.Stream` :returns: Stream object containing header and data. @@ -70,7 +70,7 @@ def _read_datamark(filename, century="20", **kwargs): # @UnusedVariable output = {} srates = {} - # read datamark file + # read win file with open(filename, "rb") as fpin: fpin.seek(0, 2) sz = fpin.tell() diff --git a/obspy/io/datamark/docs/E-MAN_LS-7000XT_7_format.pdf b/obspy/io/win/docs/E-MAN_LS-7000XT_7_format.pdf similarity index 100% rename from obspy/io/datamark/docs/E-MAN_LS-7000XT_7_format.pdf rename to obspy/io/win/docs/E-MAN_LS-7000XT_7_format.pdf diff --git a/obspy/io/datamark/docs/Re__DataMark_format_description.eml b/obspy/io/win/docs/Re__DataMark_format_description.eml similarity index 96% rename from obspy/io/datamark/docs/Re__DataMark_format_description.eml rename to obspy/io/win/docs/Re__DataMark_format_description.eml index 2e7162d9348..5fd04c82014 100644 --- a/obspy/io/datamark/docs/Re__DataMark_format_description.eml +++ b/obspy/io/win/docs/Re__DataMark_format_description.eml @@ -1,30 +1,30 @@ -Delivery-Date: Mon, 25 Jun 2012 09:45:50 +0200 -To: barsch@egu.eu -Cc: support@hakusan.co.jp -Subject: Re: DataMark format description -From: Akiko Hakamada - - - -Dear Sir - -Thank you for your inquiry. - -We send a part of DATAMARK LS-7000XT user's manual as a format -description document. -Attached file name: E-MAN_LS-7000XT_7_format.pdf - -Some of our products uses two kind of data format, type A0 and A1. -Type A0 is also called "win format", and A1 is extended version of it. -We recommend you to support type A0, because type A0 conforms to the -data format of the WIN system developed by Earthquake Research Institute -(ERI), the University of Tokyo, but type A1 is not recently used in most -our product. - -Please see the web page of ERI. - http://eoc.eri.u-tokyo.ac.jp/cgi-bin/show_man_en?winformat - -Best Regards, -------------------- -Akiko Hakamada -Hakusan Corporation +Delivery-Date: Mon, 25 Jun 2012 09:45:50 +0200 +To: barsch@egu.eu +Cc: support@hakusan.co.jp +Subject: Re: DataMark format description +From: Akiko Hakamada + + + +Dear Sir + +Thank you for your inquiry. + +We send a part of DATAMARK LS-7000XT user's manual as a format +description document. +Attached file name: E-MAN_LS-7000XT_7_format.pdf + +Some of our products uses two kind of data format, type A0 and A1. +Type A0 is also called "win format", and A1 is extended version of it. +We recommend you to support type A0, because type A0 conforms to the +data format of the WIN system developed by Earthquake Research Institute +(ERI), the University of Tokyo, but type A1 is not recently used in most +our product. + +Please see the web page of ERI. + http://eoc.eri.u-tokyo.ac.jp/cgi-bin/show_man_en?winformat + +Best Regards, +------------------- +Akiko Hakamada +Hakusan Corporation diff --git a/obspy/io/datamark/tests/__init__.py b/obspy/io/win/tests/__init__.py similarity index 93% rename from obspy/io/datamark/tests/__init__.py rename to obspy/io/win/tests/__init__.py index 2c3676d734c..004a5d1755c 100644 --- a/obspy/io/datamark/tests/__init__.py +++ b/obspy/io/win/tests/__init__.py @@ -8,7 +8,7 @@ from obspy.core.util import add_doctests, add_unittests -MODULE_NAME = "obspy.io.datamark" +MODULE_NAME = "obspy.io.win" def suite(): diff --git a/obspy/io/datamark/tests/data/10030302.00 b/obspy/io/win/tests/data/10030302.00 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.00 rename to obspy/io/win/tests/data/10030302.00 diff --git a/obspy/io/datamark/tests/data/10030302.01 b/obspy/io/win/tests/data/10030302.01 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.01 rename to obspy/io/win/tests/data/10030302.01 diff --git a/obspy/io/datamark/tests/data/10030302.02 b/obspy/io/win/tests/data/10030302.02 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.02 rename to obspy/io/win/tests/data/10030302.02 diff --git a/obspy/io/datamark/tests/data/10030302.03 b/obspy/io/win/tests/data/10030302.03 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.03 rename to obspy/io/win/tests/data/10030302.03 diff --git a/obspy/io/datamark/tests/data/10030302.04 b/obspy/io/win/tests/data/10030302.04 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.04 rename to obspy/io/win/tests/data/10030302.04 diff --git a/obspy/io/datamark/tests/data/10030302.05 b/obspy/io/win/tests/data/10030302.05 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.05 rename to obspy/io/win/tests/data/10030302.05 diff --git a/obspy/io/datamark/tests/data/10030302.06 b/obspy/io/win/tests/data/10030302.06 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.06 rename to obspy/io/win/tests/data/10030302.06 diff --git a/obspy/io/datamark/tests/data/10030302.07 b/obspy/io/win/tests/data/10030302.07 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.07 rename to obspy/io/win/tests/data/10030302.07 diff --git a/obspy/io/datamark/tests/data/10030302.08 b/obspy/io/win/tests/data/10030302.08 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.08 rename to obspy/io/win/tests/data/10030302.08 diff --git a/obspy/io/datamark/tests/data/10030302.09 b/obspy/io/win/tests/data/10030302.09 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.09 rename to obspy/io/win/tests/data/10030302.09 diff --git a/obspy/io/datamark/tests/data/10030302.10 b/obspy/io/win/tests/data/10030302.10 similarity index 100% rename from obspy/io/datamark/tests/data/10030302.10 rename to obspy/io/win/tests/data/10030302.10 diff --git a/obspy/io/datamark/tests/test_core.py b/obspy/io/win/tests/test_core.py similarity index 90% rename from obspy/io/datamark/tests/test_core.py rename to obspy/io/win/tests/test_core.py index 20f8d9f0a79..044c65c6c5c 100644 --- a/obspy/io/datamark/tests/test_core.py +++ b/obspy/io/win/tests/test_core.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- """ -The obspy.io.datamark.core test suite. +The obspy.io.win.core test suite. """ from __future__ import (absolute_import, division, print_function, unicode_literals) @@ -12,12 +12,12 @@ from obspy import read from obspy.core.utcdatetime import UTCDateTime -from obspy.io.datamark.core import _read_datamark +from obspy.io.win.core import _read_win class CoreTestCase(unittest.TestCase): """ - Test cases for datamark core interface + Test cases for win core interface """ def setUp(self): # directory where the test files are located @@ -45,11 +45,11 @@ def test_read_via_obspy(self): def test_read_via_module(self): """ - Read files via obspy.io.datamark.core._read_datamark function. + Read files via obspy.io.win.core._read_datamark function. """ filename = os.path.join(self.path, '10030302.00') # 1 - st = _read_datamark(filename) + st = _read_win(filename) st.verify() st.sort(keys=['channel']) self.assertEqual(len(st), 2) diff --git a/setup.py b/setup.py index 1d6839d529b..97ba8203a44 100644 --- a/setup.py +++ b/setup.py @@ -85,7 +85,7 @@ KEYWORDS = [ 'ArcLink', 'array', 'array analysis', 'ASC', 'beachball', 'beamforming', 'cross correlation', 'database', 'dataless', - 'Dataless SEED', 'datamark', 'earthquakes', 'Earthworm', 'EIDA', + 'Dataless SEED', 'win', 'earthquakes', 'Earthworm', 'EIDA', 'envelope', 'ESRI', 'events', 'FDSN', 'features', 'filter', 'focal mechanism', 'GCF', 'GSE1', 'GSE2', 'hob', 'Tau-P', 'imaging', 'instrument correction', 'instrument simulation', 'IRIS', 'kinemetrics', @@ -142,7 +142,7 @@ 'SLIST = obspy.io.ascii.core', 'PICKLE = obspy.core.stream', 'CSS = obspy.io.css.core', - 'DATAMARK = obspy.io.datamark.core', + 'WIN = obspy.io.win.core', 'KINEMETRICS_EVT = obspy.io.kinemetrics.core', 'GSE1 = obspy.io.gse2.core', 'GSE2 = obspy.io.gse2.core', @@ -187,9 +187,9 @@ 'isFormat = obspy.io.css.core:_is_nnsa_kb_core', 'readFormat = obspy.io.css.core:_read_nnsa_kb_core', ], - 'obspy.plugin.waveform.DATAMARK': [ - 'isFormat = obspy.io.datamark.core:_is_datamark', - 'readFormat = obspy.io.datamark.core:_read_datamark', + 'obspy.plugin.waveform.WIN': [ + 'isFormat = obspy.io.win.core:_is_win', + 'readFormat = obspy.io.win.core:_read_win', ], 'obspy.plugin.waveform.KINEMETRICS_EVT': [ 'isFormat = obspy.io.kinemetrics.core:is_evt', From 8826388dbbb8cfdbe469d1fd4308b0f1f1c3084f Mon Sep 17 00:00:00 2001 From: ThomasLecocq Date: Mon, 13 Mar 2017 15:48:28 +0100 Subject: [PATCH 2/5] doc improvenent so googlers are happy finding datamark+hakusan+ERI --- obspy/io/win/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/obspy/io/win/__init__.py b/obspy/io/win/__init__.py index 46c1f42c512..cec042b4c9d 100644 --- a/obspy/io/win/__init__.py +++ b/obspy/io/win/__init__.py @@ -1,8 +1,13 @@ # -*- coding: utf-8 -*- """ obspy.io.win - WIN read support for ObsPy -=================================================== -This module provides read support for WIN waveform data. +========================================= +This module provides read support for WIN waveform data. This format is +written by different dataloggers, including Hakusan LS-7000XT Datamark +dataloggers. There are two subformats, A0 and A1. To our knowledge, A0 is the +only one supported with the current code. A0 conforms to the +data format of the WIN system developed by Earthquake Research Institute +(ERI), the University of Tokyo :copyright: The ObsPy Development Team (devs@obspy.org), Thomas Lecocq, Adolfo Inza & From 1bbee78c1aa1db158d886906dce32ca46a0273a0 Mon Sep 17 00:00:00 2001 From: ThomasLecocq Date: Mon, 13 Mar 2017 15:48:45 +0100 Subject: [PATCH 3/5] . --- obspy/io/win/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obspy/io/win/__init__.py b/obspy/io/win/__init__.py index cec042b4c9d..38e2b816d2a 100644 --- a/obspy/io/win/__init__.py +++ b/obspy/io/win/__init__.py @@ -7,7 +7,7 @@ dataloggers. There are two subformats, A0 and A1. To our knowledge, A0 is the only one supported with the current code. A0 conforms to the data format of the WIN system developed by Earthquake Research Institute -(ERI), the University of Tokyo +(ERI), the University of Tokyo. :copyright: The ObsPy Development Team (devs@obspy.org), Thomas Lecocq, Adolfo Inza & From f35374b28b753a9c25ac1dff09eb447cb18d0205 Mon Sep 17 00:00:00 2001 From: ThomasLecocq Date: Mon, 13 Mar 2017 16:03:41 +0100 Subject: [PATCH 4/5] forgot the readme ! --- obspy/io/win/README.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/obspy/io/win/README.txt b/obspy/io/win/README.txt index e807495eaaa..49df780b0dc 100644 --- a/obspy/io/win/README.txt +++ b/obspy/io/win/README.txt @@ -1,11 +1,11 @@ -package obspy.io.datamark +package obspy.io.win ========================= Copyright --------- GNU Lesser General Public License, Version 3 (LGPLv3) -Copyright (c) 2012-2013 by: +Copyright (c) 2012-2017 by: * Thomas Lecocq * Adolfo Inza * Philippe Lesage @@ -13,12 +13,16 @@ Copyright (c) 2012-2013 by: Overview -------- -DataMark read support for ObsPy. +WIN read support for ObsPy. -This module provides read support for DataMark data format. This module is +This module provides read support for WIN data format. This module is based on the code of Adolfo Inza and Philippe Lesage of the "Géophysique des volcans" team of the "Institut des Sciences de la Terre de l'Université de -Savoie", France. +Savoie", France. This format is written by different dataloggers, including +Hakusan LS-7000XT Datamark dataloggers. There are two subformats, A0 and A1. +To our knowledge, A0 is the only one supported with the current code. A0 +conforms to the data format of the WIN system developed by Earthquake Research +Institute (ERI), the University of Tokyo. ObsPy is an open-source project dedicated to provide a Python framework for processing seismological data. It provides parsers for common file formats and From 67502ea35f8369b5778573883e2792c997e5e406 Mon Sep 17 00:00:00 2001 From: Thomas Lecocq Date: Tue, 28 Mar 2017 17:39:26 +0200 Subject: [PATCH 5/5] Update README.txt markdown +DOCS --- obspy/io/win/README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/obspy/io/win/README.txt b/obspy/io/win/README.txt index 49df780b0dc..e6cb57c2ebd 100644 --- a/obspy/io/win/README.txt +++ b/obspy/io/win/README.txt @@ -1,5 +1,5 @@ package obspy.io.win -========================= +==================== Copyright ---------