Currently, I am working on a dataset with SEG2 format that has important headers within each waveform’s stats. Obspy reads them and I can correct the faulty traces but , as it is said in the documentation, I cannot write the filtered data into the SEG2 format.
I tried saving in different formats but I am missing important headers like: Channel number, source location, receiver location, …! Any Idea how I can get around this issue?
Another option for me is writing as H5 files but again, Obspy is not supporting it. I would appreciate it if somebody can guide me
to guarantee persistence of waveform metadata I personally use obspyh5:
For a more standardized writing to HDF5 format, see the asdf file format. I did not use it and I do not know if it supports arbitrary metadata (stats attributes) as obspyh5.
Back-ground: HDF5 uses indices for writing data. The index is created by using seed id, starttime and endtime. In your case the empty seed id appears to trigger a bug.
It works right now. However, I noticed that the stats of the SEG2 file are not preserved. Is there anyway I can import those attributes to the created H5?
don’t know obpsyh5 so can’t say much, but either you or that other library is trying to write a stream in "H5" (or is that HS in screenshot?) format, which is not a format that obspy ships with natively, so either that write attempt is a mistake or "H5" write support should have been installed by a third party library through our plugin system but it wasn’t.