Skip to content

DataProcess

數據處理模組,提供氣膠數據的計算與分析功能。

模組結構

dataProcess/
├── Chemistry/    # 化學成分處理
├── Optical/      # 光學特性處理
├── SizeDistr/    # 粒徑分布處理
└── VOC/          # 揮發性有機物處理

快速開始

from pathlib import Path
from AeroViz.dataProcess import DataProcess

# 使用工廠函數建立處理器
dp = DataProcess(
    method='SizeDistr',      # 'Chemistry', 'Optical', 'SizeDistr', 'VOC'
    path_out=Path('./output'),
    csv=True,
    excel=False
)

# 或直接導入類
from AeroViz.dataProcess.SizeDistr import SizeDist
from AeroViz.dataProcess.Chemistry import Chemistry

模組列表

模組 說明 文檔
SizeDistr 粒徑分布處理 SizeDist 類、SMPS-APS 合併
Chemistry 化學成分處理 質量重建、氣粒分配、折射率
Optical 光學特性處理 IMPROVE、Mie、折射率反演
VOC VOC 處理 臭氧生成潛勢

API 參考

AeroViz.dataProcess.DataProcess

DataProcess(method: str, path_out: Path, excel: bool = False, csv: bool = True)

Factory function to create appropriate data processing module based on method type.

This function serves as an entry point for different data processing methods in AeroViz. It returns an instance of the appropriate processor class based on the specified method.

Parameters:

Name Type Description Default
method str

The processing method to use. Must be one of: 'Chemistry', 'Optical', 'SizeDistr', or 'VOC'.

required
path_out Path

Path where processed output files will be saved.

required
excel bool

Whether to save output in Excel format.

False
csv bool

Whether to save output in CSV format.

True

Returns:

Type Description
object

Instance of the selected processing class initialized with the provided parameters.

Raises:

Type Description
ValueError

If the specified method name is not in the supported methods list.

Examples:

>>> from AeroViz import DataProcess
>>> from pathlib import Path
>>> processor = DataProcess(method='Optical', path_out=Path('./results'))