AeroViz 0.1.4__py3-none-any.whl → 0.1.6__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/dataProcess/Chemistry/__init__.py +21 -20
- AeroViz/dataProcess/Chemistry/_isoropia.py +9 -12
- AeroViz/dataProcess/Chemistry/_mass_volume.py +4 -3
- AeroViz/dataProcess/Chemistry/_ocec.py +20 -45
- AeroViz/dataProcess/Chemistry/isrpia2.exe +0 -0
- AeroViz/dataProcess/Optical/_IMPROVE.py +2 -3
- AeroViz/dataProcess/Optical/fRH.pkl +0 -0
- AeroViz/dataProcess/SizeDistr/__init__.py +6 -10
- AeroViz/dataProcess/VOC/__init__.py +1 -6
- AeroViz/dataProcess/VOC/_potential_par.py +71 -37
- AeroViz/dataProcess/VOC/{voc_par.json → support_voc.json} +321 -339
- AeroViz/rawDataReader/__init__.py +52 -5
- AeroViz/rawDataReader/config/supported_instruments.py +45 -53
- AeroViz/rawDataReader/core/__init__.py +113 -98
- AeroViz/rawDataReader/script/AE33.py +3 -3
- AeroViz/rawDataReader/script/AE43.py +2 -2
- AeroViz/rawDataReader/script/APS_3321.py +4 -4
- AeroViz/rawDataReader/script/Aurora.py +5 -2
- AeroViz/rawDataReader/script/BC1054.py +2 -2
- AeroViz/rawDataReader/script/EPA_vertical.py +2 -2
- AeroViz/rawDataReader/script/GRIMM.py +4 -4
- AeroViz/rawDataReader/script/IGAC.py +2 -2
- AeroViz/rawDataReader/script/MA350.py +2 -2
- AeroViz/rawDataReader/script/Minion.py +2 -2
- AeroViz/rawDataReader/script/NEPH.py +9 -14
- AeroViz/rawDataReader/script/{Sunset_OCEC.py → OCEC.py} +24 -18
- AeroViz/rawDataReader/script/SMPS.py +76 -0
- AeroViz/rawDataReader/script/TEOM.py +2 -2
- AeroViz/rawDataReader/script/Table.py +3 -3
- AeroViz/rawDataReader/script/VOC.py +16 -9
- AeroViz/rawDataReader/script/__init__.py +2 -4
- {AeroViz-0.1.4.dist-info → AeroViz-0.1.6.dist-info}/METADATA +13 -10
- {AeroViz-0.1.4.dist-info → AeroViz-0.1.6.dist-info}/RECORD +36 -36
- AeroViz/rawDataReader/script/SMPS_TH.py +0 -41
- AeroViz/rawDataReader/script/SMPS_aim11.py +0 -51
- AeroViz/rawDataReader/script/SMPS_genr.py +0 -51
- {AeroViz-0.1.4.dist-info → AeroViz-0.1.6.dist-info}/LICENSE +0 -0
- {AeroViz-0.1.4.dist-info → AeroViz-0.1.6.dist-info}/WHEEL +0 -0
- {AeroViz-0.1.4.dist-info → AeroViz-0.1.6.dist-info}/top_level.txt +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
from pandas import to_datetime, read_csv, to_numeric
|
|
2
|
-
|
|
3
|
-
from AeroViz.rawDataReader.core import AbstractReader
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Reader(AbstractReader):
|
|
7
|
-
nam = 'SMPS_aim11'
|
|
8
|
-
|
|
9
|
-
def _raw_reader(self, _file):
|
|
10
|
-
with open(_file, 'r', encoding='utf-8', errors='ignore') as f:
|
|
11
|
-
|
|
12
|
-
skiprows = 0
|
|
13
|
-
for _line in f:
|
|
14
|
-
|
|
15
|
-
if _line.split(',')[0] == 'Scan Number':
|
|
16
|
-
f.seek(0)
|
|
17
|
-
break
|
|
18
|
-
|
|
19
|
-
skiprows += 1
|
|
20
|
-
# breakpoint()
|
|
21
|
-
_df = read_csv(f, skiprows=skiprows)
|
|
22
|
-
_tm_idx = to_datetime(_df['DateTime Sample Start'], format='%d/%m/%Y %X', errors='coerce')
|
|
23
|
-
|
|
24
|
-
# index
|
|
25
|
-
_df = _df.set_index(_tm_idx).loc[_tm_idx.dropna()]
|
|
26
|
-
|
|
27
|
-
# keys
|
|
28
|
-
_key = to_numeric(_df.keys(), errors='coerce')
|
|
29
|
-
_df.columns = _key
|
|
30
|
-
_df = _df.loc[:, ~_key.isna()]
|
|
31
|
-
|
|
32
|
-
return _df.apply(to_numeric, errors='coerce')
|
|
33
|
-
|
|
34
|
-
# QC data
|
|
35
|
-
def _QC(self, _df):
|
|
36
|
-
import numpy as n
|
|
37
|
-
|
|
38
|
-
# mask out the data size lower than 7
|
|
39
|
-
_df['total'] = _df.sum(axis=1, min_count=1) * (n.diff(n.log(_df.keys().to_numpy(float)))).mean()
|
|
40
|
-
_df_size = _df['total'].dropna().resample('1h').size().resample(_df.index.freq).ffill()
|
|
41
|
-
_df = _df.mask(_df_size < 7)
|
|
42
|
-
|
|
43
|
-
# remove total conc. lower than 2000
|
|
44
|
-
_df = _df.mask(_df['total'] < 2000)
|
|
45
|
-
|
|
46
|
-
# remove the bin over 400 nm which num. conc. larger than 4000
|
|
47
|
-
_df_remv_ky = _df.keys()[:-2][_df.keys()[:-2] >= 400.]
|
|
48
|
-
|
|
49
|
-
_df[_df_remv_ky] = _df[_df_remv_ky].copy().mask(_df[_df_remv_ky] > 4000.)
|
|
50
|
-
|
|
51
|
-
return _df[_df.keys()[:-1]]
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
from pandas import to_datetime, read_table, to_numeric
|
|
2
|
-
|
|
3
|
-
from AeroViz.rawDataReader.core import AbstractReader
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Reader(AbstractReader):
|
|
7
|
-
nam = 'SMPS_genr'
|
|
8
|
-
|
|
9
|
-
def _raw_reader(self, _file):
|
|
10
|
-
with open(_file, 'r', encoding='utf-8', errors='ignore') as f:
|
|
11
|
-
|
|
12
|
-
skiprows = 0
|
|
13
|
-
for _line in f:
|
|
14
|
-
|
|
15
|
-
if _line.split('\t')[0] == 'Sample #':
|
|
16
|
-
f.seek(0)
|
|
17
|
-
break
|
|
18
|
-
|
|
19
|
-
skiprows += 1
|
|
20
|
-
|
|
21
|
-
_df = read_table(f, skiprows=skiprows)
|
|
22
|
-
_tm_idx = to_datetime(_df['Date'] + _df['Start Time'], format='%m/%d/%y%X', errors='coerce')
|
|
23
|
-
|
|
24
|
-
# index
|
|
25
|
-
_df = _df.set_index(_tm_idx).loc[_tm_idx.dropna()]
|
|
26
|
-
|
|
27
|
-
# keys
|
|
28
|
-
_key = to_numeric(_df.keys(), errors='coerce')
|
|
29
|
-
_df.columns = _key
|
|
30
|
-
_df = _df.loc[:, ~_key.isna()]
|
|
31
|
-
|
|
32
|
-
return _df.apply(to_numeric, errors='coerce')
|
|
33
|
-
|
|
34
|
-
# QC data
|
|
35
|
-
def _QC(self, _df):
|
|
36
|
-
import numpy as n
|
|
37
|
-
|
|
38
|
-
# mask out the data size lower than 7
|
|
39
|
-
_df['total'] = _df.sum(axis=1, min_count=1) * (n.diff(n.log(_df.keys().to_numpy(float)))).mean()
|
|
40
|
-
_df_size = _df['total'].dropna().resample('1h').size().resample(_df.index.freq).ffill()
|
|
41
|
-
_df = _df.mask(_df_size < 7)
|
|
42
|
-
|
|
43
|
-
# remove total conc. lower than 2000
|
|
44
|
-
_df = _df.mask(_df['total'] < 2000)
|
|
45
|
-
|
|
46
|
-
# remove the bin over 400 nm which num. conc. larger than 4000
|
|
47
|
-
_df_remv_ky = _df.keys()[:-2][_df.keys()[:-2] >= 400.]
|
|
48
|
-
|
|
49
|
-
_df[_df_remv_ky] = _df[_df_remv_ky].copy().mask(_df[_df_remv_ky] > 4000.)
|
|
50
|
-
|
|
51
|
-
return _df[_df.keys()[:-1]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|