xdas.DataArray.to_stream#
- DataArray.to_stream(network='NET', station='DAS{:05}', location='00', channel='{:1}N1', dim={'last': 'first'})[source]#
Convert a data array into an obspy stream.
- Parameters:
network (str, optional) – The network code, by default “NET”.
station (str, optional) – The station code. Must be a string that can be formatted. By default “DAS{:05}”
location (str, optional) – The location code, by default “00”.
channel (str, optional) – The channel code. If the string can be formatted, the band code will be inferred from the sampling rate. By default “{:1}N1”
dim (dict, optional) – A dict with as key the spatial dimension to split into traces, and as value the temporal dimension. By default {“last”: “first”}.
- Returns:
the obspy stream version of the data array.
- Return type:
Stream