Metadata-Version: 2.1
Name: mbari-pbp
Version: 0.3.0b3
Summary: PyPAM based Processing
Home-page: https://github.com/mbari-org/pbp
License: MIT
Author: Carlos Rueda
Author-email: carueda@mbari.org
Requires-Python: >=3.9,<3.12.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Pyarrow (==15.0.0)
Requires-Dist: boto3 (==1.34.47)
Requires-Dist: dataclasses-json (==0.6.4)
Requires-Dist: google-cloud-storage (==2.14.0)
Requires-Dist: h5netcdf (==1.3.0)
Requires-Dist: lifewatch-pypam (==0.3.0)
Requires-Dist: marshmallow (==3.20.2)
Requires-Dist: progressbar2 (==3.53.1)
Requires-Dist: pvlib (==0.10.3)
Requires-Dist: python-dateutil (==2.8.2)
Requires-Dist: pyyaml (==6.0.1)
Requires-Dist: soundfile (==0.12.1)
Project-URL: Repository, https://github.com/mbari-org/pbp
Description-Content-Type: text/markdown

# PyPAM based data processing

This package uses [PyPAM](https://github.com/lifewatch/pypam/)
to generate _hybrid millidecade band spectra_ for soundscape data.

**Status**: Functional version, including support for cloud based processing.

- [x] JSON generation of timekeeping
- [x] Timekeeping based on given JSON indicating start and duration of every available (recognized) sound file
- [x] Audio file processing
    - [x] Frequency and psd array output
    - [x] Concatenation of processed 1-minute segments for daily product
    - [x] Calibration with given sensitivity file (NetCDF)
    - [x] Calibration with given flat sensitivity value
- [x] Data products
    - [x] NetCDF with metadata
    - [x] CSV (optional)
    - [x] Summary plot (optional)
- [x] Cloud processing
    - [x] Inputs can be downloaded from S3
    - [x] Outputs can be uploaded to S3
    - [x] Inputs can be downloaded from public GCS bucket
    - [ ] Outputs can be uploaded to GCS

TODO more details

## Setup

### Install PBP

    pip install mbari-pbp

### Programs

- `pbp` - Main PBP program, run `pbp --help` for usage.

- `pbp-cloud` - Program for cloud based processing. 
   All parameters passed via environment variables, see source file.

- `pbp-plot` - Plotting program: `pbp-plot.py --help`.
 
- `pbp-json-gen` - Program to generate JSONs with audio metadata,
  run `pbp-json-gen --help` for usage.

## Refs

- PyPAM - Python tool for Passive Acoustic Monitoring –
  <https://doi.org/10.5281/zenodo.6044593>
- Computation of single-sided mean-square sound pressure spectral density with 1 Hz resolution follows
  ISO 18405 3.1.3.13 (International Standard ISO 18405:2017(E), Underwater Acoustics – Terminology. Geneva: ISO)
  – https://www.iso.org/standard/62406.html
- Hybrid millidecade spectra: A practical format for exchange of long-term ambient sound data –
  <https://asa.scitation.org/doi/10.1121/10.0003324>
- Erratum: Hybrid millidecade spectra –
  <https://asa.scitation.org/doi/10.1121/10.0005818>

## Development

See [DEVELOPMENT.md](https://github.com/mbari-org/pypam-based-processing/blob/main/DEVEL.md) for details.

