API Reference¶
This section documents the public API of pymseed. Every name listed here is
importable directly from the pymseed package.
Classes¶
|
A wrapper for miniSEED data records supporting formats v2 and v3. |
|
Read miniSEED records from a file or file descriptor. |
|
Validate miniSEED records with comprehensive error detection. |
|
An error or warning found during miniSEED record validation. |
|
A container for a list of traces read from miniSEED |
Trace list internals¶
Iterating a MS3TraceList yields MS3TraceID
objects, which in turn yield MS3TraceSeg objects.
Reading with record_list=True additionally exposes
MS3RecordList and
MS3RecordPtr. These types are not imported at
the top level of the package, since they are only ever obtained from a trace
list rather than constructed directly.
|
Wrapper around CFFI MS3TraceID structure |
|
A continuous span of samples for a single trace ID |
|
Wrapper around CFFI MS3RecordList structure |
|
A record that contributed samples to a trace segment |
Enumerations¶
|
Data encoding format codes |
|
Time format codes for |
|
Subsecond resolution codes for |
Functions¶
|
Convert a nanosecond timestamp to a date-time string |
|
Convert a date-time string to nanoseconds since Unix epoch |
|
Calculate time for a sample at given offset from a given time and sample rate |
Get the current system time in nanoseconds |
|
|
Configure libmseed logging for the current thread. |
Clear all log messages from the registry without returning them. |
|
Get all error/warning messages from the libmseed logging registry. |
Source Identifiers¶
Converting between FDSN Source Identifiers and classic SEED NSLC (Network, Station, Location, Channel) codes deserves special care – the two are not a symmetric mapping. See Tutorial for a worked explanation of the conversion rules and the error cases.
|
Convert network, station, location, channel to FDSN Source ID |
|
Convert an FDSN Source ID to a tuple of (net, sta, loc, chan) |
Exceptions¶
Base class for all pymseed exceptions. |
|
|
Exception for libmseed return values. |
Module Constants¶
- pymseed.libmseed_version¶
Version string of the underlying libmseed library.
- pymseed.NSTERROR¶
Nanosecond time value indicating an error condition.
- pymseed.NSTUNSET¶
Nanosecond time value indicating an unset/unknown time.
- pymseed.NSTMODULUS¶
Modulus value for nanosecond time calculations (nanoseconds per second).
CFFI layer¶
pymseed.ffi and pymseed.clibmseed give direct access to the CFFI-generated
bindings for libmseed’s C API. They are an escape hatch for calling library
functions pymseed does not itself wrap, not part of the documented Python
API: their surface follows the bundled libmseed C headers and is not covered
by pymseed’s own API stability guarantees.