shancx 1.9.33.172__py3-none-any.whl → 1.9.33.175__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/NN/__init__.py CHANGED
@@ -132,6 +132,27 @@ def Mul_sub(task, param_list, num=6):
132
132
  sys.exit(1)
133
133
  print("All tasks completed")
134
134
 
135
+ from concurrent.futures import ThreadPoolExecutor
136
+ from itertools import product
137
+ def Mul_TH(task, param_list, max_workers=6):
138
+ print(f"Thread num: {max_workers}")
139
+ validate_param_list(param_list)
140
+ task_args = [
141
+ (arg,) if len(param_list) == 1 else arg
142
+ for arg in (
143
+ param_list[0] if len(param_list) == 1
144
+ else product(*param_list)
145
+ )
146
+ ]
147
+ with ThreadPoolExecutor(max_workers) as ex:
148
+ try:
149
+ list(ex.map(task, task_args))
150
+ except KeyboardInterrupt:
151
+ print("\n用户中断操作")
152
+ ex.shutdown(wait=False)
153
+ sys.exit(1)
154
+
155
+
135
156
  # import os
136
157
  # from datetime import datetime
137
158
  # from shancx.NN import _loggers
shancx/geosProj.py ADDED
@@ -0,0 +1,80 @@
1
+ import numpy as np
2
+ import warnings
3
+
4
+ class goesProj():
5
+ def __init__(self,lonD=-75.2,resolution=2000):
6
+
7
+ self.ea=6378.137
8
+ self.eb=6356.7523
9
+ self.h=42164
10
+ self.lambdaD=np.radians(lonD)
11
+
12
+ OFF = {500: 10991.5, 1000: 5495.5, 1250: 4576, 2000: 2747.5, 4000: 1373.5, 5000: 1144}
13
+ FAC = {500: 81865099, 1000: 40932549, 1250: 32746038, 2000: 20466274, 4000: 10233137, 5000: 8186510}
14
+
15
+ self.COFF=OFF[resolution]
16
+ self.LOFF=OFF[resolution]
17
+ self.CFAC=FAC[resolution]
18
+ self.LFAC=FAC[resolution]
19
+
20
+ def transform(self,latD,lonDe,RO=22):
21
+ lat=np.radians(latD)
22
+ lon=np.radians(lonDe)
23
+ ba2=np.square(self.eb/self.ea)
24
+ phie=np.arctan(ba2*np.tan(lat))
25
+ diffLon0=lon-self.lambdaD
26
+ re=self.eb/np.sqrt(1-(1-ba2)*np.square(np.cos(phie)))
27
+
28
+ r1=self.h-re*np.cos(phie)*np.cos(diffLon0)
29
+ r2= -re*np.cos(phie)*np.sin(diffLon0)
30
+ r3=re*np.sin(phie)
31
+ rn=np.sqrt(np.square(r1)+np.square(r2)+np.square(r3))
32
+
33
+
34
+ x= np.degrees(np.arctan(-r2/r1))
35
+ y= np.degrees(np.arcsin(-r3/rn))
36
+
37
+ c=(self.COFF+x*np.power(2.0,-16)*self.CFAC -RO).astype(np.int32)
38
+ l=(self.LOFF+y*np.power(2.0,-16)*self.LFAC -RO).astype(np.int32)
39
+ return (l,c)
40
+
41
+
42
+ import numpy as np
43
+ import warnings
44
+
45
+ class goesProjMSG10():
46
+ def __init__(self,lonD=-75.2,resolution=2000):
47
+
48
+ self.ea=6378.137
49
+ self.eb=6356.7523
50
+ self.h=42164
51
+ self.lambdaD=np.radians(lonD)
52
+
53
+ OFF = {500: 10991.5, 1000: 5495.5, 1250: 4576, 2000: 2747.5, 4000: 1373.5, 5000: 1144}
54
+ FAC = {500: 81865099, 1000: 40932549, 1250: 32746038, 2000: 20466274, 4000: 10233137, 5000: 8186510}
55
+
56
+ self.COFF=OFF[resolution]
57
+ self.LOFF=OFF[resolution]
58
+ self.CFAC=FAC[resolution]
59
+ self.LFAC=FAC[resolution]
60
+
61
+ def transform(self,latD,lonDe,ROC=5,ROL=-5):
62
+ lat=np.radians(latD)
63
+ lon=np.radians(lonDe)
64
+ ba2=np.square(self.eb/self.ea)
65
+ phie=np.arctan(ba2*np.tan(lat))
66
+ diffLon0=lon-self.lambdaD
67
+ re=self.eb/np.sqrt(1-(1-ba2)*np.square(np.cos(phie)))
68
+
69
+ r1=self.h-re*np.cos(phie)*np.cos(diffLon0)
70
+ r2= -re*np.cos(phie)*np.sin(diffLon0)
71
+ r3=re*np.sin(phie)
72
+ rn=np.sqrt(np.square(r1)+np.square(r2)+np.square(r3))
73
+
74
+
75
+ x= np.degrees(np.arctan(-r2/r1))
76
+ y= np.degrees(np.arcsin(-r3/rn))
77
+
78
+ c=(self.COFF+x*np.power(2.0,-16)*self.CFAC -ROC).astype(np.int32)
79
+ l=(self.LOFF+y*np.power(2.0,-16)*self.LFAC -ROL).astype(np.int32)
80
+ return (l,c)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shancx
3
- Version: 1.9.33.172
3
+ Version: 1.9.33.175
4
4
  Summary: A simple timer decorator
5
5
  Home-page: https://gitee.com/shancx
6
6
  Author: shancx
@@ -11,6 +11,7 @@ shancx/args.py,sha256=Nr80vgQpT3m31_crKGf5DvofCxyERJFbqJ1sHb1BIqs,1042
11
11
  shancx/bak.py,sha256=eKe2o1Yq7LCldoA-LXi14s_QNf1BkQsDsWJ7pDoscrw,25428
12
12
  shancx/cmp.py,sha256=cIQv-QTl-22FJa6tmHyBu_IQmMq5LnsQGGFK5jc5hMA,893
13
13
  shancx/df2database.py,sha256=h9_n9tZBWKyGKnpGPRHPSZgMn5kylX0sV5APwmi2SHM,3315
14
+ shancx/geosProj.py,sha256=MnynPA4nnVudFdhkOrVMzIzx8P5XE7-U54EZGbePkfo,2682
14
15
  shancx/getResponse.py,sha256=QmJfa4czGCOiKb8RuCLXKE7AAKVADAptNiwn7v1tfbM,1055
15
16
  shancx/info.py,sha256=0rk_L8Z5uj9RliaZrzT-CArH9ZObmdmcp-1RxAItL08,1122
16
17
  shancx/netdfJU.py,sha256=96KR9NMLr2Kcs_OOMpX7QPujdWUj0GCEUIZ7_4_pBxw,7741
@@ -56,9 +57,13 @@ shancx/Fillmiss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
57
  shancx/Fillmiss/imgidwJU.py,sha256=CyP4ZlhPpXPqGVzzcLR7lohVl8bWjEceJLo7yvKgtEM,1708
57
58
  shancx/Fillmiss/imgidwLatLonJU.py,sha256=ltYZj9CwN8cVs4Kow64oVN1EiBERgW9FceTUBFkCOAs,4314
58
59
  shancx/Gpu/__init__.py,sha256=4Ahq04phTGVlFWN9Vih0WAh-IqFrhtwM5hj4G1IU2Dk,1950
60
+ shancx/H9/__init__.py,sha256=FCarcXfU2tVD2KrCGKNNUuL51zAWZYHV7lrP7gntvaI,4911
61
+ shancx/H9/ahi_read_hsd.py,sha256=bt9oOOARcXijmyGpmHYXj0NKnuTntZjqx0_tu6Vp2vs,33522
62
+ shancx/H9/ahisearchtable.py,sha256=e2kpz-P5npgL4gzNxn8igERJuWWIysvTNLkptr5_Zcc,9579
63
+ shancx/H9/geometry.py,sha256=ZoCfgP07ANqDxyLf8uFN016DPl7QqW9pAV3sr2ekCng,95893
59
64
  shancx/Hug/__init__.py,sha256=NvcqXM0CSwXYtTr5yj4zfkag_7PZcI5tCsIHjuLNXTQ,3040
60
65
  shancx/Mos/__init__.py,sha256=IDlCLNN6a_mguYmRcAPcevHSDaud5ZhvYNSuASqztcE,1563
61
- shancx/NN/__init__.py,sha256=y3HcHvM-AhOLCGzWy053pcLDxaEG5Jgpi4oDMidOffE,6388
66
+ shancx/NN/__init__.py,sha256=uN2Dkqm-rRnp8TDitwMm1PcYYH9KsaQXcraFVuIRf98,7027
62
67
  shancx/Plot/GlobMap.py,sha256=WRvZOf5bo8IfECk1-sN4g6K0CrcJhSoEJAiLvZAWDwg,13021
63
68
  shancx/Plot/Gray2RGB.py,sha256=yDXu1xWVi7OtrS8_ExxK_ev1988kj1ZxoNCWf-kl4Zc,2734
64
69
  shancx/Plot/__init__.py,sha256=R4pywzeVDqEWGMkWeGBAVmopgPBThiLv2RBDlGquNGc,31891
@@ -79,7 +84,7 @@ shancx/Train/multiGpu.py,sha256=D_oZeiSc7VWktpnVDwrFOC1CYZSt9rxOKY5lngE5vFg,820
79
84
  shancx/Train/prepare.py,sha256=vL_8UOA66oZCBIwCICtihsGibivtNgaVJGulJxfNdn8,6793
80
85
  shancx/Train/renet50.py,sha256=wEhYk1X96WE5zuqHqVxWLJa-A5jDNkz4z6edORNufnA,6428
81
86
  shancx/tensBoard/__init__.py,sha256=ga2C5YyJITvvQA1ocpxna_KNFnNRJVwkTjLoIglLZUQ,993
82
- shancx-1.9.33.172.dist-info/METADATA,sha256=SxwmImhbBAxNgwIZ814dXZAa_C4EulV5v0_KxHJXRzo,644
83
- shancx-1.9.33.172.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
84
- shancx-1.9.33.172.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
85
- shancx-1.9.33.172.dist-info/RECORD,,
87
+ shancx-1.9.33.175.dist-info/METADATA,sha256=Z_9NNc9RXLu1BSr1wSa8sXTqfc2hz8JPZQUWBGMOyfM,644
88
+ shancx-1.9.33.175.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
89
+ shancx-1.9.33.175.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
90
+ shancx-1.9.33.175.dist-info/RECORD,,