MS3TraceID

class pymseed.mstracelist.MS3TraceID(cffi_ptr, parent_tracelist)[source]

Bases: object

Wrapper around CFFI MS3TraceID structure

This class supports list-like access to the trace segments:

  • len(traceid) returns the number of segments

  • traceid[i] returns the i-th segment

  • traceid[start:end] returns a slice of segments

  • for segment in traceid: iterates over all segments

Invalidated when the owning MS3TraceList is closed; using it afterward raises ValueError instead of reading freed memory.

Parameters:
  • cffi_ptr (Any)

  • parent_tracelist (Any)

__len__()[source]

Return number of segments

Return type:

int

__iter__()[source]

Return iterator over segments

Return type:

Iterator[MS3TraceSeg]

__getitem__(key)[source]

Enable indexing and slicing access to segments

Parameters:

key (int | slice)

Return type:

Any

property sourceid: str

Return source ID as string

property pubversion: int

Return publication version

property earliest: int

Return earliest time as nanoseconds since Unix/POSIX epoch

property earliest_seconds: float

Return earliest time as seconds since Unix/POSIX epoch

earliest_str(timeformat=TimeFormat.ISOMONTHDAY_Z, subsecond=SubSecond.NANO_MICRO_NONE)[source]

Return earliest time as formatted string

Returns the sentinel strings "ERROR" or "UNSET" when the underlying nanosecond timestamp is the corresponding libmseed sentinel.

Parameters:
Return type:

str

property latest: int

Return latest time as nanoseconds since Unix/POSIX epoch

property latest_seconds: float

Return latest time as seconds since Unix/POSIX epoch

latest_str(timeformat=TimeFormat.ISOMONTHDAY_Z, subsecond=SubSecond.NANO_MICRO_NONE)[source]

Return latest time as formatted string

Returns the sentinel strings "ERROR" or "UNSET" when the underlying nanosecond timestamp is the corresponding libmseed sentinel.

Parameters:
Return type:

str