geospacelab 0.11.0__py3-none-any.whl → 0.11.1__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.
- geospacelab/__init__.py +1 -1
- geospacelab/toolbox/utilities/numpyarray.py +20 -2
- {geospacelab-0.11.0.dist-info → geospacelab-0.11.1.dist-info}/METADATA +1 -1
- {geospacelab-0.11.0.dist-info → geospacelab-0.11.1.dist-info}/RECORD +7 -7
- {geospacelab-0.11.0.dist-info → geospacelab-0.11.1.dist-info}/WHEEL +0 -0
- {geospacelab-0.11.0.dist-info → geospacelab-0.11.1.dist-info}/licenses/LICENSE +0 -0
- {geospacelab-0.11.0.dist-info → geospacelab-0.11.1.dist-info}/top_level.txt +0 -0
geospacelab/__init__.py
CHANGED
|
@@ -6,7 +6,7 @@ __author__ = "Lei Cai"
|
|
|
6
6
|
__copyright__ = "Copyright 2021, GeospaceLAB"
|
|
7
7
|
__credits__ = ["Lei Cai"]
|
|
8
8
|
__license__ = "BSD-3-Clause License"
|
|
9
|
-
__version__ = "0.11.
|
|
9
|
+
__version__ = "0.11.1"
|
|
10
10
|
__maintainer__ = "Lei Cai"
|
|
11
11
|
__email__ = "lei.cai@oulu.fi"
|
|
12
12
|
__status__ = "Developing"
|
|
@@ -270,6 +270,8 @@ def data_resample(
|
|
|
270
270
|
# grid_z_1[i, :] = z_i
|
|
271
271
|
|
|
272
272
|
|
|
273
|
+
|
|
274
|
+
|
|
273
275
|
def regridding_2d_xgaps(
|
|
274
276
|
x, y, z,
|
|
275
277
|
xtype=None, xres=None):
|
|
@@ -281,13 +283,29 @@ def regridding_2d_xgaps(
|
|
|
281
283
|
x1 = sectime
|
|
282
284
|
|
|
283
285
|
diff_x = numpy.diff(x1)
|
|
286
|
+
x_res_md = numpy.median(diff_x)
|
|
284
287
|
if xres is None:
|
|
285
|
-
xres =
|
|
288
|
+
xres = x_res_md
|
|
286
289
|
|
|
287
290
|
if xtype == 'datetime' and basic.isnumeric(xres):
|
|
288
291
|
xres = datetime.timedelta(seconds=xres)
|
|
292
|
+
x_res_md = datetime.timedelta(seconds=x_res_md)
|
|
293
|
+
|
|
294
|
+
xx_1 = np.empty_like(x)
|
|
295
|
+
xx_2 = np.empty_like(x)
|
|
296
|
+
for i, xxx in enumerate(x):
|
|
297
|
+
if i == 0:
|
|
298
|
+
xx_1[0] = xxx - np.min([datetime.timedelta(diff_x[0]), xres, x_res_md]) / 2
|
|
299
|
+
else:
|
|
300
|
+
xx_1[i] = xx_2[i-1] if xres > datetime.timedelta(seconds=diff_x[i-1]) else xxx - xres / 2
|
|
289
301
|
|
|
290
|
-
|
|
302
|
+
if i == len(x) - 1:
|
|
303
|
+
xx_2[i] = xxx + np.min([datetime.timedelta(diff_x[i-1]), xres, x_res_md]) / 2
|
|
304
|
+
else:
|
|
305
|
+
xx_2[i] = xxx + np.min([datetime.timedelta(diff_x[i]), xres, x_res_md]) / 2
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
xx = numpy.hstack((xx_1[:, numpy.newaxis], xx_2[:, numpy.newaxis]))
|
|
291
309
|
xnew = xx.flatten()
|
|
292
310
|
|
|
293
311
|
if len(y.shape) == 1 or 1 in y.shape:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
geospacelab/__init__.py,sha256=
|
|
1
|
+
geospacelab/__init__.py,sha256=EaeDqf4F-JACq5ng6JBu4Qa3gtTN2cIhCIlUo601n0M,801
|
|
2
2
|
geospacelab/config/__init__.py,sha256=--F2bcKRCNIbPaFz4bySMkuxGg1ZxF1j1uyxMA0t3xA,660
|
|
3
3
|
geospacelab/config/__mpl__.py,sha256=bO10-mtYDF1EhnRFuXX4H8TUU3esxOZe-qfTrzRhBk0,4705
|
|
4
4
|
geospacelab/config/_preferences.py,sha256=VKXXWNvFzIMXGmvb7Udd900DoubMlqrcu-gLmzHmzMk,4754
|
|
@@ -331,7 +331,7 @@ geospacelab/toolbox/io/__init__.py,sha256=YcFkmOGWXNiOXWsMFxFPhn32UnbxmeSrluTp6O
|
|
|
331
331
|
geospacelab/toolbox/io/dialog.py,sha256=y87PKCXQS5_axbrNuVrcYN2uIfr-ZHICr7yMQ0yH1M4,1067
|
|
332
332
|
geospacelab/toolbox/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
333
333
|
geospacelab/toolbox/utilities/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
334
|
-
geospacelab/toolbox/utilities/numpyarray.py,sha256=
|
|
334
|
+
geospacelab/toolbox/utilities/numpyarray.py,sha256=u0UfyRRJiKPXO1YIWLeq-szuPY8eXK513wRv8-1l6Bg,12457
|
|
335
335
|
geospacelab/toolbox/utilities/numpymath.py,sha256=xr-u9vsN5UMZ6pjomJ2O3A1n00Eg3yH5fN4lcY7rR_Q,3810
|
|
336
336
|
geospacelab/toolbox/utilities/pybasic.py,sha256=-wLWoQMTroJ49nn8H_-hsFxDSiHXMiea86U6u0W8_cM,3310
|
|
337
337
|
geospacelab/toolbox/utilities/pyclass.py,sha256=DnnzLH1ovlxArtqCpywZUfDoNzYi7HmMW2s17Xd30LI,2813
|
|
@@ -382,7 +382,7 @@ geospacelab/wrapper/geopack/geopack/t89.py,sha256=zDVNPrmtK1NnNHgohQEPqOOJDsm2Z-
|
|
|
382
382
|
geospacelab/wrapper/geopack/geopack/t96.py,sha256=ktcoo1R7Z3NtkWHENuseu48ub4-JfQGqFV0ZOtd0zH8,65292
|
|
383
383
|
geospacelab/wrapper/geopack/geopack/test_geopack1.md,sha256=dMUY0O1BgZsKpmJ6BLSQ80B6p6DZcB7OceFeyPOlFK0,15324
|
|
384
384
|
geospacelab/wrapper/geopack/geopack/test_geopack1.py,sha256=qjLz6O3BAk3H58IpmxXyftwZTkh3vPGp49C-al4hjf0,6669
|
|
385
|
-
geospacelab-0.11.
|
|
385
|
+
geospacelab-0.11.1.dist-info/licenses/LICENSE,sha256=2yRlwLt4o5Z6OZAGcyvBj-zfFX1Uw7E6CzqODg7khqs,1515
|
|
386
386
|
test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
387
387
|
test/test_ampere.py,sha256=0-HZURubpv1mBK3bJ_qTqx39L1jezgRoU5neXMPYgZQ,2968
|
|
388
388
|
test/test_dmsp_s1.py,sha256=5m_7mjdDGja8ovshNPV3LKW_6q6mIwT9XKqoyRiH79A,3588
|
|
@@ -392,7 +392,7 @@ test/test_omni.py,sha256=Zk1LZozPiY5V0aSRmK6GTQuB01hHn_j2j3Brm6Ea_po,1632
|
|
|
392
392
|
test/test_superdarn.py,sha256=uP55muvXryPzNGHinWkiGv2PxvRs4f9M9h1WIBEBW7k,2846
|
|
393
393
|
test/test_swarm.py,sha256=PDDE9nUshhQpXZbV_ZwcsjbMhI73fRaojTZv9rtRzZE,15568
|
|
394
394
|
test/test_swarm_new.py,sha256=mzhMAx-M9W3Ue5noTyfBx4c3Vtc3b_ZUEvGgL9v8UE4,853
|
|
395
|
-
geospacelab-0.11.
|
|
396
|
-
geospacelab-0.11.
|
|
397
|
-
geospacelab-0.11.
|
|
398
|
-
geospacelab-0.11.
|
|
395
|
+
geospacelab-0.11.1.dist-info/METADATA,sha256=YVqScTExFFxfxfJZZ9wIGX7YAphRApV4_jde8tbnGFM,24238
|
|
396
|
+
geospacelab-0.11.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
397
|
+
geospacelab-0.11.1.dist-info/top_level.txt,sha256=98eDwrSNgyQFAtSA06QMP71gw9BzgIj0uvkTudpGly4,12
|
|
398
|
+
geospacelab-0.11.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|