Commit 5f3615f3 authored by Javier Quinteros's avatar Javier Quinteros

Add an implementation of the FDSN Dataselect capable to serve miniSEED from the TDMS files

parent 068a2afe
......@@ -99,3 +99,68 @@ Export waveforms from channels 0 to 4 from the beginning of the measurements unt
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 ``dasconv`` 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 = FH1
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..FH1", "XX.00002..FH1", ..., "XX.00123..FH1" 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 programm, 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", "starttime", and "endtime" are supported. The aliases are still missing. Errors are returned as specified in the standard.
* version: returns the version number in text/plain format
* application.wadl: NOT implemented yet!
* queryauth: NOT implemented yet!
This diff is collapsed.
......@@ -23,7 +23,7 @@ setup(
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='0.4',
version='0.5a1',
description='dasscripts: Scripts to work with data generated by DAS systems',
long_description=long_description,
......@@ -44,8 +44,9 @@ setup(
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 5 - Production/Stable',
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Framework :: CherryPy',
'Intended Audience :: Science/Research',
# Indicate who your project is intended for
......@@ -55,17 +56,21 @@ setup(
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Operating System :: MacOS',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
'Topic :: Scientific/Engineering'
],
# What does your project relate to?
keywords='seismology DAS waveforms fdsn-ws',
keywords='seismology DAS waveforms fdsnws dataselect',
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
......@@ -80,7 +85,7 @@ setup(
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=['obspy', 'numpy'],
install_requires=['obspy', 'numpy', 'cherrypy'],
python_requires='>=3',
# List additional groups of dependencies here (e.g. development
......@@ -114,5 +119,6 @@ setup(
entry_points='''
[console_scripts]
dasconv=dasscripts.dasconv:main
tdmsws=dasscripts.tdmsws:main
'''
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment