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

Fix bug with size 1 RT130 trace

parent f0dcd6e6
No related branches found
No related tags found
No related merge requests found
...@@ -197,9 +197,9 @@ class Reftek130(obspy_rt130_core.Reftek130): ...@@ -197,9 +197,9 @@ class Reftek130(obspy_rt130_core.Reftek130):
# numbers (namely, appending a negative number with 1s # numbers (namely, appending a negative number with 1s
# does not change its value), we do not have to care # does not change its value), we do not have to care
# about the actual encoding type of the stored packets. # about the actual encoding type of the stored packets.
sample_data = (packets_['payload'][:, :4]) sample_data = np.asarray(packets_['payload'][:, :4])
sample_data = sample_data.view(np.dtype('>i4')).squeeze() sample_data = sample_data.view(np.dtype('>i4')).squeeze(axis=-1)
npts = len(sample_data) npts = sample_data.size
tr = DiscontinuousTrace( tr = DiscontinuousTrace(
data=sample_data, header=copy.deepcopy(header), data=sample_data, header=copy.deepcopy(header),
times=(packets_['time'] / 10**9).round(3) 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