AeroViz 0.1.3b0__py3-none-any.whl → 0.1.4__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 +5 -3
- AeroViz/{config → data}/DEFAULT_DATA.csv +1 -1
- AeroViz/dataProcess/Chemistry/__init__.py +7 -7
- AeroViz/dataProcess/Chemistry/_isoropia.py +5 -2
- AeroViz/dataProcess/Chemistry/_mass_volume.py +15 -18
- AeroViz/dataProcess/Chemistry/_ocec.py +2 -2
- AeroViz/dataProcess/Chemistry/_teom.py +2 -1
- AeroViz/dataProcess/Chemistry/isrpia.cnf +21 -0
- AeroViz/dataProcess/Optical/Angstrom_exponent.py +20 -0
- AeroViz/dataProcess/Optical/_IMPROVE.py +13 -15
- AeroViz/dataProcess/Optical/__init__.py +15 -30
- AeroViz/dataProcess/Optical/_absorption.py +21 -47
- AeroViz/dataProcess/Optical/_extinction.py +20 -15
- AeroViz/dataProcess/Optical/_mie.py +0 -1
- AeroViz/dataProcess/Optical/_scattering.py +19 -20
- AeroViz/dataProcess/SizeDistr/__init__.py +7 -7
- AeroViz/dataProcess/SizeDistr/_merge.py +2 -2
- AeroViz/dataProcess/SizeDistr/_merge_v1.py +2 -2
- AeroViz/dataProcess/SizeDistr/_merge_v2.py +2 -2
- AeroViz/dataProcess/SizeDistr/_merge_v3.py +1 -1
- AeroViz/dataProcess/SizeDistr/_merge_v4.py +1 -1
- AeroViz/dataProcess/VOC/__init__.py +3 -3
- AeroViz/dataProcess/__init__.py +28 -6
- AeroViz/dataProcess/core/__init__.py +10 -17
- AeroViz/plot/__init__.py +1 -1
- AeroViz/plot/box.py +2 -1
- AeroViz/plot/optical/optical.py +4 -4
- AeroViz/plot/regression.py +25 -39
- AeroViz/plot/scatter.py +68 -2
- AeroViz/plot/templates/__init__.py +2 -1
- AeroViz/plot/templates/ammonium_rich.py +34 -0
- AeroViz/plot/templates/diurnal_pattern.py +11 -9
- AeroViz/plot/templates/koschmieder.py +51 -115
- AeroViz/plot/templates/metal_heatmap.py +115 -17
- AeroViz/plot/timeseries/__init__.py +1 -0
- AeroViz/plot/timeseries/template.py +47 -0
- AeroViz/plot/timeseries/timeseries.py +275 -208
- AeroViz/plot/utils/plt_utils.py +2 -2
- AeroViz/plot/utils/units.json +5 -0
- AeroViz/plot/violin.py +9 -8
- AeroViz/process/__init__.py +2 -2
- AeroViz/process/script/AbstractDistCalc.py +1 -1
- AeroViz/process/script/Chemical.py +5 -4
- AeroViz/process/script/Others.py +1 -1
- AeroViz/rawDataReader/__init__.py +17 -22
- AeroViz/rawDataReader/{utils/config.py → config/supported_instruments.py} +38 -52
- AeroViz/rawDataReader/core/__init__.py +104 -229
- AeroViz/rawDataReader/script/AE33.py +10 -11
- AeroViz/rawDataReader/script/AE43.py +8 -11
- AeroViz/rawDataReader/script/APS_3321.py +6 -6
- AeroViz/rawDataReader/script/Aurora.py +18 -19
- AeroViz/rawDataReader/script/BC1054.py +11 -15
- AeroViz/rawDataReader/script/EPA_vertical.py +35 -7
- AeroViz/rawDataReader/script/GRIMM.py +2 -9
- AeroViz/rawDataReader/script/{IGAC_ZM.py → IGAC.py} +17 -17
- AeroViz/rawDataReader/script/MA350.py +7 -14
- AeroViz/rawDataReader/script/Minion.py +103 -0
- AeroViz/rawDataReader/script/NEPH.py +24 -29
- AeroViz/rawDataReader/script/SMPS_TH.py +4 -4
- AeroViz/rawDataReader/script/SMPS_aim11.py +6 -6
- AeroViz/rawDataReader/script/SMPS_genr.py +6 -6
- AeroViz/rawDataReader/script/Sunset_OCEC.py +60 -0
- AeroViz/rawDataReader/script/TEOM.py +8 -6
- AeroViz/rawDataReader/script/Table.py +7 -8
- AeroViz/rawDataReader/script/VOC.py +26 -0
- AeroViz/rawDataReader/script/__init__.py +10 -12
- AeroViz/tools/database.py +7 -9
- AeroViz/tools/datareader.py +3 -3
- {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.4.dist-info}/METADATA +1 -1
- AeroViz-0.1.4.dist-info/RECORD +112 -0
- AeroViz/rawDataReader/script/IGAC_TH.py +0 -104
- AeroViz/rawDataReader/script/OCEC_LCRES.py +0 -34
- AeroViz/rawDataReader/script/OCEC_RES.py +0 -28
- AeroViz/rawDataReader/script/VOC_TH.py +0 -30
- AeroViz/rawDataReader/script/VOC_ZM.py +0 -37
- AeroViz-0.1.3b0.dist-info/RECORD +0 -110
- /AeroViz/{config → data}/DEFAULT_PNSD_DATA.csv +0 -0
- /AeroViz/rawDataReader/{utils → config}/__init__.py +0 -0
- {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.4.dist-info}/LICENSE +0 -0
- {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.4.dist-info}/WHEEL +0 -0
- {AeroViz-0.1.3b0.dist-info → AeroViz-0.1.4.dist-info}/top_level.txt +0 -0
AeroViz/process/__init__.py
CHANGED
|
@@ -5,10 +5,10 @@ from pandas import read_csv, concat
|
|
|
5
5
|
from AeroViz.process.script import (ImpactProc, ImproveProc, ChemicalProc, ParticleSizeDistProc,
|
|
6
6
|
ExtinctionDistProc, OthersProc)
|
|
7
7
|
|
|
8
|
-
__all__ = ['
|
|
8
|
+
__all__ = ['DataProcessor', 'ImpactProc', 'ImproveProc', 'ChemicalProc', 'ParticleSizeDistProc', 'ExtinctionDistProc', ]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class DataProcessor:
|
|
12
12
|
def __new__(cls, file_path, reset: bool = False, save_file: Path | str = 'All_data.csv'):
|
|
13
13
|
file_path = Path(file_path)
|
|
14
14
|
|
|
@@ -64,7 +64,7 @@ class ExtinctionDistCalc(AbstractDistCalc):
|
|
|
64
64
|
def __init__(self,
|
|
65
65
|
psd: SizeDist,
|
|
66
66
|
RI: DataFrame,
|
|
67
|
-
method: Literal['internal', 'external', '
|
|
67
|
+
method: Literal['internal', 'external', 'config-shell', 'sensitivity'],
|
|
68
68
|
result_type: Literal['extinction', 'scattering', 'absorption'] = 'extinction'
|
|
69
69
|
):
|
|
70
70
|
self.psd = psd
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
-
from pandas import read_csv, concat, notna, DataFrame
|
|
4
|
+
from pandas import read_csv, concat, notna, DataFrame, to_numeric
|
|
5
5
|
|
|
6
6
|
from AeroViz.process.core import DataProc
|
|
7
7
|
from AeroViz.tools.datareader import DataReader
|
|
@@ -72,7 +72,7 @@ class ChemicalProc(DataProc):
|
|
|
72
72
|
_df['AN'] = 0
|
|
73
73
|
|
|
74
74
|
_df['OM'] = 1.8 * OC
|
|
75
|
-
_df['Soil'] = 28.57 * Soil
|
|
75
|
+
_df['Soil'] = 28.57 * Soil / 1000
|
|
76
76
|
_df['SS'] = 2.54 * SS
|
|
77
77
|
_df['EC'] = EC
|
|
78
78
|
_df['SIA'] = _df['AS'] + _df['AN']
|
|
@@ -159,9 +159,10 @@ class ChemicalProc(DataProc):
|
|
|
159
159
|
if save_file.exists() and not reset:
|
|
160
160
|
return read_csv(save_file, parse_dates=['Time'], index_col='Time')
|
|
161
161
|
else:
|
|
162
|
-
df = concat([DataReader(file) for file in self.file_paths], axis=1)
|
|
162
|
+
df = concat([DataReader(file) for file in self.file_paths], axis=1).apply(to_numeric, errors='coerce')
|
|
163
163
|
|
|
164
|
-
df_mass = df[['NH4+', 'SO42-', 'NO3-', '
|
|
164
|
+
df_mass = df[['NH4+', 'SO42-', 'NO3-', 'Optical_OC', 'Fe', 'Na+', 'Optical_EC', 'PM2.5']].dropna().apply(
|
|
165
|
+
self.mass,
|
|
165
166
|
axis=1)
|
|
166
167
|
df_mass['ALWC'] = df['ALWC']
|
|
167
168
|
df_volume = df_mass[['AS', 'AN', 'OM', 'Soil', 'SS', 'EC', 'total_mass', 'ALWC']].dropna().apply(
|
AeroViz/process/script/Others.py
CHANGED
|
@@ -58,7 +58,7 @@ class OthersProc(DataProc):
|
|
|
58
58
|
# results['fRH_PNSD'] = df['Bext_internal'] / df['Bext_dry']
|
|
59
59
|
results['fRH_IMPR'] = df['total_ext'] / df['total_ext_dry']
|
|
60
60
|
results['OCEC_ratio'] = df['O_OC'] / df['O_EC']
|
|
61
|
-
results['PM1/PM25'] = np.where(df['PM1'] / df['
|
|
61
|
+
results['PM1/PM25'] = np.where(df['PM1'] / df['PM2.5'] < 1, df['PM1'] / df['PM2.5'], np.nan)
|
|
62
62
|
# results['MEE_PNSD'] = df['Bext_internal'] / df['PM25']
|
|
63
63
|
# results['MEE_dry_PNSD'] = df['Bext_dry'] / df['PM25']
|
|
64
64
|
|
|
@@ -1,47 +1,44 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
|
|
4
|
+
from AeroViz.rawDataReader.config.supported_instruments import meta
|
|
3
5
|
from AeroViz.rawDataReader.script import *
|
|
4
|
-
from AeroViz.rawDataReader.utils.config import meta
|
|
5
6
|
|
|
6
7
|
__all__ = ['RawDataReader']
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def RawDataReader(instrument_name: str,
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
path: Path,
|
|
12
|
+
qc: bool = True,
|
|
12
13
|
csv_raw: bool = True,
|
|
13
14
|
reset: bool = False,
|
|
14
15
|
rate: bool = False,
|
|
15
16
|
append_data: bool = False,
|
|
16
|
-
update_meta=None,
|
|
17
17
|
start: datetime | None = None,
|
|
18
18
|
end: datetime | None = None,
|
|
19
19
|
mean_freq='1h',
|
|
20
20
|
csv_out=True,
|
|
21
|
-
**kwargs
|
|
22
21
|
):
|
|
23
22
|
# Mapping of instrument names to their respective classes
|
|
24
23
|
instrument_class_map = {
|
|
25
24
|
'NEPH': NEPH,
|
|
26
25
|
'Aurora': Aurora,
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'APS_3321': APS_3321,
|
|
26
|
+
'SMPS_genr': SMPS_genr,
|
|
27
|
+
'SMPS_aim11': SMPS_aim11,
|
|
30
28
|
'SMPS_TH': SMPS_TH,
|
|
29
|
+
'GRIMM': GRIMM,
|
|
30
|
+
'APS_3321': APS_3321,
|
|
31
31
|
'AE33': AE33,
|
|
32
32
|
'AE43': AE43,
|
|
33
33
|
'BC1054': BC1054,
|
|
34
34
|
'MA350': MA350,
|
|
35
35
|
'TEOM': TEOM,
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'SMPS_genr': SMPS_genr,
|
|
43
|
-
'SMPS_aim11': SMPS_aim11,
|
|
44
|
-
'GRIMM': GRIMM
|
|
36
|
+
'Sunset_OCEC': Sunset_OCEC,
|
|
37
|
+
'IGAC': IGAC,
|
|
38
|
+
'VOC': VOC,
|
|
39
|
+
'Table': Table,
|
|
40
|
+
'EPA_vertical': EPA_vertical,
|
|
41
|
+
'Minion': Minion
|
|
45
42
|
# Add other instruments and their corresponding classes here
|
|
46
43
|
}
|
|
47
44
|
|
|
@@ -51,18 +48,16 @@ def RawDataReader(instrument_name: str,
|
|
|
51
48
|
|
|
52
49
|
# Instantiate the class and return the instance
|
|
53
50
|
reader_module = instrument_class_map[instrument_name].Reader(
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
path=path,
|
|
52
|
+
qc=qc,
|
|
56
53
|
csv_raw=csv_raw,
|
|
57
54
|
reset=reset,
|
|
58
55
|
rate=rate,
|
|
59
|
-
append_data=append_data
|
|
60
|
-
update_meta=update_meta
|
|
56
|
+
append_data=append_data
|
|
61
57
|
)
|
|
62
58
|
return reader_module(
|
|
63
59
|
start=start,
|
|
64
60
|
end=end,
|
|
65
61
|
mean_freq=mean_freq,
|
|
66
62
|
csv_out=csv_out,
|
|
67
|
-
**kwargs
|
|
68
63
|
)
|
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
# Description: Configuration file for rawDataReader
|
|
2
2
|
|
|
3
|
-
instrument = [
|
|
4
|
-
"NEPH",
|
|
5
|
-
"Aurora",
|
|
6
|
-
"AE33",
|
|
7
|
-
"AE43",
|
|
8
|
-
"Table",
|
|
9
|
-
"EPA_vertical",
|
|
10
|
-
"SMPS_NTU(SMPS_3080_3788)",
|
|
11
|
-
"SMPS_TH(SMPS_3080_3772)",
|
|
12
|
-
"APS_3321",
|
|
13
|
-
"TEOM",
|
|
14
|
-
"OCEC"
|
|
15
|
-
]
|
|
16
|
-
|
|
17
3
|
meta = {
|
|
18
4
|
"NEPH": {
|
|
19
|
-
"pattern": "*.
|
|
5
|
+
"pattern": "*.dat",
|
|
20
6
|
"freq": "5min",
|
|
21
7
|
"deter_key": {"Scatter Coe. (550 nm)": ["G"]},
|
|
22
8
|
},
|
|
@@ -27,18 +13,6 @@ meta = {
|
|
|
27
13
|
"deter_key": {"Scatter Coe. (550 nm)": ["G"]},
|
|
28
14
|
},
|
|
29
15
|
|
|
30
|
-
"Table": {
|
|
31
|
-
"pattern": "*.csv",
|
|
32
|
-
"freq": "1h",
|
|
33
|
-
"deter_key": None,
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
"EPA_vertical": {
|
|
37
|
-
"pattern": "*.csv",
|
|
38
|
-
"freq": "1h",
|
|
39
|
-
"deter_key": None,
|
|
40
|
-
},
|
|
41
|
-
|
|
42
16
|
"SMPS_TH": {
|
|
43
17
|
"pattern": "*.txt",
|
|
44
18
|
"freq": "6min",
|
|
@@ -73,18 +47,21 @@ meta = {
|
|
|
73
47
|
"pattern": "[!ST|!CT|!FV]*[!log]_AE33*.dat",
|
|
74
48
|
"freq": "1min",
|
|
75
49
|
"deter_key": {"BC Mass Conc. (880 nm)": ["BC6"]},
|
|
50
|
+
"error_state": [],
|
|
76
51
|
},
|
|
77
52
|
|
|
78
53
|
"AE43": {
|
|
79
54
|
"pattern": "[!ST|!CT|!FV]*[!log]_AE43*.dat",
|
|
80
55
|
"freq": "1min",
|
|
81
56
|
"deter_key": {"BC Mass Conc. (880 nm)": ["BC6"]},
|
|
57
|
+
"error_state": [],
|
|
82
58
|
},
|
|
83
59
|
|
|
84
60
|
"BC1054": {
|
|
85
61
|
"pattern": "*.csv",
|
|
86
62
|
"freq": "1min",
|
|
87
|
-
"deter_key": {"BC Mass Conc. (880 nm)": ["
|
|
63
|
+
"deter_key": {"BC Mass Conc. (880 nm)": ["BC9"]},
|
|
64
|
+
"error_state": [1, 2, 4, 8, 16, 32, 65536],
|
|
88
65
|
},
|
|
89
66
|
|
|
90
67
|
"MA350": {
|
|
@@ -102,7 +79,7 @@ meta = {
|
|
|
102
79
|
},
|
|
103
80
|
},
|
|
104
81
|
|
|
105
|
-
"
|
|
82
|
+
"Sunset_OCEC": {
|
|
106
83
|
"pattern": "*LCRes.csv",
|
|
107
84
|
"freq": "1h",
|
|
108
85
|
"deter_key": {
|
|
@@ -115,13 +92,7 @@ meta = {
|
|
|
115
92
|
},
|
|
116
93
|
},
|
|
117
94
|
|
|
118
|
-
"
|
|
119
|
-
"pattern": "*[!LC|!Blanks]Res.csv",
|
|
120
|
-
"freq": "1h",
|
|
121
|
-
"deter_key": None,
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
"IGAC_TH": {
|
|
95
|
+
"IGAC": {
|
|
125
96
|
"pattern": "*.csv",
|
|
126
97
|
"freq": "1h",
|
|
127
98
|
"deter_key": {
|
|
@@ -138,32 +109,47 @@ meta = {
|
|
|
138
109
|
},
|
|
139
110
|
},
|
|
140
111
|
|
|
141
|
-
"
|
|
112
|
+
"VOC": {
|
|
142
113
|
"pattern": "*.csv",
|
|
143
114
|
"freq": "1h",
|
|
144
|
-
"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
115
|
+
"key": ['Ethane', 'Propane', 'Isobutane', 'n-Butane', 'Cyclopentane', 'Isopentane',
|
|
116
|
+
'n-Pentane', '2,2-Dimethylbutane', '2,3-Dimethylbutane', '2-Methylpentane',
|
|
117
|
+
'3-Methylpentane', 'n-Hexane', 'Methylcyclopentane', '2,4-Dimethylpentane',
|
|
118
|
+
'Cyclohexane', '2-Methylhexane', '2-Methylhexane', '3-Methylheptane',
|
|
119
|
+
'2,2,4-Trimethylpentane', 'n-Heptane', 'Methylcyclohexane',
|
|
120
|
+
'2,3,4-Trimethylpentane', '2-Methylheptane', '3-Methylhexane', 'n-Octane',
|
|
121
|
+
'n-Nonane', 'n-Decane', 'n-Undecane', 'Ethylene', 'Propylene', 't-2-Butene',
|
|
122
|
+
'1-Butene', 'cis-2-Butene', 't-2-Pentene', '1-Pentene', 'cis-2-Pentene',
|
|
123
|
+
'isoprene', 'Acetylene', 'Benzene', 'Toluene', 'Ethylbenzene', 'm,p-Xylene',
|
|
124
|
+
'Styrene', 'o-Xylene', 'Isopropylbenzene', 'n-Propylbenzene', 'm-Ethyltoluene',
|
|
125
|
+
'p-Ethyltoluene', '1,3,5-Trimethylbenzene', 'o-Ethyltoluene',
|
|
126
|
+
'1,2,4-Trimethylbenzene', '1,2,3-Trimethylbenzene', 'm-Diethylbenzene',
|
|
127
|
+
'p-Diethylbenzene'],
|
|
128
|
+
|
|
129
|
+
"key_2": ['Isopentane', 'Hexane', '2-Methylhexane', '3-Methylhexane', '2-Methylheptane', '3-Methylheptane',
|
|
130
|
+
'Propene', '1.3-Butadiene', 'Isoprene', '1-Octene',
|
|
131
|
+
'Benzene', 'Toluene', 'Ethylbenzene', 'm.p-Xylene', 'o-Xylene', 'Iso-Propylbenzene', 'Styrene',
|
|
132
|
+
'n-Propylbenzene', '3.4-Ethyltoluene', '1.3.5-TMB', '2-Ethyltoluene', '1.2.4-TMB', '1.2.3-TMB',
|
|
133
|
+
'Acetaldehyde', 'Ethanol', 'Acetone', 'IPA', 'Ethyl Acetate', 'Butyl Acetate',
|
|
134
|
+
'VCM', 'TCE', 'PCE', '1.4-DCB', '1.2-DCB'],
|
|
135
|
+
"deter_key": None,
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
"Table": {
|
|
158
139
|
"pattern": "*.csv",
|
|
159
140
|
"freq": "1h",
|
|
160
141
|
"deter_key": None,
|
|
161
142
|
},
|
|
162
143
|
|
|
163
|
-
"
|
|
144
|
+
"EPA_vertical": {
|
|
164
145
|
"pattern": "*.csv",
|
|
165
146
|
"freq": "1h",
|
|
166
147
|
"deter_key": None,
|
|
167
148
|
},
|
|
168
149
|
|
|
150
|
+
"Minion": {
|
|
151
|
+
"pattern": "*.csv",
|
|
152
|
+
"freq": "1h",
|
|
153
|
+
"deter_key": None,
|
|
154
|
+
},
|
|
169
155
|
}
|