Skip to content
Snippets Groups Projects
Commit a798964c authored by Kien Le's avatar Kien Le
Browse files

Fix bug with size 1 RT130 trace

parent 13ac59a5
No related branches found
No related tags found
1 merge request!139Change the way RT130 data is read for better performance
......@@ -197,9 +197,9 @@ class Reftek130(obspy_rt130_core.Reftek130):
# numbers (namely, appending a negative number with 1s
# does not change its value), we do not have to care
# about the actual encoding type of the stored packets.
sample_data = (packets_['payload'][:, :4])
sample_data = sample_data.view(np.dtype('>i4')).squeeze()
npts = len(sample_data)
sample_data = np.asarray(packets_['payload'][:, :4])
sample_data = sample_data.view(np.dtype('>i4')).squeeze(axis=-1)
npts = sample_data.size
tr = DiscontinuousTrace(
data=sample_data, header=copy.deepcopy(header),
times=(packets_['time'] / 10**9).round(3)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment