uafgeotools / waveform_collection

Collect seismic/infrasound waveforms and metadata from IRIS/WATC/AVO servers, local miniSEED files, etc.
https://uaf-waveform-collection.readthedocs.io/
MIT License
13 stars 7 forks source link

smart24/write: Unsupported data type int32 in Stream[0].data #12

Open helenabuurman opened 4 years ago

helenabuurman commented 4 years ago

st.write from a smart24 call throws the error:

File "", line 1, in st.write('test.mseed',format="MSEED") File "C:\Users\helena\Anaconda3\envs\obspy\lib\site-packages\obspy\core\stream.py", line 1443, in write write_format(self, filename, **kwargs) File "C:\Users\helena\Anaconda3\envs\obspy\lib\site-packages\obspy\io\mseed\core.py", line 789, in _write_mseed raise Exception(msg) Exception: Unsupported data type int32 in Stream[0].data

Replicate using a list of cd11 files: st = Stream() for cd11 in cd11list: st += Smart24(cd11).st st.write('test.mseed',format="MSEED")

helenabuurman commented 4 years ago

I should have added: I got around this issue by changing like 485 of smart24.py to: data = obspy.core.compatibility.from_buffer(csf['channel_data'],dtype=np.int)