DASPy-toolbox 1.1.3__tar.gz → 1.1.4__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.
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/DASPy_toolbox.egg-info/PKG-INFO +1 -1
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/PKG-INFO +1 -1
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/advanced_tools/channel.py +45 -12
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/dasdatetime.py +0 -2
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/section.py +1 -1
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/setup.py +1 -1
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/DASPy_toolbox.egg-info/SOURCES.txt +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/DASPy_toolbox.egg-info/dependency_links.txt +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/DASPy_toolbox.egg-info/entry_points.txt +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/DASPy_toolbox.egg-info/requires.txt +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/DASPy_toolbox.egg-info/top_level.txt +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/LICENSE +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/README.md +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/__init__.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/advanced_tools/__init__.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/advanced_tools/decomposition.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/advanced_tools/denoising.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/advanced_tools/fdct.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/advanced_tools/strain2vel.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/basic_tools/__init__.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/basic_tools/filter.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/basic_tools/freqattributes.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/basic_tools/preprocessing.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/basic_tools/visualization.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/__init__.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/collection.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/example.pkl +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/read.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/daspy/core/write.py +0 -0
- {daspy_toolbox-1.1.3 → daspy_toolbox-1.1.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DASPy-toolbox
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: DASPy is an open-source project dedicated to provide a python package for DAS (Distributed Acoustic Sensing) data processing, which comprises classic seismic data processing techniques and Specialized algorithms for DAS applications.
|
|
5
5
|
Home-page: https://github.com/HMZ-03/DASPy
|
|
6
6
|
Author: Minzhe Hu, Zefeng Li
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DASPy-toolbox
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.4
|
|
4
4
|
Summary: DASPy is an open-source project dedicated to provide a python package for DAS (Distributed Acoustic Sensing) data processing, which comprises classic seismic data processing techniques and Specialized algorithms for DAS applications.
|
|
5
5
|
Home-page: https://github.com/HMZ-03/DASPy
|
|
6
6
|
Author: Minzhe Hu, Zefeng Li
|
|
@@ -398,29 +398,62 @@ def channel_spacing(geometry, depth_info=False):
|
|
|
398
398
|
return dist
|
|
399
399
|
|
|
400
400
|
|
|
401
|
-
def
|
|
401
|
+
def distance_to_channels(geometry, points):
|
|
402
|
+
"""
|
|
403
|
+
Calculate the distance from a point to each channel.
|
|
404
|
+
|
|
405
|
+
:param geometry: numpy.ndarray. It needs to consist of two columns (
|
|
406
|
+
longitude, latitude), three columns (longitude, latitude and depth).
|
|
407
|
+
:param points: numpy.ndarray. A array consisting of longitude and
|
|
408
|
+
latitude or longitude, latitude and depth.
|
|
409
|
+
:return: numpy.ndarray. The distance from the given point to each channel.
|
|
410
|
+
"""
|
|
411
|
+
if geometry.shape[1] == 3:
|
|
412
|
+
depth_info = True
|
|
413
|
+
else:
|
|
414
|
+
depth_info = False
|
|
415
|
+
|
|
416
|
+
nch = len(geometry)
|
|
417
|
+
points = np.array(points)
|
|
418
|
+
if points.ndim == 1:
|
|
419
|
+
points = points.reshape(1, -1)
|
|
420
|
+
npt = len(points)
|
|
421
|
+
dist = np.zeros((npt, nch))
|
|
422
|
+
for i, pt in enumerate(points):
|
|
423
|
+
for j, geo in enumerate(geometry):
|
|
424
|
+
d = Geodesic.WGS84.Inverse(pt[1], pt[0], geo[1], geo[0])['s12']
|
|
425
|
+
if depth_info:
|
|
426
|
+
dist[i, j] = np.sqrt(d**2 + (pt[2] - geo[2]) ** 2)
|
|
427
|
+
else:
|
|
428
|
+
dist[i, j] = d
|
|
429
|
+
return dist
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
def closest_channel_to_point(geometry, points, verbose=False):
|
|
402
433
|
"""
|
|
403
434
|
Find the channel number closest to a given point.
|
|
404
435
|
|
|
405
436
|
:param geometry: numpy.ndarray. It needs to consist of longitude, latitude
|
|
406
|
-
or channel number, longitude, latitude.
|
|
407
|
-
:param
|
|
437
|
+
(and depth) or channel number, longitude, latitude (and depth).
|
|
438
|
+
:param points: numpy.ndarray. A tuple consisting of longitude and
|
|
439
|
+
latitude (and depth).
|
|
440
|
+
:param verbose: bool. Return the channel and the distance to the closest
|
|
441
|
+
channel if True.
|
|
408
442
|
:return: int. The channel number closest to the given point.
|
|
409
443
|
"""
|
|
410
|
-
|
|
411
|
-
|
|
444
|
+
nch = len(geometry)
|
|
445
|
+
if points.shape[1] == geometry.shape[1]:
|
|
446
|
+
channels = np.arange(nch).astype(int)
|
|
412
447
|
else:
|
|
413
448
|
geometry = geometry[geometry[:, 0].argsort()]
|
|
414
449
|
channels = geometry[:, 0].astype(int)
|
|
415
450
|
geometry = geometry[:, 1:]
|
|
416
451
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
]
|
|
422
|
-
closest_index = np.argmin(distances)
|
|
423
|
-
return int(channels[closest_index])
|
|
452
|
+
dist = distance_to_channels(points, geometry)
|
|
453
|
+
closest_index = np.argmin(dist, axis=1)
|
|
454
|
+
if verbose:
|
|
455
|
+
return channels[closest_index], np.min(dist, axis=1)
|
|
456
|
+
return channels[closest_index]
|
|
424
457
|
|
|
425
458
|
|
|
426
459
|
def equally_spaced_channels(geometry, dx, depth_info=False, verbose=False):
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
setup(
|
|
5
|
-
name='DASPy-toolbox', version='1.1.
|
|
5
|
+
name='DASPy-toolbox', version='1.1.4',
|
|
6
6
|
description=(
|
|
7
7
|
'DASPy is an open-source project dedicated to provide a python package '
|
|
8
8
|
'for DAS (Distributed Acoustic Sensing) data processing, which '
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|