AeroViz 0.1.2__py3-none-any.whl → 0.1.3b0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of AeroViz might be problematic. Click here for more details.
- AeroViz/__init__.py +4 -4
- AeroViz/config/DEFAULT_DATA.csv +1417 -0
- AeroViz/config/DEFAULT_PNSD_DATA.csv +1417 -0
- AeroViz/dataProcess/Chemistry/__init__.py +38 -38
- AeroViz/dataProcess/Chemistry/_calculate.py +15 -15
- AeroViz/dataProcess/Chemistry/_isoropia.py +69 -68
- AeroViz/dataProcess/Chemistry/_mass_volume.py +158 -158
- AeroViz/dataProcess/Chemistry/_ocec.py +109 -109
- AeroViz/dataProcess/Chemistry/_partition.py +19 -18
- AeroViz/dataProcess/Chemistry/_teom.py +8 -11
- AeroViz/dataProcess/Optical/_IMPROVE.py +40 -39
- AeroViz/dataProcess/Optical/__init__.py +35 -35
- AeroViz/dataProcess/Optical/_absorption.py +35 -35
- AeroViz/dataProcess/Optical/_extinction.py +25 -24
- AeroViz/dataProcess/Optical/_mie.py +5 -6
- AeroViz/dataProcess/Optical/_mie_sd.py +89 -90
- AeroViz/dataProcess/Optical/_scattering.py +16 -16
- AeroViz/dataProcess/SizeDistr/__init__.py +37 -37
- AeroViz/dataProcess/SizeDistr/__merge.py +159 -158
- AeroViz/dataProcess/SizeDistr/_merge.py +155 -154
- AeroViz/dataProcess/SizeDistr/_merge_v1.py +162 -161
- AeroViz/dataProcess/SizeDistr/_merge_v2.py +153 -152
- AeroViz/dataProcess/SizeDistr/_merge_v3.py +326 -326
- AeroViz/dataProcess/SizeDistr/_merge_v4.py +272 -274
- AeroViz/dataProcess/SizeDistr/_size_distr.py +51 -51
- AeroViz/dataProcess/VOC/__init__.py +7 -7
- AeroViz/dataProcess/VOC/_potential_par.py +53 -55
- AeroViz/dataProcess/VOC/voc_par.json +464 -0
- AeroViz/dataProcess/__init__.py +4 -4
- AeroViz/dataProcess/core/__init__.py +59 -58
- AeroViz/plot/__init__.py +6 -1
- AeroViz/plot/bar.py +126 -0
- AeroViz/plot/box.py +68 -0
- AeroViz/plot/distribution/distribution.py +421 -427
- AeroViz/plot/meteorology/meteorology.py +240 -292
- AeroViz/plot/optical/__init__.py +0 -1
- AeroViz/plot/optical/optical.py +230 -230
- AeroViz/plot/pie.py +198 -0
- AeroViz/plot/regression.py +210 -0
- AeroViz/plot/scatter.py +99 -0
- AeroViz/plot/templates/__init__.py +0 -3
- AeroViz/plot/templates/contour.py +25 -25
- AeroViz/plot/templates/corr_matrix.py +86 -93
- AeroViz/plot/templates/diurnal_pattern.py +24 -24
- AeroViz/plot/templates/koschmieder.py +106 -106
- AeroViz/plot/templates/metal_heatmap.py +34 -34
- AeroViz/plot/timeseries/timeseries.py +53 -60
- AeroViz/plot/utils/__init__.py +2 -1
- AeroViz/plot/utils/_color.py +57 -57
- AeroViz/plot/utils/_unit.py +48 -48
- AeroViz/plot/utils/fRH.json +390 -0
- AeroViz/plot/utils/plt_utils.py +92 -0
- AeroViz/plot/utils/sklearn_utils.py +49 -0
- AeroViz/plot/utils/units.json +84 -0
- AeroViz/plot/violin.py +79 -0
- AeroViz/process/__init__.py +15 -15
- AeroViz/process/core/DataProc.py +9 -9
- AeroViz/process/core/SizeDist.py +81 -81
- AeroViz/process/method/PyMieScatt_update.py +488 -488
- AeroViz/process/method/mie_theory.py +231 -229
- AeroViz/process/method/prop.py +40 -40
- AeroViz/process/script/AbstractDistCalc.py +103 -103
- AeroViz/process/script/Chemical.py +166 -166
- AeroViz/process/script/IMPACT.py +40 -40
- AeroViz/process/script/IMPROVE.py +152 -152
- AeroViz/process/script/Others.py +45 -45
- AeroViz/process/script/PSD.py +26 -26
- AeroViz/process/script/PSD_dry.py +69 -70
- AeroViz/process/script/retrieve_RI.py +50 -51
- AeroViz/rawDataReader/__init__.py +57 -57
- AeroViz/rawDataReader/core/__init__.py +328 -326
- AeroViz/rawDataReader/script/AE33.py +18 -18
- AeroViz/rawDataReader/script/AE43.py +20 -20
- AeroViz/rawDataReader/script/APS_3321.py +30 -30
- AeroViz/rawDataReader/script/Aurora.py +23 -23
- AeroViz/rawDataReader/script/BC1054.py +40 -40
- AeroViz/rawDataReader/script/EPA_vertical.py +9 -9
- AeroViz/rawDataReader/script/GRIMM.py +21 -21
- AeroViz/rawDataReader/script/IGAC_TH.py +67 -67
- AeroViz/rawDataReader/script/IGAC_ZM.py +59 -59
- AeroViz/rawDataReader/script/MA350.py +39 -39
- AeroViz/rawDataReader/script/NEPH.py +74 -74
- AeroViz/rawDataReader/script/OCEC_LCRES.py +21 -21
- AeroViz/rawDataReader/script/OCEC_RES.py +16 -16
- AeroViz/rawDataReader/script/SMPS_TH.py +25 -25
- AeroViz/rawDataReader/script/SMPS_aim11.py +32 -32
- AeroViz/rawDataReader/script/SMPS_genr.py +31 -31
- AeroViz/rawDataReader/script/TEOM.py +28 -28
- AeroViz/rawDataReader/script/Table.py +12 -12
- AeroViz/rawDataReader/script/VOC_TH.py +16 -16
- AeroViz/rawDataReader/script/VOC_ZM.py +28 -28
- AeroViz/rawDataReader/script/__init__.py +20 -20
- AeroViz/rawDataReader/utils/config.py +161 -161
- AeroViz/tools/database.py +65 -65
- AeroViz/tools/dataclassifier.py +106 -106
- AeroViz/tools/dataprinter.py +51 -51
- AeroViz/tools/datareader.py +38 -38
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/METADATA +5 -4
- AeroViz-0.1.3b0.dist-info/RECORD +110 -0
- AeroViz/config/__init__.py +0 -0
- AeroViz/plot/improve/__init__.py +0 -1
- AeroViz/plot/improve/improve.py +0 -240
- AeroViz/plot/optical/aethalometer.py +0 -77
- AeroViz/plot/templates/event_evolution.py +0 -65
- AeroViz/plot/templates/regression.py +0 -256
- AeroViz/plot/templates/scatter.py +0 -130
- AeroViz/plot/templates/templates.py +0 -398
- AeroViz/plot/utils/_decorator.py +0 -74
- AeroViz-0.1.2.dist-info/RECORD +0 -106
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/LICENSE +0 -0
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/WHEEL +0 -0
- {AeroViz-0.1.2.dist-info → AeroViz-0.1.3b0.dist-info}/top_level.txt +0 -0
AeroViz/process/__init__.py
CHANGED
|
@@ -3,29 +3,29 @@ from pathlib import Path
|
|
|
3
3
|
from pandas import read_csv, concat
|
|
4
4
|
|
|
5
5
|
from AeroViz.process.script import (ImpactProc, ImproveProc, ChemicalProc, ParticleSizeDistProc,
|
|
6
|
-
|
|
6
|
+
ExtinctionDistProc, OthersProc)
|
|
7
7
|
|
|
8
8
|
__all__ = ['DataProcess']
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class DataProcess:
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
def __new__(cls, file_path, reset: bool = False, save_file: Path | str = 'All_data.csv'):
|
|
13
|
+
file_path = Path(file_path)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
print(f'\t\t \033[96m --- Processing Data --- \033[0m')
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if file_path.exists() and not reset:
|
|
18
|
+
return read_csv(file_path, parse_dates=['Time'], index_col='Time',
|
|
19
|
+
na_values=('-', 'E', 'F'), low_memory=False)
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
processor = [ImpactProc, ChemicalProc, ImproveProc, ParticleSizeDistProc, ExtinctionDistProc, OthersProc]
|
|
22
|
+
reset = [False, False, False, False, False, False]
|
|
23
|
+
save_filename = ['IMPACT.csv', 'chemical.csv', 'revised_IMPROVE.csv', 'PSD.csv', 'PESD.csv', 'Others.csv']
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
_df = concat([processor().process_data(reset, save_filename) for processor, reset, save_filename in
|
|
26
|
+
zip(processor, reset, save_filename)], axis=1)
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
# 7. save result
|
|
29
|
+
_df.to_csv(file_path)
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
return _df
|
AeroViz/process/core/DataProc.py
CHANGED
|
@@ -7,13 +7,13 @@ __all__ = ['DataProc']
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class DataProc(ABC):
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
def __init__(self):
|
|
11
|
+
pass
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
@abstractmethod
|
|
14
|
+
def process_data(self,
|
|
15
|
+
reset: bool = False,
|
|
16
|
+
save_filename: str | Path = None
|
|
17
|
+
) -> DataFrame:
|
|
18
|
+
""" Implementation of processing data """
|
|
19
|
+
pass
|
AeroViz/process/core/SizeDist.py
CHANGED
|
@@ -7,84 +7,84 @@ __all__ = ['SizeDist']
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class SizeDist:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
10
|
+
"""
|
|
11
|
+
Attributes
|
|
12
|
+
----------
|
|
13
|
+
|
|
14
|
+
_data: DataFrame
|
|
15
|
+
The processed PSD data stored as a pandas DataFrame.
|
|
16
|
+
|
|
17
|
+
_dp: ndarray
|
|
18
|
+
The array of particle diameters from the PSD data.
|
|
19
|
+
|
|
20
|
+
_dlogdp: ndarray
|
|
21
|
+
The array of logarithmic particle diameter bin widths.
|
|
22
|
+
|
|
23
|
+
_index: DatetimeIndex
|
|
24
|
+
The index of the DataFrame representing time.
|
|
25
|
+
|
|
26
|
+
_state: str
|
|
27
|
+
The state of particle size distribution data.
|
|
28
|
+
|
|
29
|
+
Methods
|
|
30
|
+
-------
|
|
31
|
+
number()
|
|
32
|
+
Calculate number distribution properties.
|
|
33
|
+
|
|
34
|
+
surface(filename='PSSD_dSdlogdp.csv')
|
|
35
|
+
Calculate surface distribution properties.
|
|
36
|
+
|
|
37
|
+
volume(filename='PVSD_dVdlogdp.csv')
|
|
38
|
+
Calculate volume distribution properties.
|
|
39
|
+
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self,
|
|
43
|
+
data: DataFrame,
|
|
44
|
+
state: Literal['dN', 'ddp', 'dlogdp'] = 'dlogdp',
|
|
45
|
+
weighting: Literal['n', 's', 'v', 'ext_in', 'ext_ex'] = 'n'
|
|
46
|
+
):
|
|
47
|
+
self._data = data
|
|
48
|
+
self._dp = np.array(self._data.columns, dtype=float)
|
|
49
|
+
self._dlogdp = np.full_like(self._dp, 0.014)
|
|
50
|
+
self._index = self._data.index.copy()
|
|
51
|
+
self._state = state
|
|
52
|
+
self._weighting = weighting
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def data(self) -> DataFrame:
|
|
56
|
+
return self._data
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def dp(self) -> np.ndarray:
|
|
60
|
+
return self._dp
|
|
61
|
+
|
|
62
|
+
@dp.setter
|
|
63
|
+
def dp(self, new_dp: np.ndarray):
|
|
64
|
+
self._dp = new_dp
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def dlogdp(self) -> np.ndarray:
|
|
68
|
+
return self._dlogdp
|
|
69
|
+
|
|
70
|
+
@dlogdp.setter
|
|
71
|
+
def dlogdp(self, new_dlogdp: np.ndarray):
|
|
72
|
+
self._dlogdp = new_dlogdp
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def index(self):
|
|
76
|
+
return self._index
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def state(self):
|
|
80
|
+
return self._state
|
|
81
|
+
|
|
82
|
+
@state.setter
|
|
83
|
+
def state(self, value):
|
|
84
|
+
if value not in ['dN', 'dlogdp', 'ddp']:
|
|
85
|
+
raise ValueError("state must be 'dlogdp' or 'ddp'")
|
|
86
|
+
self._state = value
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def weighting(self):
|
|
90
|
+
return self._weighting
|