-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The cube_convert.py script fails when run on three-channel data (in this case, from a DiGOS breakout box). The command used was
python cube_convert.py CUBE3_B52/260104/ miniseed/ GS CABL AUTO AUTO --bob-factor 10
and the error occurs during the "merging multiple traces" step:
------------------------------------------------------------------
Adding metadata to 3 miniSEED file(s)...
------------------------------------------------------------------
c0b52260104023127.pri0
Found multiple files for one hour:
c0b52260104023127.pri1
c0b52260104023127.pri2
Merging multiple traces for one hour using fill_value=0
/Users/ltoney/miniforge3/envs/rtm/lib/python3.13/site-packages/numpy/_core/fromnumeric.py:86: RuntimeWarning: invalid value encountered in reduce
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
Traceback (most recent call last):
File "/Users/ltoney/repos/cube_conversion/cube_convert.py", line 311, in <module>
st.write(file, format='MSEED', encoding=output_encoding)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ltoney/miniforge3/envs/rtm/lib/python3.13/site-packages/obspy/core/stream.py", line 1459, in write
write_format(self, filename, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ltoney/miniforge3/envs/rtm/lib/python3.13/site-packages/obspy/io/mseed/core.py", line 760, in _write_mseed
raise Exception(msg)
Exception:
Wrong dtype for Stream[1].data for encoding FLOAT64.
Please change the dtype of your data or use an appropriate
encoding. See the obspy.io.mseed documentation for more
information.
It's clear the the code is identifying the 2nd and 3rd channels (*.pri1 and *.pri2) as "multiple files" though they are in fact just different channels. I think this section of the code needs to be fixed to account for when multiple channels of data are present, since when I removed it the code ran and produced three files for the three channels as expected.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working