-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read or write Guano MD from zero cross/Anabat format files #16
Comments
@ColinTalbert @riggsd Unfortunately, this is outside of my skill level to implement. Any chance either of you has time to work on this? |
Hi Colin, Abram, This library is specifically focused on GUANO metadata. It was easy and "free" to add support for WAV files as they're so ubiquitous that they're supported out-of-the-box by the Python standard library, so we don't pull in any extra dependencies, and there's almost no extra complexity added to this library. Not to mention that a WAV file's underlying RIFF format is designed to be extensible, so adding GUANO metadata to a WAV file is compatible with every program that reads WAV files. The Anabat file format is considerably more complex, and adding Anabat file support to this library would probably overwhelm the maintenance of this library, not to mention that it'd completely change the point of this project. It makes more sense for an Anabat library to import the GUANO library as a dependency. That is exactly what ZCANT does; in fact, ZCANT includes a one-file Anabat file format API in Python, and uses this library for its GUANO metadata: https://github.com/riggsd/zcant/blob/master/zcant/anabat.py With that said, the Anabat file format was NOT designed for extensibility; rather, it was designed to be terse and focused, written by the tiniest of microcontrollers decades ago. I brainstormed with Chris Corben on how we could embed GUANO metadata in the Anabat file format, and that recommendation is implemented in the ZCANT code above and documented in this section of the GUANO Metadata Specification on "Embedding in Anabat Files": https://github.com/riggsd/guano-spec/blob/master/guano_specification.md#embedding-in-anabat-files An alternate idea, if you're not up for embedding GUANO metadata within the limited binary constraints of an Anabat file (or an extensible WAV file, for that matter) is to write the GUANO metadata as a sidecar file. For a file named # write GUANO metadata somewhere else, say an Anabat file or text file
with open('sidecar_file.guano', 'wb') as outfile:
outfile.write( g.serialize() ) While I'm personally very time-constrained these days, I could spin off the Anabat support code from ZCANT into its own library (with GUANO support provided by this one) if that'd be useful for you. |
I've played around with this a bit, but it seems fairly complex and maybe something someone else has already solved. The code from the Zcant package appears related but doesn't quite seem to work for this for me.
I'd be happy to work on this if it makes sense in the current package.
The text was updated successfully, but these errors were encountered: