libmseed 3.1.3
The miniSEED data format library
Loading...
Searching...
No Matches
Frequency asked questions

FAQs

How do I read/write data from/to files?

The short answer is to use ms3_readmsr(), ms3_readtracelist(), and ms3_writemsr(). You can find descriptions and code examples in the Tutorial and Examples sections.

Can I read/write data from/to memory buffers?

Yes! Use msr3_parse() to read data from a memory buffer, and msr3_pack() to write data to a memory buffer. The msr3_pack() function accepts a callback function that is called when records are completed, from there the caller can do whatever is desired with the record.

How do I read data from a URL?

The library includes support for reading from URLs using libcurl. To use this feature, the library must be compiled with LIBMSEED_URL defined, and the program must be linked with both this library and libcurl.

The stream/file reading functions in the library will automatically detect URLs versus local files and there is no need to do anything special to use this feature.

Specifics of the URL support can be configured with ms3_url_useragent(), ms3_url_userpassword(), and ms3_url_addheader().

To disable TLS/SSL peer and host verification set the LIBMSEED_SSL_NOVERIFY environment variable.

miniSEED is simple, why is a library needed?

Indeed, a major advantage of miniSEED is that it is relatively simple. In specific cases, reading and even writing of miniSEED can a implemented with very little code. However, there are many combinations possible in record construction, data encodings, record lengths, proper time determination, endianess, etc. which make the general case non-trivial. With 2 versions of the format that are not binary compatible, the general case becomes even more complex.

Importantly, the library handles the task of re-assembling continuous time series data from independent, and arbitrarily organized, miniSEED records. This "beyond miniSEED" support no small task, and is required for most use cases.

Furthermore, the library contains optimizations for handling large volumes and highly-multiplexed data, as well efficiently dealing with historical quirks and data problems.

Can I use libmseed strictly with miniSEED version 2?

Yes. The library is backwards compatible with miniSEED version 2, and will automatically detect the version of data being read. Version 2 records can be created by setting the MSF_PACKVER2 flag when calling the pack or write functions.

I need to use separate FDSN identifiers of Network, Station, Location and Channel.

and what is the deal with this new Source Identifier?

In 2020 the FDSN approved the Source Identifier specification to overcome the limitations of SEED network, station, location, and channel codes. In particular length limitations, instrument-type code depletion, and provide a standard way to combine them. This specification is a superset of SEED codes and is backwards compatible as long as the codes are short enough to fit into SEED limitations.

As of major version 3, the library adopted the FDSN Source Identifer, often abbreviated to SID, replacing the previous representation that was very similar.

You can use the ms_sid2nslc() and ms_nslc2sid() routines to convert between the two representations.

Except for potentially larger individual codes, the major difference in the two representations is the channel code. In the SEED specification this is a fixed 3-character code, while in the FDSN Source Identifier specification the channel is 3 codes separated by underscores, with each code potentially being larger than a single character. The library is agnostic to form of a channel representation, accepting either and converting between them whenever possible and appropriate.

The library API changed! Why? How do I port my libmseed 2.x program to the 3.x API?

Starting with major version 3 of the library the internal data model was changed to be based on miniSEED format version 3. This relatively large structural change required API changes, and the opportunity was taken To improve the API in other ways.

See the Guide for porting from earlier libmseed versions.

I'm using the library and would like to cite it. How do I do that?

A publication is planned and will be added here when available.

For now, please cite the GitHub repository: https://github.com/EarthScope/libmseed

Thank you!

This library sucks. What can I do?

It won't be everyone's cup of tea. Some alternative libraries are:

P. Crotwell's SeisFile - Java library with miniSEED support.

D. Neuhauser's Qlib2 - C library with miniSEED support.

(happy to add more here, please let me know!)

This library is great, but doesn't do something I need. What can I do? How can I contribute?

Contributions of ideas, problems reports, and code are welcome!

Please post issues to the repository.

Code contributions are best submitted as pull requests.