dastools


Namedastools JSON
Version 0.9 PyPI version JSON
download
home_pagehttps://git.gfz-potsdam.de/javier/dastools
Summarydastools: Tools to work with data generated by DAS systems
upload_time2023-09-28 12:21:03
maintainer
docs_urlNone
authorJavier Quinteros
requires_python>=3
licenseGPLv3
keywords seismology das waveforms fdsnws dataselect
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            dastools
========

.. image:: https://img.shields.io/pypi/v/dastools.svg
   :target: https://img.shields.io/pypi/v/dastools.svg

.. image:: https://img.shields.io/pypi/pyversions/dastools.svg
   :target: https://img.shields.io/pypi/pyversions/dastools.svg

.. image:: https://img.shields.io/pypi/format/dastools.svg
   :target: https://img.shields.io/pypi/format/dastools.svg

.. image:: https://img.shields.io/pypi/status/dastools.svg
   :target: https://img.shields.io/pypi/status/dastools.svg

.. image:: https://git.gfz-potsdam.de/javier/dastools/badges/master/coverage.svg
   :target: https://git.gfz-potsdam.de/javier/dastools/badges/master/coverage.svg

Tools to work with data generated by DAS systems.

Overview
--------
This package provides a set of tools to read, manipulate and convert seismic waveforms
generated by DAS systems. In particular, the ones generated by Silixa (TDMs format) and OptoDAS/Alcatel (HDF5).

dasconv
-------
This utility lets you convert and manipulate seismic waveforms in TDMs format and export them into MiniSEED.

Data acquired from experiments with DAS systems are usually stored in one folder. Files within this folder have names
indicating the experiment and the start time of the waveforms saved. An example of the files generated in a test
experiment is shown below. ::

    $ ls -l
    total 1577352
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093735.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093805.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:39 default_UTC_20190508_093835.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:39 default_UTC_20190508_093905.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:40 default_UTC_20190508_093935.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:40 default_UTC_20190508_094005.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:41 default_UTC_20190508_094035.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:41 default_UTC_20190508_094105.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:42 default_UTC_20190508_094135.409.tdms

There, *default* is the name of the experiment and the rest is the start time with the following format:
*experiment_TZ_YYYYMMDD_HHmmss.fff.tdms*.

``dasconv`` provides also a TDMS class which needs to receive one mandatory parameter to be instantiated,
*filename*, which is actually the experiment name and how all file names in the containing folder start with.
A detailed explanation on how to use it on your own programs can be found in the documentation.

A typical help message from ``dasconv`` looks like the following: ::

    usage: dasconv [-h] [-l {CRITICAL,ERROR,WARNING,INFO,DEBUG}] [-d DIRECTORY]
                   [--start START] [--end END] [--chstart CHSTART]
                   [--chstop CHSTOP] [--chstep CHSTEP] [--decimate {1,5}]
                   [-N NETWORK] [-C CHANNEL] [-o {SDS,StreamBased,StreamBasedHour}]
                   [--metadata] [-V] filename

    Read, manipulate and convert seismic waveforms generated by a DAS system.

    positional arguments:
      filename              Experiment to read and process. It is usually the
                            first part of the filenames.

    optional arguments:
      -h, --help            show this help message and exit
      -l {CRITICAL,ERROR,WARNING,INFO,DEBUG}, --loglevel {CRITICAL,ERROR,WARNING,INFO,DEBUG}
                            Verbosity in the output.
      -d DIRECTORY, --directory DIRECTORY
                            Directory where files are located (default: ".")
      --start START, --starttime START
                            Start of the selected time window. Format:
                            2019-02-01T00:01:02.123456Z
      --end END, --endtime END
                            End of the selected time window. Format:
                            2019-02-01T00:01:02.123456Z
      --chstart CHSTART     First channel to export
      --chstop CHSTOP       Last channel to export
      --chstep CHSTEP       Step between channels in the selection
      --decimate {1,5}      Factor by which the sampling rate is lowered by
                            decimation.
      -N NETWORK, --network NETWORK
                            Network code to store in the miniseed header (default: "XX")
      -C CHANNEL, --channel CHANNEL
                            Channel code to store in the miniseed header (default: "FSF")
      -o {SDS,StreamBased,StreamBasedHour}, --outstruct {SDS,StreamBased,StreamBasedHour}
                            Available options are [SDS, StreamBased, StreamBasedHour]
      --metadata            Read and display the metadata from the TDMS files
      -V, --version         show program's version number and exit


Examples
~~~~~~~~

Export waveforms from channels 800, 802 and 804 starting at 2019-05-08T09:37:35.409000 until 2019-05-08T09:38:05.400000.
The waveforms will be exported to MiniSEED format after being decimated by a factor of 5 (e.g. from 1000Hz to 200Hz). ::

    dasconv -d /home/user/test/ --start "2019-05-08T09:37:35.409000" --end "2019-05-08T09:38:05.400000" default --chstart 800 --chstop 805 --chstep 2

Export waveforms from channels 0 and 1 from the beginning of the measurements until 2019-05-08T09:32:15.
The waveforms will be exported to MiniSEED format after being decimated by a factor of 5 (e.g. from 1000Hz to 200Hz). ::

    dasconv -d /home/user/test/ --endtime "2019-05-08T09:32:15" default --chstart 0 --chstop 1

Export waveforms from channels 0 to 4 from the beginning of the measurements until 2019-05-08T09:32:15.
The waveforms will be exported to MiniSEED format after being decimated by a factor of 5 (e.g. from 1000Hz to 200Hz). ::

    dasconv -d /home/user/test/ --endtime "2019-05-08T09:32:15" default --chstart 0 --chstop 4 --decimate 5

tdmsws (experimental)
---------------------
tdmsws is a stand-alone implementation of the FDSN Dataselect web service, which is able to serve miniSEED data extracted
from a folder with TDMS files.

A typical help message from ``tdmsws`` looks like the following: ::

    % tdmsws -h
    usage: tdmsws [-h] [-mc] [-l {DEBUG,WARNING,INFO,DEBUG}]

    tdmsws is an FDSN Dataselect implementation to read TDMS files

    optional arguments:
      -h, --help            show this help message and exit
      -mc, --minimalconfig  Generate a minimal configuration file.
      -l {DEBUG,WARNING,INFO,DEBUG}, --log {DEBUG,WARNING,INFO,DEBUG}
                            Increase the verbosity level.


The "mc" switch creates a config file, which should be placed in the same folder as the TDMS files. The file includes
all needed options and configuration variables which will be read by the software before being able to serve the data.
The user is expected to edit this file and provide the basic information about the DAS experiment before running the
service.

One can see below a typical config file. ::

    [General]
    experiment = default
    loglevel = INFO

    [NSLC]
    network = XX
    location =
    channel = FSF

The "experiment" variable refers to the first part of the filenames in the folder. For instance, in the example above
all files will start with "default" and then a timestamp including the timezone (or UTC) will follow. ::

    $ ls -l
    total 1577352
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093735.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093805.409.tdms
    -rwxrwxrwx  1 user  staff   49965056 May  8 09:39 default_UTC_20190508_093835.409.tdms

The variables "network", "location" and "channel" will be fixed to define the N.S.L.C code. Only the station will vary
and it will always be a number referring to the stream number for the experiment. From the example above, the only valid
code would be "XX.00001..FSF", "XX.00002..FSF", ..., "XX.00123..FSF" up to all available streams.

Running the service
~~~~~~~~~~~~~~~~~~~
To run the service you should "cd" into the folder with the TDMS files and make sure that there is a file called
"tdmsws.cfg" with its variables properly configured. Then, you can simply call the program, which will start and run
as a daemon. The service will listen to all requests in port 7000.

Web service methods
~~~~~~~~~~~~~~~~~~~

* query: The six required parameters "net", "sta", "loc", "cha", "start", and "end" are supported including their aliases. Errors are returned as specified in the standard.

* version: returns the version number in text/plain format

* application.wadl: returns details about implemented and supported options and parameters

* queryauth: NOT implemented yet!


Acknowledgments
---------------

This work was done as part of the `EOSC-Pillar <https://eosc-pillar.eu/>`_ project, which has received funding from the
European Union’s Horizon 2020 research and innovation program under Grant Agreement Number 857650, as well as the
`RISE <http://www.rise-eu.org/home/>`_ project, also supported by the European Union’s Horizon 2020 research and
innovation program under Grant Agreement Number 821115.

            

Raw data

            {
    "_id": null,
    "home_page": "https://git.gfz-potsdam.de/javier/dastools",
    "name": "dastools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "seismology DAS waveforms fdsnws dataselect",
    "author": "Javier Quinteros",
    "author_email": "javier@gfz-potsdam.de",
    "download_url": "https://files.pythonhosted.org/packages/3f/70/5e238527dd0b4136b0cef9fd84f3ba73d45945e41985d4336244629d71f0/dastools-0.9.tar.gz",
    "platform": null,
    "description": "dastools\n========\n\n.. image:: https://img.shields.io/pypi/v/dastools.svg\n   :target: https://img.shields.io/pypi/v/dastools.svg\n\n.. image:: https://img.shields.io/pypi/pyversions/dastools.svg\n   :target: https://img.shields.io/pypi/pyversions/dastools.svg\n\n.. image:: https://img.shields.io/pypi/format/dastools.svg\n   :target: https://img.shields.io/pypi/format/dastools.svg\n\n.. image:: https://img.shields.io/pypi/status/dastools.svg\n   :target: https://img.shields.io/pypi/status/dastools.svg\n\n.. image:: https://git.gfz-potsdam.de/javier/dastools/badges/master/coverage.svg\n   :target: https://git.gfz-potsdam.de/javier/dastools/badges/master/coverage.svg\n\nTools to work with data generated by DAS systems.\n\nOverview\n--------\nThis package provides a set of tools to read, manipulate and convert seismic waveforms\ngenerated by DAS systems. In particular, the ones generated by Silixa (TDMs format) and OptoDAS/Alcatel (HDF5).\n\ndasconv\n-------\nThis utility lets you convert and manipulate seismic waveforms in TDMs format and export them into MiniSEED.\n\nData acquired from experiments with DAS systems are usually stored in one folder. Files within this folder have names\nindicating the experiment and the start time of the waveforms saved. An example of the files generated in a test\nexperiment is shown below. ::\n\n    $ ls -l\n    total 1577352\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093735.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093805.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:39 default_UTC_20190508_093835.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:39 default_UTC_20190508_093905.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:40 default_UTC_20190508_093935.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:40 default_UTC_20190508_094005.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:41 default_UTC_20190508_094035.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:41 default_UTC_20190508_094105.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:42 default_UTC_20190508_094135.409.tdms\n\nThere, *default* is the name of the experiment and the rest is the start time with the following format:\n*experiment_TZ_YYYYMMDD_HHmmss.fff.tdms*.\n\n``dasconv`` provides also a TDMS class which needs to receive one mandatory parameter to be instantiated,\n*filename*, which is actually the experiment name and how all file names in the containing folder start with.\nA detailed explanation on how to use it on your own programs can be found in the documentation.\n\nA typical help message from ``dasconv`` looks like the following: ::\n\n    usage: dasconv [-h] [-l {CRITICAL,ERROR,WARNING,INFO,DEBUG}] [-d DIRECTORY]\n                   [--start START] [--end END] [--chstart CHSTART]\n                   [--chstop CHSTOP] [--chstep CHSTEP] [--decimate {1,5}]\n                   [-N NETWORK] [-C CHANNEL] [-o {SDS,StreamBased,StreamBasedHour}]\n                   [--metadata] [-V] filename\n\n    Read, manipulate and convert seismic waveforms generated by a DAS system.\n\n    positional arguments:\n      filename              Experiment to read and process. It is usually the\n                            first part of the filenames.\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -l {CRITICAL,ERROR,WARNING,INFO,DEBUG}, --loglevel {CRITICAL,ERROR,WARNING,INFO,DEBUG}\n                            Verbosity in the output.\n      -d DIRECTORY, --directory DIRECTORY\n                            Directory where files are located (default: \".\")\n      --start START, --starttime START\n                            Start of the selected time window. Format:\n                            2019-02-01T00:01:02.123456Z\n      --end END, --endtime END\n                            End of the selected time window. Format:\n                            2019-02-01T00:01:02.123456Z\n      --chstart CHSTART     First channel to export\n      --chstop CHSTOP       Last channel to export\n      --chstep CHSTEP       Step between channels in the selection\n      --decimate {1,5}      Factor by which the sampling rate is lowered by\n                            decimation.\n      -N NETWORK, --network NETWORK\n                            Network code to store in the miniseed header (default: \"XX\")\n      -C CHANNEL, --channel CHANNEL\n                            Channel code to store in the miniseed header (default: \"FSF\")\n      -o {SDS,StreamBased,StreamBasedHour}, --outstruct {SDS,StreamBased,StreamBasedHour}\n                            Available options are [SDS, StreamBased, StreamBasedHour]\n      --metadata            Read and display the metadata from the TDMS files\n      -V, --version         show program's version number and exit\n\n\nExamples\n~~~~~~~~\n\nExport waveforms from channels 800, 802 and 804 starting at 2019-05-08T09:37:35.409000 until 2019-05-08T09:38:05.400000.\nThe waveforms will be exported to MiniSEED format after being decimated by a factor of 5 (e.g. from 1000Hz to 200Hz). ::\n\n    dasconv -d /home/user/test/ --start \"2019-05-08T09:37:35.409000\" --end \"2019-05-08T09:38:05.400000\" default --chstart 800 --chstop 805 --chstep 2\n\nExport waveforms from channels 0 and 1 from the beginning of the measurements until 2019-05-08T09:32:15.\nThe waveforms will be exported to MiniSEED format after being decimated by a factor of 5 (e.g. from 1000Hz to 200Hz). ::\n\n    dasconv -d /home/user/test/ --endtime \"2019-05-08T09:32:15\" default --chstart 0 --chstop 1\n\nExport waveforms from channels 0 to 4 from the beginning of the measurements until 2019-05-08T09:32:15.\nThe waveforms will be exported to MiniSEED format after being decimated by a factor of 5 (e.g. from 1000Hz to 200Hz). ::\n\n    dasconv -d /home/user/test/ --endtime \"2019-05-08T09:32:15\" default --chstart 0 --chstop 4 --decimate 5\n\ntdmsws (experimental)\n---------------------\ntdmsws is a stand-alone implementation of the FDSN Dataselect web service, which is able to serve miniSEED data extracted\nfrom a folder with TDMS files.\n\nA typical help message from ``tdmsws`` looks like the following: ::\n\n    % tdmsws -h\n    usage: tdmsws [-h] [-mc] [-l {DEBUG,WARNING,INFO,DEBUG}]\n\n    tdmsws is an FDSN Dataselect implementation to read TDMS files\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -mc, --minimalconfig  Generate a minimal configuration file.\n      -l {DEBUG,WARNING,INFO,DEBUG}, --log {DEBUG,WARNING,INFO,DEBUG}\n                            Increase the verbosity level.\n\n\nThe \"mc\" switch creates a config file, which should be placed in the same folder as the TDMS files. The file includes\nall needed options and configuration variables which will be read by the software before being able to serve the data.\nThe user is expected to edit this file and provide the basic information about the DAS experiment before running the\nservice.\n\nOne can see below a typical config file. ::\n\n    [General]\n    experiment = default\n    loglevel = INFO\n\n    [NSLC]\n    network = XX\n    location =\n    channel = FSF\n\nThe \"experiment\" variable refers to the first part of the filenames in the folder. For instance, in the example above\nall files will start with \"default\" and then a timestamp including the timezone (or UTC) will follow. ::\n\n    $ ls -l\n    total 1577352\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093735.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:38 default_UTC_20190508_093805.409.tdms\n    -rwxrwxrwx  1 user  staff   49965056 May  8 09:39 default_UTC_20190508_093835.409.tdms\n\nThe variables \"network\", \"location\" and \"channel\" will be fixed to define the N.S.L.C code. Only the station will vary\nand it will always be a number referring to the stream number for the experiment. From the example above, the only valid\ncode would be \"XX.00001..FSF\", \"XX.00002..FSF\", ..., \"XX.00123..FSF\" up to all available streams.\n\nRunning the service\n~~~~~~~~~~~~~~~~~~~\nTo run the service you should \"cd\" into the folder with the TDMS files and make sure that there is a file called\n\"tdmsws.cfg\" with its variables properly configured. Then, you can simply call the program, which will start and run\nas a daemon. The service will listen to all requests in port 7000.\n\nWeb service methods\n~~~~~~~~~~~~~~~~~~~\n\n* query: The six required parameters \"net\", \"sta\", \"loc\", \"cha\", \"start\", and \"end\" are supported including their aliases. Errors are returned as specified in the standard.\n\n* version: returns the version number in text/plain format\n\n* application.wadl: returns details about implemented and supported options and parameters\n\n* queryauth: NOT implemented yet!\n\n\nAcknowledgments\n---------------\n\nThis work was done as part of the `EOSC-Pillar <https://eosc-pillar.eu/>`_ project, which has received funding from the\nEuropean Union\u2019s Horizon 2020 research and innovation program under Grant Agreement Number 857650, as well as the\n`RISE <http://www.rise-eu.org/home/>`_ project, also supported by the European Union\u2019s Horizon 2020 research and\ninnovation program under Grant Agreement Number 821115.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "dastools: Tools to work with data generated by DAS systems",
    "version": "0.9",
    "project_urls": {
        "Homepage": "https://git.gfz-potsdam.de/javier/dastools"
    },
    "split_keywords": [
        "seismology",
        "das",
        "waveforms",
        "fdsnws",
        "dataselect"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f705e238527dd0b4136b0cef9fd84f3ba73d45945e41985d4336244629d71f0",
                "md5": "bbdc65b1ad9641d1ce0090f0bd3a412a",
                "sha256": "d5ec30b49f53073c03ea9059b16010ad608b26c1433c3efc1a97ecda9666e182"
            },
            "downloads": -1,
            "filename": "dastools-0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "bbdc65b1ad9641d1ce0090f0bd3a412a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 63728,
            "upload_time": "2023-09-28T12:21:03",
            "upload_time_iso_8601": "2023-09-28T12:21:03.261663Z",
            "url": "https://files.pythonhosted.org/packages/3f/70/5e238527dd0b4136b0cef9fd84f3ba73d45945e41985d4336244629d71f0/dastools-0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-28 12:21:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "dastools"
}
        
Elapsed time: 0.30511s