Skip to content

WIP

Thanks for your interest in PBP. This documentation is still a work in progress 🚧. Please get in touch if you have any questions or suggestions.

MBARI PBP

The mbari-pbp package allows to process ocean audio data archives to daily analysis products of hybrid millidecade spectra using PyPAM.

You can use PBP by directly running the included CLI the programs, as well as a dependency in your own Python code.

Features:

  • Audio metadata extraction for managed timekeeping
    • Start and duration of recognized wav and flac sound files either locally or in cloud (JSON)
    • Coverage plot of sound recordings
  • Audio file processing
    • Frequency and psd array output
    • Concatenation of processed 1-minute segments for daily product
    • Calibration with given sensitivity file (NetCDF), or flat sensitivity value
  • Data products
    • NetCDF with metadata
    • Summary plot
  • Cloud processing
    • Inputs can be downloaded from and uploaded to S3
    • Inputs can be downloaded from public GCS bucket
    • Outputs can be uploaded to GCS

Installation

On your environment the only requirement is Python 3.9, 3.10, or 3.11.1 Make sure your Python installation includes the pip and venv modules, or install them separately as needed.

You can run python3 --version to check the version of Python installed.

As a general practice, it is recommended to use a virtual environment for the installation.

python3.9 -m venv virtenv
source virtenv/bin/activate

Install the package:

pip install mbari-pbp

If you are upgrading from a previous version, you can use the following command:

pip install --upgrade mbari-pbp

Advanced Installation

If you want to install the package from source and have already installed with the pip install mbari-pbp command, you can install the package from source with the following command. This will get the latest version 🚧 from the main branch.

pip install --no-cache-dir --force-reinstall  git+https://github.com/mbari-org/pbp.git

Programs

The package includes the following CLI programs:

Program Description
pbp-meta-gen Generate JSON files with audio metadata.
pbp-hmb-gen Main HMB generation program.
pbp-cloud Program for cloud based processing.
pbp-hmb-plot Utility program to plot resulting HMB product.

References


  1. As currently required by PyPAM