PyPAM
Allow easy reading and processing of acoustic underwater data.
https://github.com/lifewatch/pypam
Category: Biosphere
Sub Category: Bioacoustics and Acoustic Data Analysis
Last synced: about 11 hours ago
JSON representation
Repository metadata
Python Passive Acoustic Analysis tool for Passive Acoustic Monitoring (PAM)
- Host: GitHub
- URL: https://github.com/lifewatch/pypam
- Owner: lifewatch
- License: gpl-3.0
- Created: 2021-03-11T13:59:03.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2026-03-30T18:48:20.000Z (29 days ago)
- Last Synced: 2026-04-12T01:02:08.393Z (17 days ago)
- Language: Python
- Size: 78.9 MB
- Stars: 50
- Watchers: 10
- Forks: 8
- Open Issues: 22
- Releases: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
README.md
pypam is a python package to analyze underwater sound.
It is made to make easier the processing of underwater data stored in audio files in chunks.
The main classes are AcousticFile, AcousticSurvey and DataSet. The first one is a representation of an audio file
together with all the metadata needed to process the data (such as hydrophone used).
The second one is the representation of a folder where all the files are stored for one deployment.
Here we consider a deployment as a measurement interval corresponding to the time when a hydrophone was in the water,
without changing any recording parameters.
The Dataset is a combination of different AcousticSurveys in one dataset. This is to be used if the user has made
several deployments and wants to process them with the same parameters.
Then pypam allows to go through all the audio files from the deployments only with one line of code and store
the output in netCDF files, including metadata. The package can be used to analyze a single file,
a folder with files or a group of different deployments.
pypam deals with the calibration directly, so the output obtained is already in uPa or dB!
All the documentation can be found on readthedocs
Warning
This package is under active development, use with caution.
Installation
Using pip distribution
pip install lifewatch-pypam
Using git clone
- Clone the package
git clone https://github.com/lifewatch/pypam.git - Use poetry to install the project dependencies
poetry install - Build the project
poetry build
News from version 0.3.0
In version 0.2.0 we removed the detectors, because there are better maintained packages for these purposes.
In version 0.2.1 we added the frequency-dependent calibration!
In version 0.3.0 we changed quite some plot function to make them more flexible with other data products.
We also changed the mean functions to median, so the output in db is the same than the output in uPa
Quickstart
The package is imported as pypam. The audio file names must comply with the needs of
pyhydrophone to be able to read the datetime information.
The user can choose a window chunk size (parameter binsize, in seconds), so all the features / methods
are applied to that window. If set to None, the operations are performed along an entire file.
The available methods and features are:
- Acoustic Indices:
- ACI
- BI
- SH
- TH
- NDSI
- AEI
- ADI
- Zero crossing (average)
- BN peaks
- time-domain features:
- rms
- dynamic_range
- sel
- peak
- rms_envelope
- spectrum_slope
- correlation coefficient
- frequency-domain
- spectrogram (also octave bands spectrogram)
- spectrum (density or power)
- 1/n-octave bands
- hybrid millidecade bands
- long-term spectrogram
- time and frequency
- SPD
Futhermore, there are several plotting functions
- SPD
- spectrum with standard deviation
- boxplots of time series aggregated data
- daily patterns
- LTSA
and some signal-based operations:
- Signal operations
- Noise reduction
- Downsample
- Band filter
- Envelope
- DC noise removal
PyPAM wrappers
PBP (PyPAM Based Processing) is a wrapper for PyPAM to make its use
to compute hybrid millidecade bands more effective.
PBP allows for local or cloud computing.
For more information, you can find it in this repository.
Examples and documentation
See the documentation in readthedocs for a complete reference manual and
example gallery.
In this collection of notebooks, some extra examples can be found of how
to use pypam (under development).
Under development
Planned:
- Add function to generate files per included folder (too big deployments)
- Add options for the user to choose what to do when the blocksize is not multiple of the frames,
and to deal with time keeping - Add a logger that logs the code that was run and the warnings together with the output
- Add deep learning feature extraction (vggish and compatibility with koogu and AVES)
- Add parallel processing options
- Add support for frequency calibration
- Support for reading detections
Cite
Parcerisas, C. (2023). PyPAM: a package to process long-term underwater acoustics data in chunks (0.3.0). Zenodo. https://doi.org/10.5281/zenodo.10037826
Acknowledgements
We want to thank Stan Panier for the beautiful logo.
This project was possible due to the funding on LifeWatch Belgium
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Parcerisas
given-names: Clea
orcid: https://orcid.org/0000-0001-7466-0288
title: "PyPAM: a package to process long-term underwater acoustics data in chunks"
version: 0.1.10
doi: 10.5281/zenodo.7584847
date-released: 2023-03-16
Owner metadata
- Name: LifeWatch.be
- Login: lifewatch
- Email: info@lifewatch.be
- Kind: organization
- Description:
- Website: https://www.lifewatch.be
- Location: Belgium
- Twitter: LifeWatchVLIZ
- Company:
- Icon url: https://avatars.githubusercontent.com/u/15125074?v=4
- Repositories: 14
- Last ynced at: 2023-03-05T02:04:11.392Z
- Profile URL: https://github.com/lifewatch
GitHub Events
Total
- Release event: 1
- Delete event: 14
- Pull request event: 31
- Issues event: 13
- Watch event: 13
- Issue comment event: 26
- Push event: 36
- Pull request review event: 1
- Create event: 9
Last Year
- Release event: 1
- Delete event: 7
- Pull request event: 17
- Issues event: 4
- Watch event: 4
- Issue comment event: 14
- Push event: 9
- Create event: 5
Committers metadata
Last synced: 3 days ago
Total Commits: 591
Total Committers: 10
Avg Commits per committer: 59.1
Development Distribution Score (DDS): 0.531
Commits in past year: 15
Committers in past year: 3
Avg Commits per committer in past year: 5.0
Development Distribution Score (DDS) in past year: 0.2
| Name | Commits | |
|---|---|---|
| Clea Parcerisas | c****s@g****m | 277 |
| Clea Parcerisas | c****p@v****e | 136 |
| Simon Laurent | s****t@v****e | 64 |
| dependabot[bot] | 4****] | 42 |
| Carlos Rueda | c****a@m****g | 33 |
| caplinje-NOAA | j****r@N****v | 16 |
| JotaFan | j****e@g****m | 15 |
| Paul Focke | p****e@v****e | 5 |
| Bart Vanhoorne | b****e@v****e | 2 |
| bart-v | b****v@v****e | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 17 days ago
Total issues: 58
Total pull requests: 122
Average time to close issues: 4 months
Average time to close pull requests: 2 days
Total issue authors: 11
Total pull request authors: 6
Average comments per issue: 0.93
Average comments per pull request: 0.24
Merged pull request: 110
Bot issues: 1
Bot pull requests: 53
Past year issues: 3
Past year pull requests: 11
Past year average time to close issues: N/A
Past year average time to close pull requests: 14 minutes
Past year issue authors: 3
Past year pull request authors: 2
Past year average comments per issue: 0.0
Past year average comments per pull request: 0.0
Past year merged pull request: 8
Past year bot issues: 0
Past year bot pull requests: 8
Top Issue Authors
- cparcerisas (28)
- carueda (13)
- SimLrt32 (6)
- ryjombari (3)
- JeroHub (2)
- LennertSchepers (1)
- JPalmerK (1)
- bramcuyx (1)
- silviaurraa (1)
- dependabot[bot] (1)
- caplinje-NOAA (1)
Top Pull Request Authors
- dependabot[bot] (53)
- cparcerisas (35)
- carueda (14)
- SimLrt32 (12)
- JotaFan (5)
- caplinje-NOAA (3)
Top Issue Labels
- enhancement (16)
- bug (9)
- dependencies (5)
- documentation (2)
- question (1)
Top Pull Request Labels
- dependencies (53)
- python (8)
- documentation (2)
Package metadata
- Total packages: 1
-
Total downloads:
- pypi: 279 last-month
- Total dependent packages: 1
- Total dependent repositories: 1
- Total versions: 11
- Total maintainers: 1
pypi.org: lifewatch-pypam
Facilitate acoustic processing from underwater acoustic recorders
- Homepage: https://github.com/lifewatch/pypam.git
- Documentation: https://lifewatch-pypam.readthedocs.io/
- Licenses: GPL-3.0-or-later
- Latest release: 0.4.0 (published 12 months ago)
- Last Synced: 2026-04-26T10:31:46.458Z (2 days ago)
- Versions: 11
- Dependent Packages: 1
- Dependent Repositories: 1
- Downloads: 279 Last month
-
Rankings:
- Dependent packages count: 10.052%
- Stargazers count: 13.334%
- Forks count: 14.194%
- Average: 18.826%
- Dependent repos count: 21.642%
- Downloads: 34.911%
- Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- JRubics/poetry-publish v1.17 composite
- actions/checkout v3.5.2 composite
- 134 dependencies
- black ^23.3.0
- certifi ^2023.7.22
- coverage ^7.2.5
- cryptography ^41.0.2
- isort ^5.12.0
- matplotlib ^3.7.1
- netcdf4 ^1.6.4
- noisereduce ^2.0.1
- numba ^0.57.0
- numpy ^1.24.3
- openpyxl ^3.1.2
- pandas ^2.0.2
- poetry ^1.5.0
- pre-commit ^3.3.1
- pyhydrophone ^0.1.7
- pytest ^7.3.1
- pytest-cov ^4.1.0
- python >=3.8.1, <3.12.0
- python-dateutil ^2.8.2
- python-dotenv ^1.0.0
- pyyaml ^6.0
- scikit-learn ^1.2.2
- scikit-maad ^1.4.0
- seaborn ^0.12.2
- setuptools ^68.1.0
- soundfile ^0.12.1
- syrupy ^4.0.4
- tqdm ^4.65.0
- xarray 2023.01.0
Score: 12.221158282948215