AeroViz 0.1.3__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 +7 -5
- AeroViz/{config → data}/DEFAULT_DATA.csv +1 -1
- AeroViz/dataProcess/Chemistry/__init__.py +40 -40
- AeroViz/dataProcess/Chemistry/_calculate.py +15 -15
- AeroViz/dataProcess/Chemistry/_isoropia.py +72 -68
- AeroViz/dataProcess/Chemistry/_mass_volume.py +158 -161
- AeroViz/dataProcess/Chemistry/_ocec.py +109 -109
- AeroViz/dataProcess/Chemistry/_partition.py +19 -18
- AeroViz/dataProcess/Chemistry/_teom.py +9 -11
- AeroViz/dataProcess/Chemistry/isrpia.cnf +21 -0
- AeroViz/dataProcess/Optical/Angstrom_exponent.py +20 -0
- AeroViz/dataProcess/Optical/_IMPROVE.py +40 -41
- AeroViz/dataProcess/Optical/__init__.py +29 -44
- AeroViz/dataProcess/Optical/_absorption.py +21 -47
- AeroViz/dataProcess/Optical/_extinction.py +31 -25
- AeroViz/dataProcess/Optical/_mie.py +5 -7
- AeroViz/dataProcess/Optical/_mie_sd.py +89 -90
- AeroViz/dataProcess/Optical/_scattering.py +19 -20
- AeroViz/dataProcess/SizeDistr/__init__.py +39 -39
- 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 +327 -327
- AeroViz/dataProcess/SizeDistr/_merge_v4.py +273 -275
- AeroViz/dataProcess/SizeDistr/_size_distr.py +51 -51
- AeroViz/dataProcess/VOC/__init__.py +9 -9
- AeroViz/dataProcess/VOC/_potential_par.py +53 -55
- AeroViz/dataProcess/__init__.py +28 -6
- AeroViz/dataProcess/core/__init__.py +59 -65
- AeroViz/plot/__init__.py +7 -2
- AeroViz/plot/bar.py +126 -0
- AeroViz/plot/box.py +69 -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 +196 -0
- AeroViz/plot/scatter.py +165 -0
- AeroViz/plot/templates/__init__.py +2 -4
- AeroViz/plot/templates/ammonium_rich.py +34 -0
- AeroViz/plot/templates/contour.py +25 -25
- AeroViz/plot/templates/corr_matrix.py +86 -93
- AeroViz/plot/templates/diurnal_pattern.py +28 -26
- AeroViz/plot/templates/koschmieder.py +59 -123
- AeroViz/plot/templates/metal_heatmap.py +135 -37
- AeroViz/plot/timeseries/__init__.py +1 -0
- AeroViz/plot/timeseries/template.py +47 -0
- AeroViz/plot/timeseries/timeseries.py +324 -264
- AeroViz/plot/utils/__init__.py +2 -1
- AeroViz/plot/utils/_color.py +57 -57
- AeroViz/plot/utils/_unit.py +48 -48
- AeroViz/plot/utils/plt_utils.py +92 -0
- AeroViz/plot/utils/sklearn_utils.py +49 -0
- AeroViz/plot/utils/units.json +5 -0
- AeroViz/plot/violin.py +80 -0
- AeroViz/process/__init__.py +17 -17
- 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 +168 -167
- 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 +53 -58
- AeroViz/rawDataReader/config/supported_instruments.py +155 -0
- AeroViz/rawDataReader/core/__init__.py +233 -356
- AeroViz/rawDataReader/script/AE33.py +17 -18
- AeroViz/rawDataReader/script/AE43.py +18 -21
- AeroViz/rawDataReader/script/APS_3321.py +30 -30
- AeroViz/rawDataReader/script/Aurora.py +23 -24
- AeroViz/rawDataReader/script/BC1054.py +36 -40
- AeroViz/rawDataReader/script/EPA_vertical.py +37 -9
- AeroViz/rawDataReader/script/GRIMM.py +16 -23
- AeroViz/rawDataReader/script/IGAC.py +90 -0
- AeroViz/rawDataReader/script/MA350.py +32 -39
- AeroViz/rawDataReader/script/Minion.py +103 -0
- AeroViz/rawDataReader/script/NEPH.py +69 -74
- 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/Sunset_OCEC.py +60 -0
- AeroViz/rawDataReader/script/TEOM.py +30 -28
- AeroViz/rawDataReader/script/Table.py +13 -14
- AeroViz/rawDataReader/script/VOC.py +26 -0
- AeroViz/rawDataReader/script/__init__.py +18 -20
- AeroViz/tools/database.py +64 -66
- AeroViz/tools/dataclassifier.py +106 -106
- AeroViz/tools/dataprinter.py +51 -51
- AeroViz/tools/datareader.py +38 -38
- {AeroViz-0.1.3.dist-info → AeroViz-0.1.4.dist-info}/METADATA +5 -4
- AeroViz-0.1.4.dist-info/RECORD +112 -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/rawDataReader/script/IGAC_TH.py +0 -104
- AeroViz/rawDataReader/script/IGAC_ZM.py +0 -90
- 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/rawDataReader/utils/__init__.py +0 -0
- AeroViz/rawDataReader/utils/config.py +0 -169
- AeroViz-0.1.3.dist-info/RECORD +0 -111
- /AeroViz/{config → data}/DEFAULT_PNSD_DATA.csv +0 -0
- /AeroViz/{config → rawDataReader/config}/__init__.py +0 -0
- {AeroViz-0.1.3.dist-info → AeroViz-0.1.4.dist-info}/LICENSE +0 -0
- {AeroViz-0.1.3.dist-info → AeroViz-0.1.4.dist-info}/WHEEL +0 -0
- {AeroViz-0.1.3.dist-info → AeroViz-0.1.4.dist-info}/top_level.txt +0 -0
|
@@ -5,90 +5,89 @@ from pandas import DataFrame, read_csv, concat
|
|
|
5
5
|
|
|
6
6
|
from AeroViz.process.core import DataProc
|
|
7
7
|
from AeroViz.process.core.SizeDist import SizeDist
|
|
8
|
-
from AeroViz.tools import DataReader
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class DryPSDProc(DataProc):
|
|
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
|
-
|
|
11
|
+
"""
|
|
12
|
+
A class for process impact data.
|
|
13
|
+
|
|
14
|
+
Parameters
|
|
15
|
+
----------
|
|
16
|
+
reset : bool, optional
|
|
17
|
+
If True, resets the process. Default is False.
|
|
18
|
+
filename : str, optional
|
|
19
|
+
The name of the file to process. Default is None.
|
|
20
|
+
|
|
21
|
+
Methods
|
|
22
|
+
-------
|
|
23
|
+
process_data():
|
|
24
|
+
Process data and save the result.
|
|
25
|
+
|
|
26
|
+
Attributes
|
|
27
|
+
----------
|
|
28
|
+
DEFAULT_PATH : Path
|
|
29
|
+
The default path for data files.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Examples
|
|
33
|
+
--------
|
|
34
|
+
>>> df = DryPSDProc(reset=True, filename='PNSD_dNdlogdp_dry.csv').process_data()
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, file_path: Path | str = 'PNSD_dNdlogdp.csv', file_path_chem: Path | str = 'chemical.csv'):
|
|
38
|
+
super().__init__()
|
|
39
|
+
self.file_path = Path(file_path)
|
|
40
|
+
self.file_path_chem = Path(file_path_chem)
|
|
41
|
+
|
|
42
|
+
self.psd = SizeDist(read_csv(file_path, parse_dates=['Time'], index_col='Time'))
|
|
43
|
+
self.RI = read_csv(file_path_chem, parse_dates=['Time'], index_col='Time')[['n_dry', 'n_amb', 'k_dry', 'k_amb',
|
|
44
|
+
'AS_volume_ratio',
|
|
45
|
+
'AN_volume_ratio',
|
|
46
|
+
'OM_volume_ratio',
|
|
47
|
+
'Soil_volume_ratio',
|
|
48
|
+
'SS_volume_ratio',
|
|
49
|
+
'EC_volume_ratio',
|
|
50
|
+
'ALWC_volume_ratio']]
|
|
51
|
+
|
|
52
|
+
def process_data(self, reset: bool = False, save_filename: Path | str = None) -> DataFrame:
|
|
53
|
+
save_filename = Path(save_filename)
|
|
54
|
+
if save_filename.exists() and not reset:
|
|
55
|
+
return read_csv(save_filename, parse_dates=['Time']).set_index('Time')
|
|
56
|
+
_df = concat([self.psd, self.RI], axis=1)
|
|
57
|
+
_df.to_csv(save_filename)
|
|
58
|
+
return _df
|
|
60
59
|
|
|
61
60
|
|
|
62
61
|
def dry_PNSD_process(dist, dp, **kwargs):
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
ndp = np.array(dist[:np.size(dp)])
|
|
63
|
+
gRH = resolved_gRH(dp, dist['gRH'], uniform=True)
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
dry_dp = dp / gRH
|
|
66
|
+
belong_which_ibin = np.digitize(dry_dp, dp) - 1
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
result = {}
|
|
69
|
+
for i, (ibin, dn) in enumerate(zip(belong_which_ibin, ndp)):
|
|
70
|
+
if dp[ibin] not in result:
|
|
71
|
+
result[dp[ibin]] = []
|
|
72
|
+
result[dp[ibin]].append(ndp[i])
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
dry_ndp = []
|
|
75
|
+
for key, val in result.items():
|
|
76
|
+
dry_ndp.append(sum(val) / len(val))
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
return np.array(dry_ndp)
|
|
80
79
|
|
|
81
80
|
|
|
82
81
|
def resolved_gRH(dp, gRH=1.31, uniform=True):
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
if uniform:
|
|
83
|
+
return np.array([gRH] * dp.size)
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
else:
|
|
86
|
+
lognorm_dist = lambda x, geoMean, geoStd: (gRH / (np.log10(geoStd) * np.sqrt(2 * np.pi))) * np.exp(
|
|
87
|
+
-(x - np.log10(geoMean)) ** 2 / (2 * np.log10(geoStd) ** 2))
|
|
88
|
+
abc = lognorm_dist(np.log10(dp), 200, 2.0)
|
|
89
|
+
return np.where(abc < 1, 1, abc)
|
|
91
90
|
|
|
92
91
|
|
|
93
92
|
if __name__ == '__main__':
|
|
94
|
-
|
|
93
|
+
pass
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
import pandas as pd
|
|
3
2
|
from pandas import DataFrame
|
|
4
3
|
|
|
5
4
|
from AeroViz.process.core.SizeDist import SizeDist
|
|
@@ -7,64 +6,64 @@ from AeroViz.process.method import Mie_PESD
|
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
def retrieve_RI(_df: DataFrame,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
_PNSD: DataFrame,
|
|
10
|
+
nMin: float = 1.33,
|
|
11
|
+
nMax: float = 1.60,
|
|
12
|
+
kMin: float = 0.00,
|
|
13
|
+
kMax: float = 0.60,
|
|
14
|
+
spaceSize: int = 31,
|
|
15
|
+
dlogdp: float = 0.014
|
|
16
|
+
) -> DataFrame:
|
|
17
|
+
nRange = np.linspace(nMin, nMax, num=spaceSize)
|
|
18
|
+
kRange = np.linspace(kMin, kMax, spaceSize)
|
|
19
|
+
Delta_array = np.zeros((spaceSize, spaceSize))
|
|
20
|
+
# 同一時間除了折射率其餘數據皆相同 因此在折射率的迴圈外
|
|
21
|
+
bext_mea, bsca_mea, babs_mea = _df['Extinction'], _df['Scattering'], _df['Absorption']
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
dp = SizeDist(data=_PNSD).dp
|
|
24
|
+
for ki, k in enumerate(kRange):
|
|
25
|
+
for ni, n in enumerate(nRange):
|
|
26
|
+
m = n + (1j * k)
|
|
27
|
+
ndp = np.array(_df[3:])
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
ext_dist, sca_dist, abs_dist = Mie_PESD(m, 550, dp, ndp)
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
bext_cal = sum(ext_dist) * dlogdp
|
|
32
|
+
bsca_cal = sum(sca_dist) * dlogdp
|
|
33
|
+
babs_cal = sum(abs_dist) * dlogdp
|
|
35
34
|
|
|
36
|
-
|
|
35
|
+
Delta_array[ni][ki] = ((babs_mea - babs_cal) / 18.23) ** 2 + ((bsca_mea - bsca_cal) / 83.67) ** 2
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
min_delta = Delta_array.argmin()
|
|
38
|
+
next_n = nRange[(min_delta // spaceSize)]
|
|
39
|
+
next_k = kRange[(min_delta % spaceSize)]
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
# 將網格變小
|
|
42
|
+
nMin_small = next_n - 0.02 if next_n > 1.33 else 1.33
|
|
43
|
+
nMax_small = next_n + 0.02
|
|
44
|
+
kMin_small = next_k - 0.04 if next_k > 0.04 else 0
|
|
45
|
+
kMax_small = next_k + 0.04
|
|
46
|
+
spaceSize_small = 41
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
nRange_small = np.linspace(nMin_small, nMax_small, spaceSize_small)
|
|
49
|
+
kRange_small = np.linspace(kMin_small, kMax_small, spaceSize_small)
|
|
50
|
+
Delta_array_small = np.zeros((spaceSize_small, spaceSize_small))
|
|
51
|
+
# 所有數據與大網格一致所以使用上方便數即可
|
|
52
|
+
for ki, k in enumerate(kRange_small):
|
|
53
|
+
for ni, n in enumerate(nRange_small):
|
|
54
|
+
m = n + (1j * k)
|
|
55
|
+
ndp = np.array(_df[3:])
|
|
56
|
+
ext_dist, sca_dist, abs_dist = Mie_PESD(m, 550, dp, ndp)
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
bext_cal = sum(ext_dist) * dlogdp
|
|
59
|
+
bsca_cal = sum(sca_dist) * dlogdp
|
|
60
|
+
babs_cal = sum(abs_dist) * dlogdp
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
Delta_array_small[ni][ki] = ((bext_mea - bext_cal) / 18.23) ** 2 + ((bsca_mea - bsca_cal) / 83.67) ** 2
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
min_delta_small = Delta_array_small.argmin()
|
|
65
|
+
_df['re_real'] = (nRange_small[(min_delta_small // spaceSize_small)])
|
|
66
|
+
_df['re_imaginary'] = (kRange_small[(min_delta_small % spaceSize_small)])
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
print(f'\t\tReal part:{_df['re_real']}\tIm part:{_df['re_imaginary']}', end='')
|
|
69
|
+
return _df['re_real':]
|
|
@@ -1,68 +1,63 @@
|
|
|
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
|
-
|
|
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
|
-
'SMPS_aim11': SMPS_aim11,
|
|
44
|
-
'GRIMM': GRIMM
|
|
45
|
-
# Add other instruments and their corresponding classes here
|
|
46
|
-
}
|
|
11
|
+
path: Path,
|
|
12
|
+
qc: bool = True,
|
|
13
|
+
csv_raw: bool = True,
|
|
14
|
+
reset: bool = False,
|
|
15
|
+
rate: bool = False,
|
|
16
|
+
append_data: bool = False,
|
|
17
|
+
start: datetime | None = None,
|
|
18
|
+
end: datetime | None = None,
|
|
19
|
+
mean_freq='1h',
|
|
20
|
+
csv_out=True,
|
|
21
|
+
):
|
|
22
|
+
# Mapping of instrument names to their respective classes
|
|
23
|
+
instrument_class_map = {
|
|
24
|
+
'NEPH': NEPH,
|
|
25
|
+
'Aurora': Aurora,
|
|
26
|
+
'SMPS_genr': SMPS_genr,
|
|
27
|
+
'SMPS_aim11': SMPS_aim11,
|
|
28
|
+
'SMPS_TH': SMPS_TH,
|
|
29
|
+
'GRIMM': GRIMM,
|
|
30
|
+
'APS_3321': APS_3321,
|
|
31
|
+
'AE33': AE33,
|
|
32
|
+
'AE43': AE43,
|
|
33
|
+
'BC1054': BC1054,
|
|
34
|
+
'MA350': MA350,
|
|
35
|
+
'TEOM': TEOM,
|
|
36
|
+
'Sunset_OCEC': Sunset_OCEC,
|
|
37
|
+
'IGAC': IGAC,
|
|
38
|
+
'VOC': VOC,
|
|
39
|
+
'Table': Table,
|
|
40
|
+
'EPA_vertical': EPA_vertical,
|
|
41
|
+
'Minion': Minion
|
|
42
|
+
# Add other instruments and their corresponding classes here
|
|
43
|
+
}
|
|
47
44
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
# Check if the instrument name is in the map
|
|
46
|
+
if instrument_name not in meta.keys():
|
|
47
|
+
raise ValueError(f"Instrument name '{instrument_name}' is not valid. \nMust be one of: {list(meta.keys())}")
|
|
51
48
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
**kwargs
|
|
68
|
-
)
|
|
49
|
+
# Instantiate the class and return the instance
|
|
50
|
+
reader_module = instrument_class_map[instrument_name].Reader(
|
|
51
|
+
path=path,
|
|
52
|
+
qc=qc,
|
|
53
|
+
csv_raw=csv_raw,
|
|
54
|
+
reset=reset,
|
|
55
|
+
rate=rate,
|
|
56
|
+
append_data=append_data
|
|
57
|
+
)
|
|
58
|
+
return reader_module(
|
|
59
|
+
start=start,
|
|
60
|
+
end=end,
|
|
61
|
+
mean_freq=mean_freq,
|
|
62
|
+
csv_out=csv_out,
|
|
63
|
+
)
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Description: Configuration file for rawDataReader
|
|
2
|
+
|
|
3
|
+
meta = {
|
|
4
|
+
"NEPH": {
|
|
5
|
+
"pattern": "*.dat",
|
|
6
|
+
"freq": "5min",
|
|
7
|
+
"deter_key": {"Scatter Coe. (550 nm)": ["G"]},
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"Aurora": {
|
|
11
|
+
"pattern": "*.csv",
|
|
12
|
+
"freq": "1min",
|
|
13
|
+
"deter_key": {"Scatter Coe. (550 nm)": ["G"]},
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
"SMPS_TH": {
|
|
17
|
+
"pattern": "*.txt",
|
|
18
|
+
"freq": "6min",
|
|
19
|
+
"deter_key": {"Bins": ["all"]},
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
"SMPS_genr": {
|
|
23
|
+
"pattern": "*.txt",
|
|
24
|
+
"freq": "6min",
|
|
25
|
+
"deter_key": {"Bins": ["all"]},
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
"SMPS_aim11": {
|
|
29
|
+
"pattern": "*.csv",
|
|
30
|
+
"freq": "6min",
|
|
31
|
+
"deter_key": {"Bins": ["all"]},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
"GRIMM": {
|
|
35
|
+
"pattern": "*.dat",
|
|
36
|
+
"freq": "6min",
|
|
37
|
+
"deter_key": {"Bins": ["all"]},
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
"APS_3321": {
|
|
41
|
+
"pattern": "*.TXT",
|
|
42
|
+
"freq": "6min",
|
|
43
|
+
"deter_key": {"Bins": ["all"]},
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"AE33": {
|
|
47
|
+
"pattern": "[!ST|!CT|!FV]*[!log]_AE33*.dat",
|
|
48
|
+
"freq": "1min",
|
|
49
|
+
"deter_key": {"BC Mass Conc. (880 nm)": ["BC6"]},
|
|
50
|
+
"error_state": [],
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
"AE43": {
|
|
54
|
+
"pattern": "[!ST|!CT|!FV]*[!log]_AE43*.dat",
|
|
55
|
+
"freq": "1min",
|
|
56
|
+
"deter_key": {"BC Mass Conc. (880 nm)": ["BC6"]},
|
|
57
|
+
"error_state": [],
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
"BC1054": {
|
|
61
|
+
"pattern": "*.csv",
|
|
62
|
+
"freq": "1min",
|
|
63
|
+
"deter_key": {"BC Mass Conc. (880 nm)": ["BC9"]},
|
|
64
|
+
"error_state": [1, 2, 4, 8, 16, 32, 65536],
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
"MA350": {
|
|
68
|
+
"pattern": "*.csv",
|
|
69
|
+
"freq": "1min",
|
|
70
|
+
"deter_key": {"BC Mass Conc. (880 nm)": ["BC5"]},
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
"TEOM": {
|
|
74
|
+
"pattern": "*.csv",
|
|
75
|
+
"freq": "6min",
|
|
76
|
+
"deter_key": {
|
|
77
|
+
"PM1.0 Mass Conc.": ["PM_Total"],
|
|
78
|
+
"PM1.0 NV Mass Conc.": ["PM_NV"],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
"Sunset_OCEC": {
|
|
83
|
+
"pattern": "*LCRes.csv",
|
|
84
|
+
"freq": "1h",
|
|
85
|
+
"deter_key": {
|
|
86
|
+
"Thermal OC/EC": ["Thermal_EC", "Thermal_OC"],
|
|
87
|
+
"Thermal OC": ["Thermal_OC"],
|
|
88
|
+
"Thermal EC": ["Thermal_EC"],
|
|
89
|
+
"Optical OC/EC": ["Optical_EC", "Optical_OC"],
|
|
90
|
+
"Optical OC": ["Optical_OC"],
|
|
91
|
+
"Optical EC": ["Optical_EC"],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
"IGAC": {
|
|
96
|
+
"pattern": "*.csv",
|
|
97
|
+
"freq": "1h",
|
|
98
|
+
"deter_key": {
|
|
99
|
+
"Na+": ["Na+"],
|
|
100
|
+
"NH4+": ["NH4+"],
|
|
101
|
+
"K+": ["K+"],
|
|
102
|
+
"Mg2+": ["Mg2+"],
|
|
103
|
+
"Ca2+": ["Ca2+"],
|
|
104
|
+
"Cl-": ["Cl-"],
|
|
105
|
+
"NO2-": ["NO2-"],
|
|
106
|
+
"NO3-": ["NO3-"],
|
|
107
|
+
"SO42-": ["SO42-"],
|
|
108
|
+
"Main Salt (NH4+, NO3-, SO42-)": ["NO3-", "SO42-", "NH4+"],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
"VOC": {
|
|
113
|
+
"pattern": "*.csv",
|
|
114
|
+
"freq": "1h",
|
|
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": {
|
|
139
|
+
"pattern": "*.csv",
|
|
140
|
+
"freq": "1h",
|
|
141
|
+
"deter_key": None,
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
"EPA_vertical": {
|
|
145
|
+
"pattern": "*.csv",
|
|
146
|
+
"freq": "1h",
|
|
147
|
+
"deter_key": None,
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
"Minion": {
|
|
151
|
+
"pattern": "*.csv",
|
|
152
|
+
"freq": "1h",
|
|
153
|
+
"deter_key": None,
|
|
154
|
+
},
|
|
155
|
+
}
|