AeroViz 0.1.8__tar.gz → 0.1.9.1__tar.gz

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.

Files changed (110) hide show
  1. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/_ocec.py +5 -5
  2. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/hysplit/hysplit.py +5 -2
  3. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/core/__init__.py +7 -5
  4. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/OCEC.py +4 -2
  5. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz.egg-info/PKG-INFO +2 -1
  6. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz.egg-info/SOURCES.txt +1 -2
  7. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz.egg-info/requires.txt +1 -0
  8. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/PKG-INFO +2 -1
  9. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/requirements.txt +1 -0
  10. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/setup.py +1 -1
  11. aeroviz-0.1.8/test/test_plot.py +0 -132
  12. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/__init__.py +0 -0
  13. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/data/240228_00.txt +0 -0
  14. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/data/DEFAULT_DATA.csv +0 -0
  15. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/data/DEFAULT_PNSD_DATA.csv +0 -0
  16. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/__init__.py +0 -0
  17. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/_calculate.py +0 -0
  18. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/_isoropia.py +0 -0
  19. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/_mass_volume.py +0 -0
  20. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/_partition.py +0 -0
  21. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/_teom.py +0 -0
  22. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/isrpia.cnf +0 -0
  23. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Chemistry/isrpia2.exe +0 -0
  24. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/Angstrom_exponent.py +0 -0
  25. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/_IMPROVE.py +0 -0
  26. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/__init__.py +0 -0
  27. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/_absorption.py +0 -0
  28. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/_extinction.py +0 -0
  29. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/_mie.py +0 -0
  30. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/_mie_sd.py +0 -0
  31. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/_scattering.py +0 -0
  32. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/Optical/fRH.pkl +0 -0
  33. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/__init__.py +0 -0
  34. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/__merge.py +0 -0
  35. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/_merge.py +0 -0
  36. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/_merge_v1.py +0 -0
  37. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/_merge_v2.py +0 -0
  38. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/_merge_v3.py +0 -0
  39. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/_merge_v4.py +0 -0
  40. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/SizeDistr/_size_distr.py +0 -0
  41. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/VOC/__init__.py +0 -0
  42. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/VOC/_potential_par.py +0 -0
  43. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/VOC/support_voc.json +0 -0
  44. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/__init__.py +0 -0
  45. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/dataProcess/core/__init__.py +0 -0
  46. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/__init__.py +0 -0
  47. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/bar.py +0 -0
  48. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/box.py +0 -0
  49. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/distribution/__init__.py +0 -0
  50. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/distribution/distribution.py +0 -0
  51. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/hysplit/__init__.py +0 -0
  52. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/meteorology/__init__.py +0 -0
  53. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/meteorology/meteorology.py +0 -0
  54. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/optical/PyMieScatt_update.py +0 -0
  55. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/optical/__init__.py +0 -0
  56. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/optical/mie_theory.py +0 -0
  57. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/optical/optical.py +0 -0
  58. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/pie.py +0 -0
  59. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/radar.py +0 -0
  60. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/regression.py +0 -0
  61. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/scatter.py +0 -0
  62. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/__init__.py +0 -0
  63. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/ammonium_rich.py +0 -0
  64. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/contour.py +0 -0
  65. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/corr_matrix.py +0 -0
  66. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/diurnal_pattern.py +0 -0
  67. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/koschmieder.py +0 -0
  68. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/templates/metal_heatmap.py +0 -0
  69. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/timeseries/__init__.py +0 -0
  70. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/timeseries/template.py +0 -0
  71. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/timeseries/timeseries.py +0 -0
  72. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/__init__.py +0 -0
  73. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/_color.py +0 -0
  74. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/_unit.py +0 -0
  75. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/fRH.json +0 -0
  76. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/plt_utils.py +0 -0
  77. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/sklearn_utils.py +0 -0
  78. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/utils/units.json +0 -0
  79. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/plot/violin.py +0 -0
  80. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/__init__.py +0 -0
  81. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/config/__init__.py +0 -0
  82. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/config/supported_instruments.py +0 -0
  83. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/AE33.py +0 -0
  84. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/AE43.py +0 -0
  85. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/APS_3321.py +0 -0
  86. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/Aurora.py +0 -0
  87. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/BC1054.py +0 -0
  88. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/EPA.py +0 -0
  89. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/GRIMM.py +0 -0
  90. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/IGAC.py +0 -0
  91. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/MA350.py +0 -0
  92. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/Minion.py +0 -0
  93. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/NEPH.py +0 -0
  94. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/SMPS.py +0 -0
  95. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/TEOM.py +0 -0
  96. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/VOC.py +0 -0
  97. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/XRF.py +0 -0
  98. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/rawDataReader/script/__init__.py +0 -0
  99. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/tools/__init__.py +0 -0
  100. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/tools/database.py +0 -0
  101. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/tools/dataclassifier.py +0 -0
  102. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/tools/dataprinter.py +0 -0
  103. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz/tools/datareader.py +0 -0
  104. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz.egg-info/dependency_links.txt +0 -0
  105. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/AeroViz.egg-info/top_level.txt +0 -0
  106. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/LICENSE +0 -0
  107. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/MANIFEST.in +0 -0
  108. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/README.md +0 -0
  109. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/setup.cfg +0 -0
  110. {aeroviz-0.1.8 → aeroviz-0.1.9.1}/test/test_aeroviz_imports.py +0 -0
@@ -114,8 +114,7 @@ def _basic(_lcres, _mass, _ocec_ratio, _ocec_ratio_month, _hr_lim, _range, _wiso
114
114
  _out = {}
115
115
 
116
116
  # OC1, OC2, OC3, OC4, PC
117
- _df_bsc = _lcres[['OC1_raw', 'OC2_raw', 'OC3_raw', 'OC4_raw']] / _lcres['Sample_Volume'].to_frame().values.copy()
118
- _df_bsc.rename(columns={'OC1_raw': 'OC1', 'OC2_raw': 'OC2', 'OC3_raw': 'OC3', 'OC4_raw': 'OC4'}, inplace=True)
117
+ _df_bsc = _lcres[['OC1', 'OC2', 'OC3', 'OC4', 'PC']].copy()
119
118
 
120
119
  # SOC, POC, OC/EC
121
120
  if _ocec_ratio is not None:
@@ -144,7 +143,8 @@ def _basic(_lcres, _mass, _ocec_ratio, _ocec_ratio_month, _hr_lim, _range, _wiso
144
143
  _df_ratio = DataFrame(index=_df_bsc.index)
145
144
 
146
145
  for _ky, _val in _df_bsc.items():
147
- if 'OC/EC' in _ky: continue
146
+ if 'OC/EC' in _ky:
147
+ continue
148
148
  _df_ratio[f'{_ky}/Thermal_OC'] = _val / _lcres['Thermal_OC']
149
149
  _df_ratio[f'{_ky}/Optical_OC'] = _val / _lcres['Optical_OC']
150
150
 
@@ -159,14 +159,14 @@ def _basic(_lcres, _mass, _ocec_ratio, _ocec_ratio_month, _hr_lim, _range, _wiso
159
159
  _df_ratio[f'Optical_EC/PM'] = _lcres['Optical_EC'] / _mass
160
160
 
161
161
  # ratio status
162
- _df_bsc = concat((_lcres, _df_bsc.copy()), axis=1)
162
+ _df_bsc = concat((_lcres.loc[:, :'Sample_Volume'], _df_bsc.copy()), axis=1)
163
163
 
164
164
  for _ky, _df in _df_ratio.items():
165
165
  _df_bsc[f'{_ky}_status'] = 'Normal'
166
166
  _df_bsc[f'{_ky}_status'] = _df_bsc[f'{_ky}_status'].mask(_df > 1, 'Warning')
167
167
 
168
168
  # out
169
- _out['ratio'] = _df_ratio
170
169
  _out['basic'] = _df_bsc
170
+ _out['ratio'] = _df_ratio
171
171
 
172
172
  return _out
@@ -12,6 +12,9 @@ from AeroViz.plot.utils import set_figure
12
12
 
13
13
  __all__ = ['hysplit']
14
14
 
15
+ # 設置默認文件路徑
16
+ DEFAULT_FILE = Path(__file__).parent.parent.parent / 'data' / '240228_00.txt'
17
+
15
18
 
16
19
  def read_hysplit_data(file: Path):
17
20
  data = pd.read_csv(file, skiprows=8, sep=r'\s+', names=range(0, 12), engine='python')
@@ -23,7 +26,7 @@ def read_hysplit_data(file: Path):
23
26
 
24
27
 
25
28
  @set_figure
26
- def hysplit(file: Path):
29
+ def hysplit(file: Path = DEFAULT_FILE):
27
30
  data = read_hysplit_data(file)
28
31
 
29
32
  # 創建地圖
@@ -76,4 +79,4 @@ def hysplit(file: Path):
76
79
 
77
80
 
78
81
  if __name__ == "__main__":
79
- hysplit(Path("../../data/240228_00.txt")) # 請替換為您的實際檔案路徑
82
+ hysplit() # 請替換為您的實際檔案路徑
@@ -101,11 +101,13 @@ class AbstractReader(ABC):
101
101
 
102
102
  # validate rate calculation
103
103
  if period_size < sample_size or sample_size < qc_size or period_size == 0 or sample_size == 0:
104
- raise ValueError(f"Invalid sample sizes: period={period_size}, sample={sample_size}, QC={qc_size}")
104
+ _acq_rate, _yid_rate, _OEE_rate = 0, 0, 0
105
+ # raise ValueError(f"Invalid sample sizes: period={period_size}, sample={sample_size}, QC={qc_size}")
105
106
 
106
- _acq_rate = round((sample_size / period_size) * 100, 1)
107
- _yid_rate = round((qc_size / sample_size) * 100, 1)
108
- _OEE_rate = round((qc_size / period_size) * 100, 1)
107
+ else:
108
+ _acq_rate = round((sample_size / period_size) * 100, 1)
109
+ _yid_rate = round((qc_size / sample_size) * 100, 1)
110
+ _OEE_rate = round((qc_size / period_size) * 100, 1)
109
111
 
110
112
  self.logger.info(f'{_nam}:')
111
113
  self.logger.info(f"\tAcquisition rate: {_acq_rate}%")
@@ -114,7 +116,7 @@ class AbstractReader(ABC):
114
116
  self.logger.info(f"{'=' * 60}")
115
117
 
116
118
  print(f'\n\t{_nam} : ')
117
- print(f'\t\tacquisition rate | yield rate | OEE rate :'
119
+ print(f'\t\tacquisition rate | yield rate -> OEE rate :'
118
120
  f' \033[91m{_acq_rate}% | {_yid_rate}% -> {_OEE_rate}%\033[0m')
119
121
 
120
122
  if self.meta['deter_key'] is not None:
@@ -9,7 +9,7 @@ class Reader(AbstractReader):
9
9
 
10
10
  def _raw_reader(self, file):
11
11
  with open(file, 'r', encoding='utf-8', errors='ignore') as f:
12
- _df = read_csv(f, skiprows=3).apply(to_numeric, errors='coerce')
12
+ _df = read_csv(f, skiprows=3)
13
13
 
14
14
  _df['Start Date/Time'] = _df['Start Date/Time'].str.strip()
15
15
  _df['time'] = to_datetime(_df['Start Date/Time'], format='%m/%d/%Y %I:%M:%S %p', errors='coerce')
@@ -51,6 +51,8 @@ class Reader(AbstractReader):
51
51
  'ECPk5-ug C': 'EC5_raw',
52
52
  })
53
53
 
54
+ _df = _df.apply(to_numeric, errors='coerce')
55
+
54
56
  _df['OC1'] = _df['OC1_raw'] / _df['Sample_Volume']
55
57
  _df['OC2'] = _df['OC2_raw'] / _df['Sample_Volume']
56
58
  _df['OC3'] = _df['OC3_raw'] / _df['Sample_Volume']
@@ -64,7 +66,7 @@ class Reader(AbstractReader):
64
66
  # _df['EC4'] = _df['EC4_raw'] / _df['Sample_Volume']
65
67
  # _df['EC5'] = _df['EC5_raw'] / _df['Sample_Volume']
66
68
 
67
- _df = _df[['Thermal_OC', 'Optical_OC', 'Thermal_EC', 'Optical_EC', 'TC', 'Sample_Volume',
69
+ _df = _df[['Thermal_OC', 'Thermal_EC', 'Optical_OC', 'Optical_EC', 'TC', 'Sample_Volume',
68
70
  'OC1', 'OC2', 'OC3', 'OC4', 'PC']]
69
71
 
70
72
  return _df.loc[~_df.index.duplicated() & _df.index.notna()]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AeroViz
3
- Version: 0.1.8
3
+ Version: 0.1.9.1
4
4
  Summary: Aerosol science
5
5
  Home-page: https://github.com/Alex870521/AeroViz
6
6
  Author: alex
@@ -18,6 +18,7 @@ Requires-Dist: scipy==1.14.0
18
18
  Requires-Dist: seaborn==0.13.2
19
19
  Requires-Dist: scikit-learn==1.5.1
20
20
  Requires-Dist: windrose==1.9.2
21
+ Requires-Dist: cartopy==0.24.1
21
22
  Requires-Dist: tabulate==0.9.0
22
23
  Requires-Dist: rich~=13.7.1
23
24
 
@@ -104,5 +104,4 @@ AeroViz/tools/database.py
104
104
  AeroViz/tools/dataclassifier.py
105
105
  AeroViz/tools/dataprinter.py
106
106
  AeroViz/tools/datareader.py
107
- test/test_aeroviz_imports.py
108
- test/test_plot.py
107
+ test/test_aeroviz_imports.py
@@ -5,5 +5,6 @@ scipy==1.14.0
5
5
  seaborn==0.13.2
6
6
  scikit-learn==1.5.1
7
7
  windrose==1.9.2
8
+ cartopy==0.24.1
8
9
  tabulate==0.9.0
9
10
  rich~=13.7.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: AeroViz
3
- Version: 0.1.8
3
+ Version: 0.1.9.1
4
4
  Summary: Aerosol science
5
5
  Home-page: https://github.com/Alex870521/AeroViz
6
6
  Author: alex
@@ -18,6 +18,7 @@ Requires-Dist: scipy==1.14.0
18
18
  Requires-Dist: seaborn==0.13.2
19
19
  Requires-Dist: scikit-learn==1.5.1
20
20
  Requires-Dist: windrose==1.9.2
21
+ Requires-Dist: cartopy==0.24.1
21
22
  Requires-Dist: tabulate==0.9.0
22
23
  Requires-Dist: rich~=13.7.1
23
24
 
@@ -5,5 +5,6 @@ scipy==1.14.0
5
5
  seaborn==0.13.2
6
6
  scikit-learn==1.5.1
7
7
  windrose==1.9.2
8
+ cartopy==0.24.1
8
9
  tabulate==0.9.0
9
10
  rich~=13.7.1
@@ -5,7 +5,7 @@ with open('requirements.txt') as f:
5
5
 
6
6
  setup(
7
7
  name="AeroViz",
8
- version="0.1.8",
8
+ version="0.1.9.1",
9
9
  author="alex",
10
10
  author_email="alex870521@gmail.com",
11
11
  description="Aerosol science",
@@ -1,132 +0,0 @@
1
- from pathlib import Path
2
- from AeroViz import plot, DataBase, DataClassifier
3
-
4
-
5
- def use_scatter():
6
- # example of using plot.scatter
7
- df = DataBase(load_data=True)
8
-
9
- df = df[['Vis_LPV', 'PM2.5', 'RH', 'VC', 'Extinction', 'Scattering']].dropna()
10
- # plot.scatter(df, x='PM2.5', y='Extinction', c='VC', s='RH', cmap='YlGnBu', diagonal=True)
11
- plot.scatter(df, x='Scattering', y='Extinction', color='r', regression=True, regression_line_color='darkred',
12
- diagonal=True)
13
-
14
-
15
- def use_regression():
16
- # example of using plot.linear_regression
17
- df = DataBase(load_data=True)
18
-
19
- plot.linear_regression(df, x='PM2.5', y='Extinction')
20
- plot.linear_regression(df, x='PM2.5', y=['Extinction', 'Scattering', 'Absorption'], xlim=[0, None], ylim=[0, None])
21
- # plot.multiple_linear_regression(df, x=['AS', 'AN', 'OM', 'EC', 'SS', 'Soil'], y=['Extinction'])
22
- # plot.multiple_linear_regression(df, x=['NO', 'NO2', 'CO', 'PM1'], y=['PM25'])
23
-
24
-
25
- def use_pie():
26
- pass
27
-
28
-
29
- def use_bar():
30
- pass
31
-
32
-
33
- def use_CBPF_windrose():
34
- # example of using plot.meteorology
35
- df = DataBase(load_data=True)
36
-
37
- # plot.meteorology.wind_rose(df, 'WS', 'WD', typ='bar')
38
- # plot.meteorology.wind_rose(df, 'WS', 'WD', 'PM25', typ='scatter')
39
-
40
- # plot.meteorology.CBPF(df, 'WS', 'WD', 'PM25')
41
- # plot.meteorology.CBPF(df, 'WS', 'WD', 'PM25', percentile=[0, 25])
42
- # plot.meteorology.CBPF(df, 'WS', 'WD', 'PM25', percentile=[25, 50])
43
- # plot.meteorology.CBPF(df, 'WS', 'WD', 'PM25', percentile=[50, 75])
44
- plot.meteorology.CBPF(df, 'WS', 'WD', 'PM2.5', percentile=[75, 100], resolution=50)
45
-
46
-
47
- def use_SMPS():
48
- # example of using plot.distribution
49
- PNSD = DataBase(load_PSD=True)
50
-
51
- plot.distribution.heatmap(PNSD, unit='Number')
52
- plot.distribution.heatmap_tms(PNSD, unit='Number', freq='60d')
53
-
54
- # Classify the data
55
- # PNSD_state_class, _ = DataClassifier(df=PNSD, by='State', statistic='Table')
56
- # plot.distribution.plot_dist(PNSD_state_class, _, unit='Number', additional='error')
57
-
58
- # PNSE_ext_class, _ = DataClassifier(df=PNSD, by='Extinction', statistic='Table', qcut=20)
59
- # plot.distribution.three_dimension(PNSE_ext_class, unit='Number')
60
-
61
- # plot.distribution.curve_fitting(np.array(PNSE_ext_class.columns, dtype=float), PNSE_ext_class.iloc[0, :], mode=3, unit='Number')
62
-
63
-
64
- def use_linear_regression_and_scatter_to_verify():
65
- # example of using plot.linear_regression and plot.scatter
66
- df = DataBase(load_data=True)
67
-
68
- plot.linear_regression(df, x='Extinction', y=['Bext_internal', 'Bext_external'], xlim=[0, 300], ylim=[0, 600])
69
- plot.linear_regression(df, x='Scattering', y=['Bsca_internal', 'Bsca_external'], xlim=[0, 300], ylim=[0, 600])
70
- plot.linear_regression(df, x='Absorption', y=['Babs_internal', 'Babs_external'], xlim=[0, 100], ylim=[0, 200])
71
-
72
- plot.scatter(df, x='Extinction', y='Bext_Fixed_PNSD', xlim=[0, 600], ylim=[0, 600], title='Fixed PNSD',
73
- regression=True, diagonal=True)
74
- plot.scatter(df, x='Extinction', y='Bext_Fixed_RI', xlim=[0, 600], ylim=[0, 600], title='Fixed RI',
75
- regression=True, diagonal=True)
76
-
77
-
78
- def use_extinction_by_particle_gas():
79
- # example of using plot.bar and plot.pie
80
- df = DataBase(load_data=True)
81
-
82
- ser_grp_sta, ser_grp_sta_std = DataClassifier(df, by='State', df_support=df)
83
- ext_particle_gas = ser_grp_sta.loc[:, ['Scattering', 'Absorption', 'ScatteringByGas', 'AbsorptionByGas']]
84
-
85
- # plot.bar(data_set=ext_particle_gas, data_std=None,
86
- # labels=[rf'$b_{{sp}}$', rf'$b_{{ap}}$', rf'$b_{{sg}}$', rf'$b_{{ag}}$'],
87
- # unit='Extinction',
88
- # style="stacked",
89
- # colors=plot.Color.paired)
90
-
91
- plot.pie(data_set=ext_particle_gas,
92
- labels=[rf'$b_{{sp}}$', rf'$b_{{ap}}$', rf'$b_{{sg}}$', rf'$b_{{ag}}$'],
93
- unit='Extinction',
94
- style='donut',
95
- colors=plot.Color.paired,
96
- title=['', '', '', ''])
97
-
98
-
99
- def use_timeseries():
100
- # example of using plot.timeseries
101
- df = DataBase(load_data=True)
102
-
103
- # plot.timeseries(df['2021-02-01':'2021-03-31'],
104
- # y=['Extinction', 'Scattering'], color=None, style=['line', 'line'],
105
- # ylim=[0, None], ylim2=[0, None], rolling=50,
106
- # inset_kws2=dict(bbox_to_anchor=(1.12, 0, 1.2, 1)))
107
-
108
- plot.timeseries(df['2021-02-01':'2021-02-11'],
109
- y='WS', color='WD', style='scatter',
110
- scatter_kws=dict(cmap='hsv'), cbar_kws=dict(ticks=[0, 90, 180, 270, 360]),
111
- ylim=[0, None])
112
-
113
- # plot.timeseries_template(df.loc['2021-02-01':'2021-03-31'])
114
-
115
-
116
- def use_diurnal_pattern():
117
- df = DataBase(load_data=True)
118
- plot.diurnal_pattern(df, 'PM2.5')
119
-
120
-
121
- def use_hysplit():
122
- plot.hysplit(Path("/AeroViz/data/240228_00.txt"))
123
-
124
- if __name__ == '__main__':
125
- # use_SMPS()
126
- # use_scatter()
127
- # use_regression()
128
- # use_CBPF_windrose()
129
- # use_extinction_by_particle_gas()
130
- # use_timeseries()
131
- # use_diurnal_pattern()
132
- use_hysplit()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes