A modular Python toolkit to build, analyze, and extend aerosol particle populations.
Project description
part2pop
A modular Python toolkit for scaling particle-level models to predict population-level aerosol effects.
part2pop is a lightweight Python library that provides a standardized representation of aerosol particles and populations, together with modular builders for species, particle populations, optical properties, freezing properties, and analysis tools.
Its builder/registry design makes the system easily extensible: new population types, particle morphologies, freezing parameterizations, or species definitions can be added by placing small modules into the appropriate factory directory—without modifying core code.
The framework enables reproducible process-level investigations, sensitivity studies, and intercomparison analyses across diverse model and observational datasets by providing a consistent interface for aerosol populations derived from models, measurements, or parameterized distributions.
Features
- Standardized aerosol representation via
AerosolSpecies,AerosolParticle, andParticlePopulation - Species registry with density, refractive index, hygroscopicity, and thermodynamic properties
- Population builders for monodisperse, lognormal, sampled, and model-derived populations
- Optical-property builders supporting homogeneous spheres, core–shell particles, and fractal aggregates
- Freezing-property builders for immersion-freezing metrics
- Analysis utilities for size distributions, hygroscopic growth, CCN activation, and bulk moments
- Visualization tools for size distributions, optical coefficients, and freezing curves
Optional external packages (e.g., PyMieScatt, pyBCabs, netCDF4) are used when available.
Installation
pip install part2pop
For development:
git clone https://github.com/pnnl/part2pop.git
cd part2pop
pip install -e .
Quick start
from part2pop.population.builder import build_population
config = {
"type": "monodisperse",
"diameter": 0.2e-6,
"species_masses": {"SO4": 1e-15, "BC": 5e-16},
}
pop = build_population(config)
print(pop)
More examples are available in the project repository.
Contributing
part2pop is designed so that all extensibility happens through factories.
New population types, optical morphologies, freezing parameterizations, diagnostics, and visualization types can be added by placing small modules in the appropriate factory directories without changing the core API.
Please open an issue or pull request to discuss proposed additions.
License
See the LICENSE file in the repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file part2pop-0.1.1.tar.gz.
File metadata
- Download URL: part2pop-0.1.1.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2e3476e907cbdccbbbed88c3d4508005cba8b4ad047ec028fb16b8492c61a76
|
|
| MD5 |
3b2bdd4f50cf3199c1a5229e1fa60f40
|
|
| BLAKE2b-256 |
7fba83983c9b8de8818ac1ca930541d734a100cd4f4bca16a12f649fdd7155fa
|
File details
Details for the file part2pop-0.1.1-py3-none-any.whl.
File metadata
- Download URL: part2pop-0.1.1-py3-none-any.whl
- Upload date:
- Size: 101.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2a6360b7e20d9e4cacc9911ef64358417e2ec776f7b2b7b1552e6f30046c764
|
|
| MD5 |
3c0472428ed036284ed8f9a6f443a966
|
|
| BLAKE2b-256 |
2ee0188645f1dd7f34c4daf4af889eaf1989efcc8ca71fafef9e2ad6c964f780
|