pypamguard is a package for processing PAMGuard binary file outputs in Python.
- PyPI: https://pypi.org/project/pypamguard/
- GitHub: https://github.com/PAMGuard/pypamguard
- Documentation: https://www.pamguard.org/pypamguard/
- Website: https://www.pamguard.org/
- Zenodo: https://doi.org/10.5281/zenodo.16789563
pip install pypamguardExample of loading in a simple PAMGuard data file into Python.
import pypamguard
df = pypamguard.load_pamguard_binary_file('path/to/data/file.pgdf')Then, for example, you can print out the file header like so.
print(df.file_info.file_header) # File header
print(df.file_info.file_header.version) # File versionModules also have a file_info.module_header, file_info.module_footer, file_info.file_footer, and most importantly data and background.
print("File length", len(df.data)) # Number of module data chunks
first_obj = df.data[0] # First module data chunk
for chunk in df.data: # Looping through the data
print(chunk.identifier)For more information, see the documentation.
Please use the Github issue tracker to submit bugs or feature requests.
This software is distributed under the terms of the MIT license. pypamguard is free and open source.
If you use this code, please cite it as listed on Zenodo: https://doi.org/10.5281/zenodo.16789563 e.g. James Sullivan. (2025). PAMGuard/pypamguard: Version 1.0.0 (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.16789564
Check CONTRIBUTING.md to get started.