The waveform suite is a collection of MATLAB classes that work together to speed up and simplify the import and manipulation of time-series data. Originally conceived to manipulate seismic data, it may be applied to any regularly sampled time-series data that is associated with a location.

DOWNLOAD LATEST WAVEFORM SUITE HERE (.zip)
Version: r258
Date: 1/03/2011

This update includes performance improvements and a variety of bug fixes. A new version of the waveform structure has been created, as well, but this should be invisible to existing programs.


README Notes

ZIP file contents:

  • @datasource/ source directory for the datasource class
  • @filterobject/ source directory for the filterobject class
  • @scnlobject/ source directory for the scnlobject class
  • @spectralobject/ source directory for the spectralobject class
  • @waveform/ source directory for the waveform class
  • uispecgram.fig UI component of the spectrogram generation program
  • uispecgram.m example of an interactive spectrogram generation program

Installation

Unzip the files either into the MATLAB directory from which you work, or into another directory. The parent directory (the one that contains all the @whatever directories) must be on the MATLAB path.

To enable log spectral plotting, please download uimagesc, by Frederic Moisy, available at: http://www.mathworks.com/matlabcentral/fileexchange/11368 Then, extract it to a location along the MATLAB path.

Additional help, along with examples can be found online at

Notes about this release

r258

This release includes fixes to dates, history, extract, and an error generated when creating a specgram from a single waveform

Notice the large release number change? Much of that stems from waveform sharing revision codes with the GISMO suite, which includes additional files not found here.

r234

This release consists of a series of small fixes, plus one pretty cool addition.

First the addition:
Waveform now has a legend routine. If you plot multiple wavforms w, then legend(w) will automatically create a legend based upon the uniqueness of STATION and CHANNEL. For example, if all waveforms have different stations, but are the same channel, it will create a legend from the STATION. If stations and channels are all the same, it will label with the start time. You may specify fields with the syntax legend(w, 'myfield' [,...]), where myfield is any information you might retrieve via waveform/get.

example:
 old way: legend(strcat(get(w,'station'),':',get(w,'channel')]); % everything specified in gross detail
new way: legend(w); % if station & channel are non-unique
         or: legend(w,'station','channel'); % also specified, but more readable

The new old way will still work, and is how you might want to handle the more complex legend issues

Also:

r228

This release fixed a small problem with the waveform statistics. waveform/mean, waveform/median, waveform/std, and waveform/var had been written to use nanmean, nanmedian, etc. However, when I did this, I didn't realize that they were within the statistics toolbox. I have since modified them to work without the toolbox.

The spectrogram plotting functions have been expanded and updated. Now, both specgram and specgram2 will work for multiple waveforms. New options allow the user to control font-size, and excercise greater control over the colorbar. The uispecgram program has been updated to include the ability to generate log spectra, though the log-plotting ability still needs to be fine tuned.

r211

This is a maintenance release that fixes a problem with loading waveforms and acknowledges that the underlying waveform structure has changed.

r206

Notice that the version # has changed to a release number. This has been prompted by changes with how the source code is version-controlled, and is a little less arbitrary than the 1.xx versions created before.

Improved:

Added:

Upgraded:

Removed:

Previous Versions

v 1.12

includes major changes to how waveform handles SAC files. Several bugs regarding the loading and saving of SAC files were brought to my attention. In response, all the sac-related files within the @waveform/private directory have been modified. These modification should be mostly transparent to overlying programs with the exception of User Fields.

When waveform opens a sac file, it read the header into user-defined fields. Much information from these fields were incorporated into the waveform, such as period, start time, units, etc. The user fields were then left in the waveform, but were vestigial. When a waveform writes out to a sac file, it recalculates much of this information because all of it was subject to change by the user. Now, most of these "vestigial" fields have been removed from the waveform. Fields that are no longer in the user-defined field section include: B, E, DEPMIN, DEPMAX, DEMEN, NPTS, KSTNM, KCMPNM, KNETWK, DELTA, NVHDR, IDEP, and LEVEN. All of the values contained in these fields are accessible through pre-existing means.

Starting with the file marked as v 1.10, i have implemented a fundamental change in the way waveform works. The source of the data, which used to be deeply entwined with the waveform class has been pulled out and split into its own class, datasource. This means that the waveform constructor call no longer requires a different series of arguments depending on the source. Now, the overlying program does not need to know whether data is imported via SAC, winston, antelope, etc. Additionally, this change has allowed the easy importation of user-defined file types and the ability to intelligently navigate directory structures. It is still backwards compatible, but warnings will be generated that aid the user in updating code to the new paradigm.

Support for the importation of SEISAN files was added, too. However, the inherent directory structure used with SEISAN precludes the datasource's ability to navigate and find the appropriate files. They can still be imported, but the file names will have to be individually declared.

scnlobjects were introduced as a way to make waveform more seed compliant, and to provide a robust way of handling the locales associated with each waveform. Other than the initial creation of scnlobjects necessary for the creation or importation of waveforms, this change is relatively transparent. That is to say, you can still access stations and channels through waveform's set/get routines without having to deal with the scnlobject contained within each waveform.

Acknowledgements

In one form or another, the waveform suite has been around for roughly 5 years. I'd like to thank those that have helped me improve it throughout that time. I especially would like to recognize Jackie-Caplan Auerbach (for introducing me to MATLAB and inspiring this suite in the first place), Jason Amundson (a great debugger and source of addtional functionality), Micheal Thorne (who's SAC routines I thoroughly cannibalized), Glenn Thompson and Silvio DeAngelis (as testers and for SEISAN help), my advisor Steve McNutt (who let me get away with working on this stuff when, perhaps I should have been concentrating on the wiggles themselves), and Michael West (For plenty of discreet encouragement and great conversations on waveform philosophy... and author of the correlation toolbox, which is based upon the waveform object).

I'm sure I'm leaving out important people; and I reserve the right to add them as they pop to mind.