Hello ObsPy Forum,
I’m trying to load/read wfdisc/css format data so I can convert them to an easier to manipulate format (e.g., sac) for subsequent Earthworm ingestion/processing. I’ve tried following the wfdisc table format specified in this link but I’m getting some cryptic “KeyError” messages (see below). Can anyone provide some guidance or suggestions regarding reading these data? I’m relatively new to ObsPy so perhaps it’s something obvious. I’m also looking at using Pisces but no luck so far. I’ve uploaded a working example here. Any help would be greatly appreciated.
Many thanks,
Jonathan
st=read(‘/Users/jweiss/Dropbox/PTWC/wfdisc_stuff/2024001/2024001.mod.wfdisc’,format=‘CSS’,debug_headers=True)
Traceback (most recent call last):
File “”, line 1, in
File “/opt/miniconda3/lib/python3.12/site-packages/decorator.py”, line 232, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/core/util/decorator.py”, line 297, in _map_example_filename
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/core/stream.py”, line 208, in read
st = _generic_reader(pathname_or_url, _read, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/core/util/base.py”, line 658, in _generic_reader
generic = callback_func(pathnames[0], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/decorator.py”, line 232, in fun
return caller(func, *(extras + args), **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/core/util/decorator.py”, line 208, in uncompress_file
result = func(filename, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/core/stream.py”, line 249, in _read
stream, format = _read_from_plugin(‘waveform’, filename, format=format,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/core/util/base.py”, line 423, in _read_from_plugin
list_obj = read_format(filename, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/miniconda3/lib/python3.12/site-packages/obspy/io/css/core.py”, line 129, in _read_css
dtype = DTYPE[line[143:145]]
~~~~~^^^^^^^^^^^^^^^
KeyError: b’ s’