{ "info": { "author": "Tom Eulenfeld", "author_email": "tom.eulenfeld@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering :: Physics" ], "description": "Saves and writes ObsPy streams to hdf5 files.\nStats attributes are preserved if they are numbers, strings,\nUTCDateTime objects or numpy arrays.\nIt can be used as a plugin to obspy's read function to read a whole hdf5 file.\nAlternatively you can iterate over the traces in a hdf5 file with the iterh5\nfunction.\n\nInstallation\n^^^^^^^^^^^^\nInstall h5py and obspy. After that install obspyh5 using pip by::\n\n pip install obspyh5\n\nAlternatively you can install obspyh5 by downloading the source code and\nrunning::\n\n python setup.py install\n\nWith conda you can install into a freesh environment with::\n\n conda config --add channels conda-forge\n conda create -n obsh5 numpy obspy h5py\n conda activate obsh5\n conda install obspyh5\n\nUsage\n^^^^^\nBasic example using the obspy plugin::\n\n >>> from obspy import read\n >>> stream = read() # load example stream\n >>> print(stream)\n ..3 Trace(s) in Stream:\n BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n BW.RJOB..EHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n BW.RJOB..EHE | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n >>> stream.write('test.h5', 'H5') # declare 'H5' as format\n >>> print(read('test.h5')) # Order is not preserved!\n 3 Trace(s) in Stream:\n BW.RJOB..EHZ | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n BW.RJOB..EHE | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n BW.RJOB..EHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n\nExample iterating over traces in a huge hdf5 file. After each iteration the\ntrace is not kept in memory and therefore it is possible to process a huge hdf5\nfile on a PC without problems. ::\n\n >>> from obspyh5 import iterh5\n >>> for trace in iterh5('huge_in.h5')\n trace.do_something()\n trace.write('huge_out.h5', 'H5', mode='a') # append mode to write into file\n\nAlternative indexing\n^^^^^^^^^^^^^^^^^^^^\nobspyh5 supports alternative indexing. ::\n\n >>> from obspy import read\n >>> import obspyh5\n >>> print(obspyh5._INDEX) # default index\n waveforms/{network}.{station}/{location}.{channel}/{starttime.datetime:%Y-%m-%dT%H:%M:%S}_{endtime.datetime:%Y-%m-%dT%H:%M:%S}\n\nThe index gets populated by the stats object when writing a trace, e.g. ::\n\n >>> stats = read()[0].stats\n >>> print(obspyh5._INDEX.format(**stats))\n 'waveforms/BW.RJOB/.EHZ/2009-08-24T00:20:03_2009-08-24T00:20:32'\n\nTo change the index use set_index. ::\n\n >>> obspyh5.set_index('xcorr') # xcorr indexing\n >>> obspyh5.set_index('waveforms/{network}.{station}/{distance}') # custom indexing\n\nWhen using the 'xcorr' indexing stats needs the entries 'network1', 'station1',\n'location1', 'channel1', 'network2', 'station2', 'location2' and 'channel2'\nof the first and second station. An example: ::\n\n >>> from obspy import read\n >>> import obspyh5\n >>> obspyh5.set_index('xcorr') # activate xcorr indexing\n >>> stream = read()\n >>> for i, tr in enumerate(stream): # manipulate stats object\n station1, station2 = 'ST1', 'ST%d' % i\n channel1, channel2 = 'HHZ', 'HHN'\n s = tr.stats\n # we manipulate seed id so that important information gets\n # printed by obspy\n s.network, s.station = s.station1, s.channel1 = station1, channel1\n s.location, s.channel = s.station2, s.channel2 = station2, channel2\n s.network1 = s.network2 = 'BW'\n s.location1 = s.location2 = ''\n >>> print(stream)\n ST1.HHZ.ST0.HHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n ST1.HHZ.ST1.HHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n ST1.HHZ.ST2.HHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n >>> stream.write('test_xcorr.h5', 'H5')\n >>> print(read('test_xcorr.h5'))\n ST1.HHZ.ST0.HHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n ST1.HHZ.ST1.HHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n ST1.HHZ.ST2.HHN | 2009-08-24T00:20:03.000000Z - 2009-08-24T00:20:32.990000Z | 100.0 Hz, 3000 samples\n\nNote\n^^^^\nSee also ASDF_ for a more comprehensive approach.\n\nUse case: Cross-correlation of late Okhotsk coda (notebook_).\n\n.. _ASDF: https://seismic-data.org/\n\n.. _notebook: http://nbviewer.jupyter.org/github/trichter/notebooks/blob/master/cross_correlation_okhotsk_coda.ipynb", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/trichter/obspyh5", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "obspyh5", "package_url": "https://pypi.org/project/obspyh5/", "platform": "", "project_url": "https://pypi.org/project/obspyh5/", "project_urls": { "Homepage": "https://github.com/trichter/obspyh5" }, "release_url": "https://pypi.org/project/obspyh5/0.4.1/", "requires_dist": null, "requires_python": "", "summary": "HDF5 write/read support for obspy", "version": "0.4.1" }, "last_serial": 5282150, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "dd3f54e7b44e655faa1014e3fc4cb38d", "sha256": "f538f7215c2ddfb0df18d8e020da870323b77878dfbe6c4ab4ca23ba78497c8e" }, "downloads": -1, "filename": "obspyh5-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dd3f54e7b44e655faa1014e3fc4cb38d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7355, "upload_time": "2014-03-24T18:34:06", "url": "https://files.pythonhosted.org/packages/f7/5a/aa7c6c3e81dd29eee3061ce33c70ff697682951ebd06d4fbe978d43a8586/obspyh5-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5c6f7436e94b1f8dd91663877550f869", "sha256": "dcaf5065c304832ad5fe509ca7ff2eadc222c413590e16a6af7b442131385e5f" }, "downloads": -1, "filename": "obspyh5-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5c6f7436e94b1f8dd91663877550f869", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7483, "upload_time": "2015-06-02T09:39:17", "url": "https://files.pythonhosted.org/packages/a8/dc/f01e246cc249292adf6c96b432dc9b04ab273e828a196753a97cf5ac6246/obspyh5-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "90727dffeebbba332cda40c6ffc61bbe", "sha256": "51a4b41ac4b553722b30c6acee60564ed33e3681a5b6ad0f6e682344ea9f6928" }, "downloads": -1, "filename": "obspyh5-0.2.1.tar.gz", "has_sig": false, "md5_digest": "90727dffeebbba332cda40c6ffc61bbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7493, "upload_time": "2015-06-02T10:28:39", "url": "https://files.pythonhosted.org/packages/03/f5/c5d8b0806d2bd36f5092ca2791039f038afc45cb138fd36a4222217b74f9/obspyh5-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "71951e778016b38a0ce6a0092750e124", "sha256": "fc40af9f3e162e75ef91b3f8335c3ebb0f8bf8351c982a806a8214b2f56e8472" }, "downloads": -1, "filename": "obspyh5-0.2.2.tar.gz", "has_sig": false, "md5_digest": "71951e778016b38a0ce6a0092750e124", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8079, "upload_time": "2016-02-12T13:08:11", "url": "https://files.pythonhosted.org/packages/e5/62/dd66e28270ac0d2b5f8b2db86146d7423b42752e0cf3a6189a844c2f0faf/obspyh5-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "b4ccf513309e5c48b3572b7934464d77", "sha256": "428c0b84a35bb198ee55f754c5cccfcc5bdd810d8f2c913b5ab6f9514ccf1c89" }, "downloads": -1, "filename": "obspyh5-0.2.3.tar.gz", "has_sig": false, "md5_digest": "b4ccf513309e5c48b3572b7934464d77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8388, "upload_time": "2016-06-29T09:50:42", "url": "https://files.pythonhosted.org/packages/40/9d/0dd5211eb2c5c640a90c64465e4698849dddf92c9055f0b35b18bf9fd269/obspyh5-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2a8412d18cff55bd7aa5e55537d7481e", "sha256": "03a5e61774acababa4ae797fa0f05d3e6e874c9ffc9e0b9e41965285dc546766" }, "downloads": -1, "filename": "obspyh5-0.3.0.tar.gz", "has_sig": false, "md5_digest": "2a8412d18cff55bd7aa5e55537d7481e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8488, "upload_time": "2017-08-30T13:27:52", "url": "https://files.pythonhosted.org/packages/7d/2d/8128a058e6681284498e150dc79a7cc9f15c214d4ba0836ac106a4689d34/obspyh5-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "520db00165746f330202dd2e683bbd98", "sha256": "17d607f437e0d283f53719b16f68bbed84e63f5fa8a7029b4224f2dd6399d05d" }, "downloads": -1, "filename": "obspyh5-0.3.1.tar.gz", "has_sig": false, "md5_digest": "520db00165746f330202dd2e683bbd98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8494, "upload_time": "2017-09-01T14:25:54", "url": "https://files.pythonhosted.org/packages/6f/2b/65174f9817af79eff3d8ad761ceb3f98cd04c05b5aa2186aaabfbd997714/obspyh5-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "9acd7480e87c8eba7e6975c4e4dbf7f4", "sha256": "46f9d17c56efe58a349337101cdd97ae19da043affab34038fb30157bdb9b12f" }, "downloads": -1, "filename": "obspyh5-0.3.2.tar.gz", "has_sig": false, "md5_digest": "9acd7480e87c8eba7e6975c4e4dbf7f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8493, "upload_time": "2017-09-01T14:27:54", "url": "https://files.pythonhosted.org/packages/6c/c8/618e542f478ef815b187de82bc2b15bac737bc452c7ae47ac6e6901bb8cc/obspyh5-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "6bc3ec4343374ba29fa76cc6ace420cb", "sha256": "f16fc2bc199086baf5670aca773434a71a75191cd43d2fa95d9a5d949bb2fc2c" }, "downloads": -1, "filename": "obspyh5-0.4.0.tar.gz", "has_sig": false, "md5_digest": "6bc3ec4343374ba29fa76cc6ace420cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8599, "upload_time": "2019-04-17T16:29:59", "url": "https://files.pythonhosted.org/packages/ea/3d/18e6187077d06f0be81cc95280f98352b21b6b8eec65729a2c143ed3a30c/obspyh5-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "3bf6393b2223cca67d89b7d06fcfe20e", "sha256": "d5b395cd3a7607e41d2f13e2a595d6eb8dd71bc393f7e51fbd76a2f5bad8a341" }, "downloads": -1, "filename": "obspyh5-0.4.1.tar.gz", "has_sig": false, "md5_digest": "3bf6393b2223cca67d89b7d06fcfe20e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8668, "upload_time": "2019-05-17T13:13:12", "url": "https://files.pythonhosted.org/packages/33/6c/2f36394af54a5d5948c12503fbf0683a2ec43599186424ed3869152a3cd5/obspyh5-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3bf6393b2223cca67d89b7d06fcfe20e", "sha256": "d5b395cd3a7607e41d2f13e2a595d6eb8dd71bc393f7e51fbd76a2f5bad8a341" }, "downloads": -1, "filename": "obspyh5-0.4.1.tar.gz", "has_sig": false, "md5_digest": "3bf6393b2223cca67d89b7d06fcfe20e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8668, "upload_time": "2019-05-17T13:13:12", "url": "https://files.pythonhosted.org/packages/33/6c/2f36394af54a5d5948c12503fbf0683a2ec43599186424ed3869152a3cd5/obspyh5-0.4.1.tar.gz" } ] }