shancx 1.9.33.215__py3-none-any.whl → 1.9.33.217__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.
shancx/Plot/plotGlobal.py CHANGED
@@ -180,7 +180,6 @@ def plotScatter(df1, title = "Total number ",saveDir="plotScatter", map_backgrou
180
180
  plotScatter(df2,title = f" Total number of stations ", saveDir="scatter_maps")
181
181
  """
182
182
 
183
-
184
183
  import ssl
185
184
  import urllib.request
186
185
  ssl._create_default_https_context = ssl._create_unverified_context
@@ -191,8 +190,11 @@ import cartopy.crs as ccrs
191
190
  import cartopy.feature as cfeature
192
191
  from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter
193
192
  from hjnwtx.colormap import cmp_hjnwtx
194
- def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype,myfont,shp_file="./"):
193
+ from shancx import crDir
194
+ def plotBorder(UTCstr, nclon, nclat, cr, fig_title,savepath="./plotBorder", datatype=None,font_path=None,shp_file="./"):
195
+ myfont = mpl.font_manager.FontProperties(fname = font_path, size = 12)
195
196
  figpath = f"{savepath}/fig/{UTCstr[:4]}/{UTCstr[:8]}/{fig_title}.PNG"
197
+ crDir(figpath)
196
198
  lonmin = np.min(nclon)
197
199
  lonmax = np.max(nclon)
198
200
  latmin = np.min(nclat)
@@ -245,12 +247,11 @@ def plotfigPlus(UTCstr, nclon, nclat, cr, fig_title, datatype,myfont,shp_file=".
245
247
  """
246
248
  latArr = np.linspace(27, -13, 2000 )
247
249
  lonArr = np.linspace(70, 150, 4000)
248
-
249
250
  font_path = '/mnt/wtx_weather_forecast/scx/sever7/微软雅黑.ttf'
250
- myfont = mpl.font_manager.FontProperties(fname = font_path, size = 12)
251
+
251
252
  fig_title = f"实况雷达回波_{UTCstr}_test"
252
253
  baseCR[:,900:3700] = CR
253
- plotfigPlus(UTCstr,lonArr,latArr,baseCR,fig_title,datatype="radar",myfont=myfont)
254
+ plotBorder(UTCstr,lonArr,latArr,baseCR,fig_title,datatype="radar",font_path=font_path)
254
255
  fig_title = f"卫星反演雷达回波_{UTCstr}"
255
256
  """
256
257
 
@@ -321,48 +322,4 @@ fig_title = f"卫星反演雷达回波_{UTCstr}"
321
322
  # base[20:1070,75:1625] = satCR
322
323
  plot_fig(data,result['lats'],result['lons'],fig_title,datatype="radar")
323
324
  """
324
-
325
-
326
- import numpy as np
327
- import matplotlib.pyplot as plt
328
- import cartopy.crs as ccrs
329
- import cartopy.feature as cfeature
330
- from mpl_toolkits.axes_grid1 import make_axes_locatable
331
- import datetime
332
- from shancx import crDir
333
- def plotBorder(matrix,name='plotBorder',saveDir="plotBorder",extent=None,title='Matrix Plot', xlabel='X-axis', ylabel='Y-axis', color_label='Value', cmap='viridis'):
334
- if extent is None:
335
- lat_min, lat_max = -3, 13
336
- lon_min, lon_max = -0, 28
337
- else:
338
- lat_min, lat_max, lon_min, lon_max = extent
339
- now_str = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
340
- fig = plt.figure(figsize=(12, 8))
341
- ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
342
- ax.set_extent([lon_min, lon_max, lat_min, lat_max], crs=ccrs.PlateCarree())
343
- im = ax.imshow(
344
- matrix,
345
- extent=[lon_min, lon_max, lat_min, lat_max],
346
- origin='upper',
347
- cmap='viridis',
348
- transform=ccrs.PlateCarree()
349
- )
350
- ax.add_feature(cfeature.COASTLINE, linewidth=0.5)
351
- ax.add_feature(cfeature.BORDERS, linestyle=':', linewidth=0.5)
352
- states = cfeature.NaturalEarthFeature(
353
- category='cultural',
354
- name='admin_1_states_provinces_lines',
355
- scale='50m',
356
- facecolor='none'
357
- )
358
- ax.add_feature(states, edgecolor='red', linewidth=0.5)
359
- divider = make_axes_locatable(ax)
360
- cax = divider.append_axes("right", size="5%", pad=0.1, axes_class=plt.Axes)
361
- cbar = plt.colorbar(im, cax=cax, label='Data Values')
362
- ax.set_title('Sat data Boundaries', fontsize=14)
363
- plt.tight_layout()
364
- outpath = f'./{saveDir}/{name}_{now_str}.png' if name=="plotBorder" else f"./{saveDir}/{name}.png"
365
- crDir(outpath)
366
- plt.savefig(outpath)
367
- plt.close()
368
-
325
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shancx
3
- Version: 1.9.33.215
3
+ Version: 1.9.33.217
4
4
  Summary: A simple timer decorator
5
5
  Home-page: https://gitee.com/shancx
6
6
  Author: shancx
@@ -70,7 +70,7 @@ shancx/Plot/Gray2RGB.py,sha256=yDXu1xWVi7OtrS8_ExxK_ev1988kj1ZxoNCWf-kl4Zc,2734
70
70
  shancx/Plot/__init__.py,sha256=_fmDFZfh9HzDPBPKCMPrDT2DsblLVfrO-uFvUg76a74,19194
71
71
  shancx/Plot/draw_day_CR_PNG.py,sha256=ftOYdk80Xmry_H1uaypjrTUA0mJZBV7EGt5T7JfVg0E,7267
72
72
  shancx/Plot/exam.py,sha256=XXyBQp1Eb1siNiu7FY8ACiWH0g43ZSLTOGLqs3aKomE,3966
73
- shancx/Plot/plotGlobal.py,sha256=ZB2lHrFbjOYGzPXg2eNE3X0C-PFQa8FGQqp36skdAyU,16973
73
+ shancx/Plot/plotGlobal.py,sha256=Sen5zJ9NE8sO-CSt0bFW-RaMt4uVMPJiFdNBepiLkj8,15288
74
74
  shancx/Plot/radarNmc.py,sha256=ixmoDaoT6whmmrv4wD4p7H_DiNsyOEb2tUoz2KQgDeM,1273
75
75
  shancx/Plot/single_china_map.py,sha256=cRmZW6TtLBwLb-Y3syim_K1jM350CmB5zkK1nrAcaRQ,2116
76
76
  shancx/RdPzl/__init__.py,sha256=I5Isz3KfDgFZAdlRk4D-Hvp-8xH4F2Dl0XGxYGzUcKc,1166
@@ -85,7 +85,7 @@ shancx/Train/multiGpu.py,sha256=D_oZeiSc7VWktpnVDwrFOC1CYZSt9rxOKY5lngE5vFg,820
85
85
  shancx/Train/prepare.py,sha256=vL_8UOA66oZCBIwCICtihsGibivtNgaVJGulJxfNdn8,6793
86
86
  shancx/Train/renet50.py,sha256=wEhYk1X96WE5zuqHqVxWLJa-A5jDNkz4z6edORNufnA,6428
87
87
  shancx/tensBoard/__init__.py,sha256=ga2C5YyJITvvQA1ocpxna_KNFnNRJVwkTjLoIglLZUQ,993
88
- shancx-1.9.33.215.dist-info/METADATA,sha256=5lSy1sTRa-1mDSftgFUQSQ2z8qlpvabb7zGE70JOJI8,850
89
- shancx-1.9.33.215.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
- shancx-1.9.33.215.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
91
- shancx-1.9.33.215.dist-info/RECORD,,
88
+ shancx-1.9.33.217.dist-info/METADATA,sha256=R9m3JOOcqvVDkRY-CNE6lDAx7t8Hnv53OEoget7hzbw,850
89
+ shancx-1.9.33.217.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
+ shancx-1.9.33.217.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
91
+ shancx-1.9.33.217.dist-info/RECORD,,