TauP WebΒΆ
TauP Web is different, not exactly a tool, but provides access to all of the other tools via a web interface. It takes the place of the old gui tool that existed in TauP version 2. It can respond to either simple queries where each of the query parameters matches the similar command line argument, or you can use the "Calculator" page with a web form to create the parameters. The "calculator" also displays the equivalent command line version, which can be useful. In addition, the TauP documentation is also available. Because of strong support within the web browser, SVG output from the graphical tools is very useful.
By default it runs on port 7409, which kind of looks like T-A-U-P if you squint just right.
In addition to mapping the query parameters to regular command line arguments, it also accepts POST queries with the parameters in JSON format. So doing a GET on this url:
http://localhost:7409/time?phase=P,S°ree=35&format=text
and a POST to http://localhost:7409/time that sends the following:
{"format": "text", "degree": [35], "phase": ["P", "S"]}
are both equivalent to the command line:
taup time --degree 35 --text --phase P,S
To start, run
taup web
and then open your favorite web browser to http://localhost:7409.
Or you can append the --open argument and TauP will start the web
server and try to open the page in your default web browser.
Note that the web server only listens for connections from the same computer, as a security precaution, and so the web interface is not available from other systems. If you wish to have an instance of TauP accessible from other machines, we recommend proxying via a regular web server. For example Apache2 via mod_proxy, but this style is discouraged for the wider web as it may present a security issue.
Also, the "Calculator" page uses fetch to process results and so if you have privacy web blockers enabled on your browser you may need to disable them for it to function. If you see a message like:
Network problem connecting to TauP server...
this could be why.
The usage is:
Usage: taup web [--debug] [--nodefaultmodels] [--open] [--verbose]
[--expire=<expireSeconds>] [--host=<host>]
[--namespace=<base_path>] [-p=<port>]
[--models=<extraModelNames>...]...
Web based gui for the TauP Toolkit.
Options:
--debug enable debugging output
--expire=<expireSeconds>
quit if no requests received in n seconds, defaults
to 3600
--host=<host> host to expose port on, defaults to localhost
--models=<extraModelNames>...
List of additional models to use
--namespace=<base_path>
base path in url, /<path>/taup/3, defaults to localws
--nodefaultmodels Do not include standard models at startup, requires
--models
--open autoopen web page
-p, --port=<port> port to use, defaults to 7409
--verbose enable verbose output