AeroViz 0.1.6__py3-none-any.whl → 0.1.8__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/data/240228_00.txt +101 -0
- AeroViz/dataProcess/Chemistry/_ocec.py +20 -7
- AeroViz/plot/__init__.py +2 -0
- AeroViz/plot/hysplit/__init__.py +1 -0
- AeroViz/plot/hysplit/hysplit.py +79 -0
- AeroViz/plot/meteorology/meteorology.py +2 -0
- AeroViz/plot/optical/optical.py +60 -59
- AeroViz/plot/pie.py +14 -2
- AeroViz/plot/radar.py +184 -0
- AeroViz/plot/scatter.py +16 -7
- AeroViz/plot/templates/diurnal_pattern.py +24 -7
- AeroViz/plot/templates/koschmieder.py +11 -8
- AeroViz/plot/timeseries/template.py +2 -2
- AeroViz/plot/timeseries/timeseries.py +47 -7
- AeroViz/rawDataReader/__init__.py +75 -68
- AeroViz/rawDataReader/config/supported_instruments.py +52 -19
- AeroViz/rawDataReader/core/__init__.py +194 -106
- AeroViz/rawDataReader/script/AE33.py +11 -6
- AeroViz/rawDataReader/script/AE43.py +10 -5
- AeroViz/rawDataReader/script/Aurora.py +14 -10
- AeroViz/rawDataReader/script/BC1054.py +10 -6
- AeroViz/rawDataReader/script/EPA.py +39 -0
- AeroViz/rawDataReader/script/GRIMM.py +1 -2
- AeroViz/rawDataReader/script/IGAC.py +6 -23
- AeroViz/rawDataReader/script/MA350.py +12 -5
- AeroViz/rawDataReader/script/Minion.py +107 -30
- AeroViz/rawDataReader/script/NEPH.py +15 -5
- AeroViz/rawDataReader/script/OCEC.py +39 -15
- AeroViz/rawDataReader/script/SMPS.py +1 -0
- AeroViz/rawDataReader/script/TEOM.py +15 -11
- AeroViz/rawDataReader/script/VOC.py +1 -1
- AeroViz/rawDataReader/script/XRF.py +11 -0
- AeroViz/rawDataReader/script/__init__.py +2 -2
- {AeroViz-0.1.6.dist-info → AeroViz-0.1.8.dist-info}/METADATA +54 -30
- {AeroViz-0.1.6.dist-info → AeroViz-0.1.8.dist-info}/RECORD +40 -51
- AeroViz/process/__init__.py +0 -31
- AeroViz/process/core/DataProc.py +0 -19
- AeroViz/process/core/SizeDist.py +0 -90
- AeroViz/process/core/__init__.py +0 -4
- AeroViz/process/method/__init__.py +0 -2
- AeroViz/process/method/prop.py +0 -62
- AeroViz/process/script/AbstractDistCalc.py +0 -143
- AeroViz/process/script/Chemical.py +0 -177
- AeroViz/process/script/IMPACT.py +0 -49
- AeroViz/process/script/IMPROVE.py +0 -161
- AeroViz/process/script/Others.py +0 -65
- AeroViz/process/script/PSD.py +0 -103
- AeroViz/process/script/PSD_dry.py +0 -93
- AeroViz/process/script/__init__.py +0 -5
- AeroViz/process/script/retrieve_RI.py +0 -69
- AeroViz/rawDataReader/script/EPA_vertical.py +0 -46
- AeroViz/rawDataReader/script/Table.py +0 -27
- /AeroViz/{process/method → plot/optical}/PyMieScatt_update.py +0 -0
- /AeroViz/{process/method → plot/optical}/mie_theory.py +0 -0
- {AeroViz-0.1.6.dist-info → AeroViz-0.1.8.dist-info}/LICENSE +0 -0
- {AeroViz-0.1.6.dist-info → AeroViz-0.1.8.dist-info}/WHEEL +0 -0
- {AeroViz-0.1.6.dist-info → AeroViz-0.1.8.dist-info}/top_level.txt +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
from pandas import DataFrame
|
|
3
|
-
|
|
4
|
-
from AeroViz.process.core.SizeDist import SizeDist
|
|
5
|
-
from AeroViz.process.method import Mie_PESD
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def retrieve_RI(_df: DataFrame,
|
|
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']
|
|
22
|
-
|
|
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:])
|
|
28
|
-
|
|
29
|
-
ext_dist, sca_dist, abs_dist = Mie_PESD(m, 550, dp, ndp)
|
|
30
|
-
|
|
31
|
-
bext_cal = sum(ext_dist) * dlogdp
|
|
32
|
-
bsca_cal = sum(sca_dist) * dlogdp
|
|
33
|
-
babs_cal = sum(abs_dist) * dlogdp
|
|
34
|
-
|
|
35
|
-
Delta_array[ni][ki] = ((babs_mea - babs_cal) / 18.23) ** 2 + ((bsca_mea - bsca_cal) / 83.67) ** 2
|
|
36
|
-
|
|
37
|
-
min_delta = Delta_array.argmin()
|
|
38
|
-
next_n = nRange[(min_delta // spaceSize)]
|
|
39
|
-
next_k = kRange[(min_delta % spaceSize)]
|
|
40
|
-
|
|
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
|
|
47
|
-
|
|
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)
|
|
57
|
-
|
|
58
|
-
bext_cal = sum(ext_dist) * dlogdp
|
|
59
|
-
bsca_cal = sum(sca_dist) * dlogdp
|
|
60
|
-
babs_cal = sum(abs_dist) * dlogdp
|
|
61
|
-
|
|
62
|
-
Delta_array_small[ni][ki] = ((bext_mea - bext_cal) / 18.23) ** 2 + ((bsca_mea - bsca_cal) / 83.67) ** 2
|
|
63
|
-
|
|
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)])
|
|
67
|
-
|
|
68
|
-
print(f'\t\tReal part:{_df['re_real']}\tIm part:{_df['re_imaginary']}', end='')
|
|
69
|
-
return _df['re_real':]
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
from pandas import read_csv, to_numeric
|
|
3
|
-
|
|
4
|
-
from AeroViz.rawDataReader.core import AbstractReader
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Reader(AbstractReader):
|
|
8
|
-
nam = 'EPA_vertical'
|
|
9
|
-
|
|
10
|
-
def _raw_reader(self, file):
|
|
11
|
-
with file.open('r', encoding='ascii', errors='ignore') as f:
|
|
12
|
-
# 有、無輸出有效值都可以
|
|
13
|
-
# read 查詢小時值(測項).csv
|
|
14
|
-
df = read_csv(f, encoding='ascii', encoding_errors='ignore', index_col=0, parse_dates=True,
|
|
15
|
-
usecols=lambda col: col != 'Unnamed: 1')
|
|
16
|
-
|
|
17
|
-
df.index.name = 'Time'
|
|
18
|
-
df.rename(columns={'AMB_TEMP': 'AT', 'WIND_SPEED': 'WS', 'WIND_DIREC': 'WD'}, inplace=True)
|
|
19
|
-
|
|
20
|
-
# 欄位排序
|
|
21
|
-
desired_order = ['SO2', 'NO', 'NOx', 'NO2', 'CO', 'O3', 'THC', 'NMHC', 'CH4', 'PM10', 'PM2.5', 'WS', 'WD',
|
|
22
|
-
'AT', 'RH']
|
|
23
|
-
|
|
24
|
-
missing_columns = []
|
|
25
|
-
|
|
26
|
-
for col in desired_order:
|
|
27
|
-
if col not in df.columns:
|
|
28
|
-
df[col] = np.nan
|
|
29
|
-
missing_columns.append(col)
|
|
30
|
-
|
|
31
|
-
if missing_columns:
|
|
32
|
-
self.logger.info(f"{'=' * 60}")
|
|
33
|
-
self.logger.info(f"Missing columns: {missing_columns}")
|
|
34
|
-
self.logger.info(f"{'=' * 60}")
|
|
35
|
-
print(f"Missing columns: {missing_columns}")
|
|
36
|
-
|
|
37
|
-
df = df[desired_order]
|
|
38
|
-
|
|
39
|
-
# 如果沒有將無效值拿掉就輸出 請將包含 #、L、O 的字串替換成 *
|
|
40
|
-
df.replace(to_replace=r'\d*[#LO]\b', value='*', regex=True, inplace=True)
|
|
41
|
-
df = df.apply(to_numeric, errors='coerce')
|
|
42
|
-
|
|
43
|
-
return df
|
|
44
|
-
|
|
45
|
-
def _QC(self, _df):
|
|
46
|
-
return _df
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# read meteorological data from google sheet
|
|
2
|
-
|
|
3
|
-
from pandas import read_csv, to_datetime
|
|
4
|
-
|
|
5
|
-
from AeroViz.rawDataReader.core import AbstractReader
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class Reader(AbstractReader):
|
|
9
|
-
nam = 'Table'
|
|
10
|
-
|
|
11
|
-
def _raw_reader(self, file):
|
|
12
|
-
with file.open('r', encoding='utf-8-sig', errors='ignore') as f:
|
|
13
|
-
_df = read_csv(f, low_memory=False, index_col=0)
|
|
14
|
-
|
|
15
|
-
_df.index = to_datetime(_df.index, errors='coerce')
|
|
16
|
-
_df.index.name = 'time'
|
|
17
|
-
|
|
18
|
-
_df.columns = _df.keys().str.strip(' ')
|
|
19
|
-
|
|
20
|
-
return _df.loc[~_df.index.duplicated() & _df.index.notna()]
|
|
21
|
-
|
|
22
|
-
def _QC(self, _df):
|
|
23
|
-
# remove negative value
|
|
24
|
-
_df = _df.mask((_df < 0).copy())
|
|
25
|
-
|
|
26
|
-
# QC data in 6h
|
|
27
|
-
return _df.resample('6h').apply(self.basic_QC).resample(self.meta.get("freq")).mean()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|