A unified analysis framework for standardizing aerosol populations from models, observations, and parameterizations.
Project description
part2pop
A unified analysis framework for standardizing aerosol populations from models, observations, and parameterizations.
part2pop is a lightweight Python library that provides a standardized representation of aerosol particles and populations. By translating model-derived, observation-constrained, and parameterized population descriptions into a common particle-population interface, part2pop lets particle-level process models and diagnostics be applied consistently across data sources. Its modular, registry-based architecture supports extensible population builders, reusable analyses, and AI-assisted development workflows.
The framework supports reproducible process-level investigations, sensitivity studies, and intercomparison analyses by providing a consistent interface for aerosol populations derived from models, measurements, and parameterized distributions.
Features
- Standardized aerosol representation via
AerosolSpecies,Particle, andParticlePopulation - Species registry with density, hygroscopicity (
kappa), molar mass, and surface tension - Population builders for monodisperse, lognormal, sampled, observation-based, 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, optical properties, and bulk moments
- Visualization tools for size distributions, optical coefficients, and freezing curves
Optional external packages, including PyMieScatt, pyBCabs, and netCDF4, are used when available.
Installation
# After the 1.0.0 release is published on PyPI:
pip install part2pop
For reviewers/users who need the current repository state before (or independent of) the PyPI 1.0.0 release, install from source:
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",
"N": [1.0e8],
"D": [0.2e-6],
"aero_spec_names": [["SO4", "BC"]],
"aero_spec_fracs": [[0.7, 0.3]],
"D_is_wet": False,
}
pop = build_population(config)
print(pop.get_Ntot())
print([species.name for species in pop.species])
For end-to-end analysis and plotting workflows, see the notebooks in the examples directory.
Interactive viewer
An experimental Streamlit UI lets you build populations through the factory registries and render existing visualization builders.
For a source checkout, run:
pip install -e .
streamlit run launch_viewer.py
The viewer source lives under viewer/. The sidebar lists registered population and plot types; choose a population and visualization workflow, adjust the metadata-driven controls, and render figures and diagnostics interactively.
Contributing
part2pop is designed so that new population types, optical morphologies, freezing parameterizations, diagnostics, and visualization types can be added through factory/registry modules without changing the core population representation.
Please open an issue or pull request to discuss proposed additions.
See the contribution guidelines for contribution and support information.
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-1.0.0.tar.gz.
File metadata
- Download URL: part2pop-1.0.0.tar.gz
- Upload date:
- Size: 11.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
167e11684b232f068960e110a08d3a2446055e45c7e426ab48553e4a899c712a
|
|
| MD5 |
bd16f89b271eada2b0adfccb953d4cf9
|
|
| BLAKE2b-256 |
ff94d9e93f5c8dda5355b57eb1d86579d46971fc1e2bdc15ca983276322bd86e
|
File details
Details for the file part2pop-1.0.0-py3-none-any.whl.
File metadata
- Download URL: part2pop-1.0.0-py3-none-any.whl
- Upload date:
- Size: 144.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
375fbcf2b79d298fa482129818bf4d12e5b50a64b8752d147bd628a3fbb0bd27
|
|
| MD5 |
ab344f701058d924a2d248e8b96673d1
|
|
| BLAKE2b-256 |
1a6f4eb9e89a4f4be121c90139d2198e3c6fb5599521478ec6adb9c4f7e5a257
|