Changes between Version 10 and Version 11 of tankplayer


Ignore:
Timestamp:
02/27/12 16:56:27 (10 years ago)
Author:
branden
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • tankplayer

    v10 v11  
    88 
    99== Details == 
     10"tankplayer" is part of the four-program set for recording and playing back the trace data for selected time intervals. See also [wiki:trig2disk trig2disk], [wiki:waveman2disk waveman2disk], and [wiki:wave_serverV wave_serverV]. 
     11 
     12Tankplayer has two common uses and one new use: 
     13 
     14=== Tuning Operating Earthworms === 
     15 
     16For example, an Earthworm system fails to locate a significant earthquake. The waveform data for the earthquake is requested from the wave_server and saved in tankplayer format. Using an experimental Earthworm, the event is played back with tankplayer, tuning the operational parameters until Earthworm performs satisfactorally. The operational parameters are then changed to those used in the test. 
     17 
     18=== Quality Assurance === 
     19 
     20One is to perform quality assurance tests. For such tests, an experimental Earthworm system would be set up, and one or more tankplayers would be connected as the data source. Each tankplayer would be given a lengthy list of data files, and "tankplayer" would play (broadcast into the earthworm) the trace data from these files, one after another, generally overnight. The earthworm system under test would then process the incoming data. In the morning, we would come in and examine the rubble. 
     21 
     22Menlo Park has created a collection of over 50 historic trace data files, representing the trace data traffic during various 'moments of horror' at CalNet. These include the Loma Prieta mainshock, swarms during wind storms, concurrent events in different parts of the net, events during telemetry malfunctions, etc. These files were painfully created by reformatting CUSP data archive files. The format of these files is simple: it is a series of messages of TYPE_ADBUF, written with a binary write. 
     23 
     24=== Real Time Data Feed === 
     25Alternatively, as of Earthworm 7.3, the tankplayer module now accepts tank files moved into a loading directory for automatic playback. This is configured using the GetFromDir setting in the .d file. The files must be loaded in time order for this mode to work. This provides the Earthworm user with a new way to load waveforms into the rings...by creating a tank file generating program. 
     26 
     27=== How Tankplayer Works ===  
     28On startup, tankplayer reads its configuration file. This specifies the message ring into which to inject the data, and the module name to use. Tankplayer is generally told to imitate a real data source, such as an A/D module, or a digital acquisition module. The parameter file also lists the data files to be played back. It also specifies a pause period. This was implemented to prevent the earthworm associator (binder) from becoming confused by rapid jumps in time between data files. This time period should be set to be larger than binder's association memory, to prevent it from trying to associate phase arrivals from different data files. 
     29 
     30In operation, tankplayer places the waveform messages from its input file(S) into shared memory in simulated real time, using the delta-t between time-stamps in successive message headers to determine its timing. When the end of file is reached, it waits "Pause" number of seconds, and goes on to the next file, as specified in the parameter file. 
     31 
     32Tankplayer is location code compliant and backward compatible. It accepts messages of either tracebuf or tracebuf2 as configured using the PlayMsgType parameter. 
     33 
     34=== Tankplayer Tools === 
     35 
     36Separate from tankplayer are tools to help create tankfiles from sac format files. One can also archive tank files using [wiki:waveman2disk waveman2disk] and configuring appropriate output format. The two tools are sac2tb and remux_tbuf. The notes from Pete Lombard about these tools: 
     37 
     38This is sac2tb, a utility for turning SAC data files into tracebuf files. Usage: sac2tb [-n samples] sacfile > tbuf-file 
     39Without the -n option, sac2tb defaults to 100 samples per packet. 
     40 
     41The intended use is that you run sac2tb on a bunch of SAC files for a given event or time period, "cat" all the files together, and then run remux_tbuf to make a tankplayer file. For example, in a directory of SAC files: 
     42{{{ 
     43  foreach m (*) 
     44  sac2tb $m >> tbuf 
     45  end 
     46 
     47  remux_tbuf tbuf test.tnk 
     48}}} 
     49SAC doesn't have a provision for byte-swapping, so to my knowledge, SAC files are only in SPARC byte-order. At least that's the assumption here. If sac2tb is run on an intel machine, the SAC file will be swapped into intel byte-order and the resulting tracebuf messages will be marked accordingly. 
     50 
     51Pete Lombard, 19 May 2001 
     52 
     53=== Five New Tankplayer tools for EW v7.2 === 
     54 
     55 * '''ms2tank''' - convert miniseed files into a tank player buffer. This version uses Chad Trabant's libmseed which is now a part of the stock earthworm distribution. The previous version, ms2tb, used the UCB qlib2 and was restricted to Solaris and Linux. This version works on Solaris, Windows, Linux, and Mac OS X. 
     56 * '''tanksniff''' - this module outputs a sniffwave like output when you pass it a tank. It allows you to look at the contents of your tanks without having to play them back in tankplayer. It takes one argument, a tank. 
     57 * '''tankcut''' - this module will extract out a specified time slice from a tank. It requires a starting time and duration for extraction. If you run the module without any arguments, it spits back the version number and the argument options/args: 
     58{{{ 
     59$ tankcut 
     60Error, an input and output tank name must be provided 
     61tankcut version v0.0.1 2007-08-27 
     62usage: tankcut -s StartTime [-e EndTime|-d Duration] intank outtank 
     63                all times for -s and -e options must be in YYYYMMDDHHMMSS format 
     64        -s StartTime - when to start including tracebufs from intank 
     65        -e EndTime - when to end including tracebufs from intank 
     66        -d Duration - Duration in seconds from start time when to end including tracebufs from intank 
     67                Default Duration is 600 seconds from start time 
     68}}} 
     69 * '''ring2tank''' - have you ever wanted to suck the data out of your ring and play it back to simulate a few hours of running of your system....well now you can. This module does just what it says, it takes 2 arguments, the name of a RING to read from, and the name of a tankfile to write to. Be warned that this module has no real smarts and will just keep on filling a file till it grows infinitely. You must CAREFULLY run this module from the command line and kill it when you are done with your data gathering...or it may kill your system when the disk fills. On SOLARIS systems the disk size limit for a file is 2 gigabytes unless you compile the program with the LARGEFILE flag options. See tankcut above when you want to trim the tank generated from this module. 
     70 * '''dc2tank''' - Data Center to tank. This is a complex module that allows a user to gather some data from the IRIS DMC using the DHI2mseed.jar java program. It extracts the desired stations and builds a tank based on an event start time and duration. There is a README.dc2tank provided with the code. This module requires that you have java installed on your system and in your path. 
     71 
     72Paul Friberg - December 27, 2007 
     73 
     74== More Details == 
    1075Tankplayer reads file(s) containing waveform messages (of either TYPE_ADBUF, TYPE_TRACEBUF, or TYPE_TRACEBUF2) from a single data source. It places the waveform messages into shared memory in simulated real time, using the delta-t between time-stamps in successive message headers to determine its timing. On startup, tankplayer reads the configuration file named on the command line. Commands in this file set up all parameters used in playing back waveform messages from a file to a shared memory ring. In the control file, lines may begin with a valid tankplayer command (listed below) or with one of 2 special characters: 
    1176{{{