xdas.DataArray.from_stream#

classmethod DataArray.from_stream(st, dims=('channel', 'time'))[source]#

Convert an obspy stream into a data array.

Traces in the stream must have the same length and must be syncronized. Traces are stacked along the first axis. The trace ids are used as labels along the first dimension.

Parameters:
  • st (Stream) – The stream to convert.

  • dims ((str, str)) – The name of the dimension respectively given to the trace and time dimensions.

Returns:

The consolidated data array.

Return type:

DataArray