I have tried to read a file in AH format with obspy.core.stream.read. If I don’t specify the format, I get the error “Unknown format for file”. If I specify the format, the error says it cannot open the file.
Does anyone usually use AH files with obspy? Although it is an old file of mine, I don’t have any particular reason to think that the file is corrupted.
I am attaching the file, perhaps someone can give a try.
yes, please open an issue on GitHub.
On a first glance (I don't know much about the AH module), it seems that
your file is not AH v2 as it should have some magic number in the first
bytes of the file. Furthermore, it seems that our "is AH v1"-code
expects some information on following string header field lengths in
places where your file only has null-strings. So we need to check in
more detail what's up with this file.. whether it's a valid AH file and
our reader fails, or whether it's a malformed file..
Thanks for these details, Tobias.
I have a bunch of these files that I used to open with an old homemade software. Unfortunatly I don’t have access to this software anymore. It is also plausible that the way I was “taught” to build these ah files was specific for that software. I will try to find out more and open the the issue.