Skip to main content

Aerosol data processing and visualization toolkit. Read, QC, and analyze data from SMPS, APS, AE33, TEOM, Nephelometer, XRF, and 15+ atmospheric instruments.

Project description

AeroViz

Aerosol Data Processing and Visualization Toolkit for Atmospheric Research

Python PyPI Pytest Documentation License

AeroViz is a Python toolkit for reading, processing, and visualizing aerosol measurement data. It supports 18+ atmospheric instruments with built-in quality control, data processing, and publication-ready visualizations.

Installation

pip install AeroViz

Quick Start

from AeroViz import RawDataReader

# Read AE33 Aethalometer data (black carbon)
df = RawDataReader(
    instrument='AE33',
    path='/path/to/data',
    start='2024-01-01',
    end='2024-12-31',
    mean_freq='1h',  # Hourly averages
    qc=True          # Apply quality control
)

# Output: DataFrame with columns like BC1-BC7, abs_370-abs_950, AAE, eBC
print(df[['eBC', 'AAE']].describe())

Supported Instruments

Black Carbon Monitors

Instrument Description Output Columns
AE33 Magee Aethalometer (7-wavelength) BC1-BC7, abs_370-abs_950, AAE, eBC
AE43 Magee Aethalometer (7-wavelength) BC1-BC7, abs_370-abs_950, AAE, eBC
BC1054 Met One Black Carbon Monitor BC, abs_880
MA350 AethLabs microAeth (5-wavelength) BC1-BC5, abs_375-abs_880
# Example: Read black carbon data
bc = RawDataReader('AE33', '/data/AE33', '2024-01-01', '2024-06-30')
print(f"Mean eBC: {bc['eBC'].mean():.2f} ng/m³")
print(f"Mean AAE: {-bc['AAE'].mean():.2f}")  # AAE stored as negative

Particle Sizers

Instrument Description Size Range Output Columns
SMPS Scanning Mobility Particle Sizer 10-1000 nm Size bins, total_num, GMD_num, GSD_num
APS Aerodynamic Particle Sizer 0.5-20 μm Size bins, total_num, GMD_num, GSD_num
GRIMM Optical Particle Counter 0.25-32 μm Size bins, number concentrations
# Example: Read SMPS size distribution
smps = RawDataReader(
    'SMPS', '/data/SMPS', '2024-01-01', '2024-06-30',
    size_range=(10, 500)  # Filter to 10-500 nm
)
print(f"Total number: {smps['total_num'].mean():.0f} #/cm³")
print(f"GMD: {smps['GMD_num'].mean():.1f} nm")

Mass Concentration

Instrument Description Output Columns
TEOM Tapered Element Oscillating Microbalance PM_NV, PM_Total, Volatile_Fraction
BAM1020 Beta Attenuation Monitor PM2.5, PM10
# Example: Read TEOM PM mass data
teom = RawDataReader('TEOM', '/data/TEOM', '2024-01-01', '2024-06-30')
print(f"PM2.5 (non-volatile): {teom['PM_NV'].mean():.1f} μg/m³")
print(f"PM2.5 (total): {teom['PM_Total'].mean():.1f} μg/m³")

Optical Instruments

Instrument Description Output Columns
NEPH TSI Nephelometer scattering_B, scattering_G, scattering_R, SAE
Aurora Ecotech Aurora 3000 scattering_B, scattering_G, scattering_R, SAE
# Example: Read nephelometer scattering data
neph = RawDataReader('Aurora', '/data/Aurora', '2024-01-01', '2024-06-30')
print(f"Scattering (550nm): {neph['scattering_G'].mean():.1f} Mm⁻¹")

Chemical Composition

Instrument Description Output Columns
Xact Cooper XRF Heavy Metals Fe, Zn, Pb, Cu, Mn, Cr, Ni, As, Cd, ...
OCEC Sunset OC/EC Analyzer OC, EC, TC, OC1-OC4, EC1-EC3
IGAC Ion Chromatograph SO4²⁻, NO3⁻, Cl⁻, NH4⁺, Na⁺, K⁺, ...
Q-ACSM Aerosol Chemical Speciation Monitor Org, SO4, NO3, NH4, Chl
# Example: Read XRF heavy metals data
xrf = RawDataReader('Xact', '/data/Xact', '2024-01-01', '2024-06-30')
print(f"Fe: {xrf['Fe'].mean():.1f} ng/m³")
print(f"Pb: {xrf['Pb'].mean():.2f} ng/m³")

Other Instruments

Instrument Description
VOC Volatile Organic Compounds Analyzer
EPA Taiwan EPA Air Quality Data
Minion Low-cost Sensor Network

Key Parameters

Parameter Type Description Default
instrument str Instrument name (see tables above) Required
path str/Path Directory containing raw data files Required
start str/datetime Start date ('2024-01-01' or datetime) Required
end str/datetime End date Required
mean_freq str Output frequency: '1h', '30min', '1D' '1h'
qc bool/str Quality control: True, False, or 'MS' for monthly stats True
reset bool/str True to reprocess, 'append' to add new data False
size_range tuple Size range in nm for SMPS/APS: (min, max) None

Quality Control

AeroViz applies automatic QC based on instrument-specific rules. The QC_Flag column indicates data quality:

Flag Description
Valid Data passed all QC checks
Insufficient Not enough raw data points in period
Status Error Instrument reported error status
Invalid BC Black carbon outside valid range
Invalid Number Conc Particle count outside valid range
Spike Detected sudden unrealistic change
# Check data quality
df = RawDataReader('AE33', '/data/AE33', '2024-01-01', '2024-06-30')
print(df['QC_Flag'].value_counts())
# Valid          8000
# Insufficient    300
# Status Error     60

Data Processing

Advanced analysis with specialized modules:

from AeroViz import DataProcess
from pathlib import Path

# Optical property calculations
optical = DataProcess(method='Optical', path_out=Path('./results'))

# Available methods:
# - 'Chemistry': Mass reconstruction, volume calculation, kappa
# - 'Optical': Mie theory, IMPROVE extinction, RI retrieval
# - 'SizeDistr': SMPS-APS merge, mode fitting, lung deposition
# - 'VOC': OFP, SOAP, MIR calculations

Visualization

Publication-ready plots:

from AeroViz import plot

# Time series, diurnal patterns, wind rose, polar plots, etc.

File Structure

AeroViz expects data organized by station and instrument:

/data/
├── Station_Instrument/
│   ├── raw_file_001.dat
│   ├── raw_file_002.dat
│   └── instrument_outputs/    # Auto-generated
│       ├── output_instrument.csv
│       ├── _read_instrument_qc.csv
│       └── report.json

Documentation

Contributing

Contributions are welcome! Please see our GitHub Issues for bug reports and feature requests.

License

MIT License - see LICENSE for details.

Citation

If you use AeroViz in your research, please cite:

AeroViz: Aerosol Data Processing and Visualization Toolkit
https://github.com/Alex870521/AeroViz

Contributors

Alex870521 yrr-Su Masbear

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aeroviz-0.1.25.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aeroviz-0.1.25-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file aeroviz-0.1.25.tar.gz.

File metadata

  • Download URL: aeroviz-0.1.25.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aeroviz-0.1.25.tar.gz
Algorithm Hash digest
SHA256 c0bb2e251c701210714863624012eefe2bfd2f1bca57a04fc0bf47dc85e7d4e8
MD5 5955354bf592eb9e30539ca9604d5f2c
BLAKE2b-256 65cc568b1facf7ff3726f008fef80cb7ff7578735c0b2db7bf03ff31a1d09779

See more details on using hashes here.

Provenance

The following attestation bundles were made for aeroviz-0.1.25.tar.gz:

Publisher: publish.yml on Alex870521/AeroViz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aeroviz-0.1.25-py3-none-any.whl.

File metadata

  • Download URL: aeroviz-0.1.25-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aeroviz-0.1.25-py3-none-any.whl
Algorithm Hash digest
SHA256 9934c1d0a0d8e4a2d93e25c566ffbf59f929abbad0c3d3bfc27dd51724439b45
MD5 b5b58fa145db80ec32f75de9dc96f304
BLAKE2b-256 24a048764dd1020a967fab8f2da5e73fb22a4899fe19840d3afe95a60fec971a

See more details on using hashes here.

Provenance

The following attestation bundles were made for aeroviz-0.1.25-py3-none-any.whl:

Publisher: publish.yml on Alex870521/AeroViz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page