AeroViz 0.1.21__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.
- AeroViz/__init__.py +13 -0
- AeroViz/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/data/DEFAULT_DATA.csv +1417 -0
- AeroViz/data/DEFAULT_PNSD_DATA.csv +1417 -0
- AeroViz/data/hysplit_example_data.txt +101 -0
- AeroViz/dataProcess/Chemistry/__init__.py +149 -0
- AeroViz/dataProcess/Chemistry/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/dataProcess/Chemistry/_calculate.py +557 -0
- AeroViz/dataProcess/Chemistry/_isoropia.py +150 -0
- AeroViz/dataProcess/Chemistry/_mass_volume.py +487 -0
- AeroViz/dataProcess/Chemistry/_ocec.py +172 -0
- AeroViz/dataProcess/Chemistry/isrpia.cnf +21 -0
- AeroViz/dataProcess/Chemistry/isrpia2.exe +0 -0
- AeroViz/dataProcess/Optical/PyMieScatt_update.py +577 -0
- AeroViz/dataProcess/Optical/_IMPROVE.py +452 -0
- AeroViz/dataProcess/Optical/__init__.py +281 -0
- AeroViz/dataProcess/Optical/__pycache__/PyMieScatt_update.cpython-312.pyc +0 -0
- AeroViz/dataProcess/Optical/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/dataProcess/Optical/__pycache__/mie_theory.cpython-312.pyc +0 -0
- AeroViz/dataProcess/Optical/_derived.py +518 -0
- AeroViz/dataProcess/Optical/_extinction.py +123 -0
- AeroViz/dataProcess/Optical/_mie_sd.py +912 -0
- AeroViz/dataProcess/Optical/_retrieve_RI.py +243 -0
- AeroViz/dataProcess/Optical/coefficient.py +72 -0
- AeroViz/dataProcess/Optical/fRH.pkl +0 -0
- AeroViz/dataProcess/Optical/mie_theory.py +260 -0
- AeroViz/dataProcess/README.md +271 -0
- AeroViz/dataProcess/SizeDistr/__init__.py +245 -0
- AeroViz/dataProcess/SizeDistr/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/dataProcess/SizeDistr/__pycache__/_size_dist.cpython-312.pyc +0 -0
- AeroViz/dataProcess/SizeDistr/_size_dist.py +810 -0
- AeroViz/dataProcess/SizeDistr/merge/README.md +93 -0
- AeroViz/dataProcess/SizeDistr/merge/__init__.py +20 -0
- AeroViz/dataProcess/SizeDistr/merge/_merge_v0.py +251 -0
- AeroViz/dataProcess/SizeDistr/merge/_merge_v0_1.py +246 -0
- AeroViz/dataProcess/SizeDistr/merge/_merge_v1.py +255 -0
- AeroViz/dataProcess/SizeDistr/merge/_merge_v2.py +244 -0
- AeroViz/dataProcess/SizeDistr/merge/_merge_v3.py +518 -0
- AeroViz/dataProcess/SizeDistr/merge/_merge_v4.py +422 -0
- AeroViz/dataProcess/SizeDistr/prop.py +62 -0
- AeroViz/dataProcess/VOC/__init__.py +14 -0
- AeroViz/dataProcess/VOC/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/dataProcess/VOC/_potential_par.py +108 -0
- AeroViz/dataProcess/VOC/support_voc.json +446 -0
- AeroViz/dataProcess/__init__.py +66 -0
- AeroViz/dataProcess/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/dataProcess/core/__init__.py +272 -0
- AeroViz/dataProcess/core/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/mcp_server.py +352 -0
- AeroViz/plot/__init__.py +13 -0
- AeroViz/plot/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/bar.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/box.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/pie.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/radar.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/regression.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/scatter.cpython-312.pyc +0 -0
- AeroViz/plot/__pycache__/violin.cpython-312.pyc +0 -0
- AeroViz/plot/bar.py +126 -0
- AeroViz/plot/box.py +69 -0
- AeroViz/plot/distribution/__init__.py +1 -0
- AeroViz/plot/distribution/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/distribution/__pycache__/distribution.cpython-312.pyc +0 -0
- AeroViz/plot/distribution/distribution.py +576 -0
- AeroViz/plot/meteorology/CBPF.py +295 -0
- AeroViz/plot/meteorology/__init__.py +3 -0
- AeroViz/plot/meteorology/__pycache__/CBPF.cpython-312.pyc +0 -0
- AeroViz/plot/meteorology/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/meteorology/__pycache__/hysplit.cpython-312.pyc +0 -0
- AeroViz/plot/meteorology/__pycache__/wind_rose.cpython-312.pyc +0 -0
- AeroViz/plot/meteorology/hysplit.py +93 -0
- AeroViz/plot/meteorology/wind_rose.py +77 -0
- AeroViz/plot/optical/__init__.py +1 -0
- AeroViz/plot/optical/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/optical/__pycache__/optical.cpython-312.pyc +0 -0
- AeroViz/plot/optical/optical.py +388 -0
- AeroViz/plot/pie.py +210 -0
- AeroViz/plot/radar.py +184 -0
- AeroViz/plot/regression.py +200 -0
- AeroViz/plot/scatter.py +174 -0
- AeroViz/plot/templates/__init__.py +6 -0
- AeroViz/plot/templates/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/templates/__pycache__/ammonium_rich.cpython-312.pyc +0 -0
- AeroViz/plot/templates/__pycache__/contour.cpython-312.pyc +0 -0
- AeroViz/plot/templates/__pycache__/corr_matrix.cpython-312.pyc +0 -0
- AeroViz/plot/templates/__pycache__/diurnal_pattern.cpython-312.pyc +0 -0
- AeroViz/plot/templates/__pycache__/koschmieder.cpython-312.pyc +0 -0
- AeroViz/plot/templates/__pycache__/metal_heatmap.cpython-312.pyc +0 -0
- AeroViz/plot/templates/ammonium_rich.py +34 -0
- AeroViz/plot/templates/contour.py +47 -0
- AeroViz/plot/templates/corr_matrix.py +267 -0
- AeroViz/plot/templates/diurnal_pattern.py +61 -0
- AeroViz/plot/templates/koschmieder.py +95 -0
- AeroViz/plot/templates/metal_heatmap.py +164 -0
- AeroViz/plot/timeseries/__init__.py +2 -0
- AeroViz/plot/timeseries/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/timeseries/__pycache__/template.cpython-312.pyc +0 -0
- AeroViz/plot/timeseries/__pycache__/timeseries.cpython-312.pyc +0 -0
- AeroViz/plot/timeseries/template.py +47 -0
- AeroViz/plot/timeseries/timeseries.py +446 -0
- AeroViz/plot/utils/__init__.py +4 -0
- AeroViz/plot/utils/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/plot/utils/__pycache__/_color.cpython-312.pyc +0 -0
- AeroViz/plot/utils/__pycache__/_unit.cpython-312.pyc +0 -0
- AeroViz/plot/utils/__pycache__/plt_utils.cpython-312.pyc +0 -0
- AeroViz/plot/utils/__pycache__/sklearn_utils.cpython-312.pyc +0 -0
- AeroViz/plot/utils/_color.py +71 -0
- AeroViz/plot/utils/_unit.py +55 -0
- 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 +89 -0
- AeroViz/plot/violin.py +80 -0
- AeroViz/rawDataReader/FLOW.md +138 -0
- AeroViz/rawDataReader/__init__.py +220 -0
- AeroViz/rawDataReader/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/config/__init__.py +0 -0
- AeroViz/rawDataReader/config/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/config/__pycache__/supported_instruments.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/config/supported_instruments.py +135 -0
- AeroViz/rawDataReader/core/__init__.py +658 -0
- AeroViz/rawDataReader/core/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/core/__pycache__/logger.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/core/__pycache__/pre_process.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/core/__pycache__/qc.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/core/__pycache__/report.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/core/logger.py +171 -0
- AeroViz/rawDataReader/core/pre_process.py +308 -0
- AeroViz/rawDataReader/core/qc.py +961 -0
- AeroViz/rawDataReader/core/report.py +579 -0
- AeroViz/rawDataReader/script/AE33.py +173 -0
- AeroViz/rawDataReader/script/AE43.py +151 -0
- AeroViz/rawDataReader/script/APS.py +339 -0
- AeroViz/rawDataReader/script/Aurora.py +191 -0
- AeroViz/rawDataReader/script/BAM1020.py +90 -0
- AeroViz/rawDataReader/script/BC1054.py +161 -0
- AeroViz/rawDataReader/script/EPA.py +79 -0
- AeroViz/rawDataReader/script/GRIMM.py +68 -0
- AeroViz/rawDataReader/script/IGAC.py +140 -0
- AeroViz/rawDataReader/script/MA350.py +179 -0
- AeroViz/rawDataReader/script/Minion.py +218 -0
- AeroViz/rawDataReader/script/NEPH.py +199 -0
- AeroViz/rawDataReader/script/OCEC.py +173 -0
- AeroViz/rawDataReader/script/Q-ACSM.py +12 -0
- AeroViz/rawDataReader/script/SMPS.py +389 -0
- AeroViz/rawDataReader/script/TEOM.py +181 -0
- AeroViz/rawDataReader/script/VOC.py +106 -0
- AeroViz/rawDataReader/script/Xact.py +244 -0
- AeroViz/rawDataReader/script/__init__.py +28 -0
- AeroViz/rawDataReader/script/__pycache__/AE33.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/AE43.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/APS.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/Aurora.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/BAM1020.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/BC1054.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/EPA.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/GRIMM.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/IGAC.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/MA350.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/Minion.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/NEPH.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/OCEC.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/Q-ACSM.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/SMPS.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/TEOM.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/VOC.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/Xact.cpython-312.pyc +0 -0
- AeroViz/rawDataReader/script/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/tools/__init__.py +2 -0
- AeroViz/tools/__pycache__/__init__.cpython-312.pyc +0 -0
- AeroViz/tools/__pycache__/database.cpython-312.pyc +0 -0
- AeroViz/tools/__pycache__/dataclassifier.cpython-312.pyc +0 -0
- AeroViz/tools/database.py +95 -0
- AeroViz/tools/dataclassifier.py +117 -0
- AeroViz/tools/dataprinter.py +58 -0
- aeroviz-0.1.21.dist-info/METADATA +294 -0
- aeroviz-0.1.21.dist-info/RECORD +180 -0
- aeroviz-0.1.21.dist-info/WHEEL +5 -0
- aeroviz-0.1.21.dist-info/licenses/LICENSE +21 -0
- aeroviz-0.1.21.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
from pandas import concat, DataFrame
|
|
5
|
+
from scipy.optimize import curve_fit, least_squares, OptimizeWarning
|
|
6
|
+
|
|
7
|
+
from AeroViz.dataProcess.core import union_index
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
'_basic',
|
|
11
|
+
# '_ocec_ratio_cal',
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _min_Rsq(_oc, _ec, _rng):
|
|
16
|
+
_val_mesh, _oc_mesh = np.meshgrid(_rng, _oc)
|
|
17
|
+
_val_mesh, _ec_mesh = np.meshgrid(_rng, _ec)
|
|
18
|
+
|
|
19
|
+
_out_table = DataFrame(_oc_mesh - _val_mesh * _ec_mesh, index=_oc.index, columns=_rng)
|
|
20
|
+
|
|
21
|
+
# calculate R2
|
|
22
|
+
_r2_dic = {}
|
|
23
|
+
_func = lambda _x, _sl, _inte: _sl * _x + _inte
|
|
24
|
+
for _ocec, _out in _out_table.items():
|
|
25
|
+
_df = DataFrame([_out.values, _ec.values]).T.dropna()
|
|
26
|
+
|
|
27
|
+
_x, _y = _df[0].values, _df[1].values
|
|
28
|
+
|
|
29
|
+
# 初始參數估計
|
|
30
|
+
slope_guess = (_y[-1] - _y[0]) / (_x[-1] - _x[0])
|
|
31
|
+
intercept_guess = _y[0] - slope_guess * _x[0]
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
with warnings.catch_warnings():
|
|
35
|
+
warnings.filterwarnings('error')
|
|
36
|
+
_opt, _ = curve_fit(_func, _x, _y, p0=[slope_guess, intercept_guess], maxfev=5000)
|
|
37
|
+
except (RuntimeWarning, OptimizeWarning):
|
|
38
|
+
# 如果 curve_fit 失敗,嘗試使用 least_squares
|
|
39
|
+
residuals = lambda p: _func(_x, *p) - _y
|
|
40
|
+
_opt = least_squares(residuals, [slope_guess, intercept_guess]).x
|
|
41
|
+
|
|
42
|
+
_tss = np.sum((_y - np.mean(_y)) ** 2)
|
|
43
|
+
_rss = np.sum((_y - _func(_x, *_opt)) ** 2)
|
|
44
|
+
|
|
45
|
+
_r2_dic[round(_ocec, 3)] = 1 - _rss / _tss
|
|
46
|
+
|
|
47
|
+
_ratio = DataFrame(_r2_dic, index=[0]).idxmin(axis=1).values[0]
|
|
48
|
+
|
|
49
|
+
return _ratio, _out_table[_ratio]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _ocec_ratio_cal(_nam, _lcres_splt, _hr_lim, _range_, _wisoc_range_):
|
|
53
|
+
# parameter
|
|
54
|
+
_out = DataFrame(index=_lcres_splt.index)
|
|
55
|
+
(_, _oc), (_, _ec) = _lcres_splt.items()
|
|
56
|
+
# _oc, _ec = _lcres_splt['Thermal_OC'], _lcres_splt['Thermal_EC']
|
|
57
|
+
|
|
58
|
+
# real data OC/EC
|
|
59
|
+
_ocec_ratio_real = (_oc / _ec).quantile(.5)
|
|
60
|
+
|
|
61
|
+
_out[f'OC/EC_real_{_nam}'] = _ocec_ratio_real
|
|
62
|
+
_out[f'POC_real_{_nam}'] = _ocec_ratio_real * _ec
|
|
63
|
+
_out[f'SOC_real_{_nam}'] = _oc - _out[f'POC_real_{_nam}']
|
|
64
|
+
|
|
65
|
+
# the least R2 method
|
|
66
|
+
# estimated OC/EC
|
|
67
|
+
if len(_lcres_splt) <= _hr_lim:
|
|
68
|
+
print(f"\t\t{_lcres_splt.index[0].strftime('%Y-%m-%d %X')} to {_lcres_splt.index[-1].strftime('%Y-%m-%d %X')}")
|
|
69
|
+
print('\t\tPlease Modify the Values of "hour_limit" or Input Sufficient Amount of Data !!')
|
|
70
|
+
|
|
71
|
+
_out[[f'OC/EC_{_nam}', f'POC_{_nam}', f'SOC_{_nam}', f'WISOC/OC_{_nam}', f'WSOC_{_nam}',
|
|
72
|
+
f'WISOC_{_nam}']] = np.nan
|
|
73
|
+
|
|
74
|
+
return _out
|
|
75
|
+
|
|
76
|
+
if len(_lcres_splt.dropna()) == 0:
|
|
77
|
+
_out[[f'OC/EC_{_nam}', f'POC_{_nam}', f'SOC_{_nam}', f'WISOC/OC_{_nam}', f'WSOC_{_nam}',
|
|
78
|
+
f'WISOC_{_nam}']] = np.nan
|
|
79
|
+
|
|
80
|
+
return _out
|
|
81
|
+
|
|
82
|
+
# OC/EC
|
|
83
|
+
_ocec_ratio = False
|
|
84
|
+
_st, _ed, _stp = _range_
|
|
85
|
+
|
|
86
|
+
for _ in range(2):
|
|
87
|
+
if _ocec_ratio:
|
|
88
|
+
_ocec_rng = np.arange(_ocec_ratio - _stp / 2, _ocec_ratio + _stp / 2, .01).round(3)
|
|
89
|
+
else:
|
|
90
|
+
_ocec_rng = np.arange(_st, _ed + _stp, _stp).round(3)
|
|
91
|
+
|
|
92
|
+
_ocec_ratio, _soc = _min_Rsq(_oc, _ec, _ocec_rng)
|
|
93
|
+
|
|
94
|
+
# WISOC
|
|
95
|
+
_st, _ed, _stp = _wisoc_range_
|
|
96
|
+
_wisoc_rng = (np.arange(_st, _ed + _stp, _stp) * _ocec_ratio).round(5)
|
|
97
|
+
_wisoc_ratio, _wsoc = _min_Rsq(_oc, _ec, _wisoc_rng)
|
|
98
|
+
|
|
99
|
+
# out
|
|
100
|
+
_out[f'OC/EC_{_nam}'] = _ocec_ratio
|
|
101
|
+
_out[f'SOC_{_nam}'] = _soc
|
|
102
|
+
_out[f'POC_{_nam}'] = _oc - _out[f'SOC_{_nam}']
|
|
103
|
+
_out[f'WISOC/OC_{_nam}'] = _wisoc_ratio
|
|
104
|
+
_out[f'WSOC_{_nam}'] = _wsoc
|
|
105
|
+
_out[f'WISOC_{_nam}'] = _oc - _out[f'WSOC_{_nam}']
|
|
106
|
+
|
|
107
|
+
return _out[[f'OC/EC_{_nam}', f'POC_{_nam}', f'SOC_{_nam}', f'WISOC/OC_{_nam}', f'WSOC_{_nam}', f'WISOC_{_nam}',
|
|
108
|
+
f'OC/EC_real_{_nam}', f'POC_real_{_nam}', f'SOC_real_{_nam}']]
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def _basic(_lcres, _mass, _ocec_ratio, _ocec_ratio_month, _hr_lim, _range, _wisoc_range):
|
|
112
|
+
_lcres, _mass = union_index(_lcres, _mass)
|
|
113
|
+
|
|
114
|
+
_out = {}
|
|
115
|
+
|
|
116
|
+
# OC1, OC2, OC3, OC4, PC
|
|
117
|
+
_df_bsc = _lcres[['OC1', 'OC2', 'OC3', 'OC4', 'PC']].copy()
|
|
118
|
+
|
|
119
|
+
# SOC, POC, OC/EC
|
|
120
|
+
if _ocec_ratio is not None:
|
|
121
|
+
try:
|
|
122
|
+
iter(_ocec_ratio)
|
|
123
|
+
except TypeError:
|
|
124
|
+
raise TypeError('"ocec_ratio" Only Accept a Single Value !!')
|
|
125
|
+
|
|
126
|
+
_prcs_df = DataFrame(index=_df_bsc.index)
|
|
127
|
+
_prcs_df['OC/EC'] = _ocec_ratio
|
|
128
|
+
_prcs_df['POC'] = _ocec_ratio * _lcres['Thermal_EC']
|
|
129
|
+
_prcs_df['SOC'] = _lcres['Thermal_OC'] - _prcs_df['POC']
|
|
130
|
+
|
|
131
|
+
else:
|
|
132
|
+
_df_lst = []
|
|
133
|
+
for _, _df in _lcres.resample(f'{_ocec_ratio_month}MS', closed='left'):
|
|
134
|
+
_thm_cal = _ocec_ratio_cal('thm', _df[['Thermal_OC', 'Thermal_EC']], _hr_lim, _range, _wisoc_range)
|
|
135
|
+
_opt_cal = _ocec_ratio_cal('opt', _df[['Optical_OC', 'Optical_EC']], _hr_lim, _range, _wisoc_range)
|
|
136
|
+
_df_lst.append(concat([_thm_cal, _opt_cal], axis=1))
|
|
137
|
+
|
|
138
|
+
_prcs_df = concat(_df_lst)
|
|
139
|
+
|
|
140
|
+
_df_bsc = concat((_df_bsc.copy(), _prcs_df), axis=1)
|
|
141
|
+
|
|
142
|
+
# ratio
|
|
143
|
+
_df_ratio = DataFrame(index=_df_bsc.index)
|
|
144
|
+
|
|
145
|
+
for _ky, _val in _df_bsc.items():
|
|
146
|
+
if 'OC/EC' in _ky:
|
|
147
|
+
continue
|
|
148
|
+
_df_ratio[f'{_ky}/Thermal_OC'] = _val / _lcres['Thermal_OC']
|
|
149
|
+
_df_ratio[f'{_ky}/Optical_OC'] = _val / _lcres['Optical_OC']
|
|
150
|
+
|
|
151
|
+
if _mass is not None:
|
|
152
|
+
for _ky, _val in _df_bsc.items():
|
|
153
|
+
_df_ratio[f'{_ky}/PM'] = _val / _mass
|
|
154
|
+
|
|
155
|
+
_df_ratio[f'Thermal_OC/PM'] = _lcres['Thermal_OC'] / _mass
|
|
156
|
+
_df_ratio[f'Thermal_EC/PM'] = _lcres['Thermal_EC'] / _mass
|
|
157
|
+
|
|
158
|
+
_df_ratio[f'Optical_OC/PM'] = _lcres['Optical_OC'] / _mass
|
|
159
|
+
_df_ratio[f'Optical_EC/PM'] = _lcres['Optical_EC'] / _mass
|
|
160
|
+
|
|
161
|
+
# ratio status
|
|
162
|
+
_df_bsc = concat((_lcres.loc[:, :'Sample_Volume'], _df_bsc.copy()), axis=1)
|
|
163
|
+
|
|
164
|
+
for _ky, _df in _df_ratio.items():
|
|
165
|
+
_df_bsc[f'{_ky}_status'] = 'Normal'
|
|
166
|
+
_df_bsc[f'{_ky}_status'] = _df_bsc[f'{_ky}_status'].mask(_df > 1, 'Warning')
|
|
167
|
+
|
|
168
|
+
# out
|
|
169
|
+
_out['basic'] = _df_bsc
|
|
170
|
+
_out['ratio'] = _df_ratio
|
|
171
|
+
|
|
172
|
+
return _out
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
*** [ INPUT/OUTPUT PARAMETERS ] ***
|
|
2
|
+
CREATE REPORT IN FILE? (.T.=yes, .F.=no, on screen)
|
|
3
|
+
.F.
|
|
4
|
+
CREATE SPREADSHEET FILE? (.T.=yes, .F.=no)
|
|
5
|
+
.T.
|
|
6
|
+
|
|
7
|
+
*** [ SOLUTION CONTROL ] ***
|
|
8
|
+
Convergence criterion (DEFAULT:1.D-6)
|
|
9
|
+
1.D-6
|
|
10
|
+
Max iterations for bisection method (DEFAULT:100)
|
|
11
|
+
100
|
|
12
|
+
Sweeps for activity coef. calculation (DEFAULT:4)
|
|
13
|
+
4
|
|
14
|
+
Accuracy in activity coef. calculation (DEFAULT:5e-2)
|
|
15
|
+
5e-2
|
|
16
|
+
Subdivisions for root tracking (DEFAULT:5)
|
|
17
|
+
5
|
|
18
|
+
Method for binary activity coefs (0-online, 1-tables) (DEFAULT:1)
|
|
19
|
+
1
|
|
20
|
+
Force mass conservation to machine precision? (0-no, 1-yes) (DEFAULT:0)
|
|
21
|
+
0
|
|
Binary file
|