DASPy-toolbox 1.2.3__tar.gz → 1.2.5__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.
Files changed (42) hide show
  1. daspy_toolbox-1.2.5/DASPy_toolbox.egg-info/PKG-INFO +144 -0
  2. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/DASPy_toolbox.egg-info/SOURCES.txt +2 -0
  3. daspy_toolbox-1.2.5/PKG-INFO +144 -0
  4. daspy_toolbox-1.2.5/README.md +100 -0
  5. daspy_toolbox-1.2.5/daspy/__init__.py +13 -0
  6. daspy_toolbox-1.2.5/daspy/advanced_tools/__init__.py +49 -0
  7. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/advanced_tools/channel.py +8 -7
  8. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/advanced_tools/decomposition.py +5 -4
  9. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/advanced_tools/denoising.py +6 -5
  10. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/advanced_tools/fdct.py +7 -7
  11. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/advanced_tools/strain2vel.py +5 -4
  12. daspy_toolbox-1.2.5/daspy/basic_tools/__init__.py +61 -0
  13. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/basic_tools/filter.py +6 -5
  14. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/basic_tools/freqattributes.py +6 -5
  15. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/basic_tools/preprocessing.py +35 -35
  16. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/basic_tools/visualization.py +14 -11
  17. daspy_toolbox-1.2.5/daspy/core/__init__.py +8 -0
  18. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/collection.py +152 -31
  19. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/dasdatetime.py +6 -5
  20. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/read.py +19 -9
  21. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/section.py +67 -11
  22. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/util.py +5 -4
  23. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/write.py +11 -6
  24. daspy_toolbox-1.2.5/daspy/main.py +46 -0
  25. daspy_toolbox-1.2.5/pyproject.toml +3 -0
  26. daspy_toolbox-1.2.5/setup.py +62 -0
  27. daspy_toolbox-1.2.3/DASPy_toolbox.egg-info/PKG-INFO +0 -102
  28. daspy_toolbox-1.2.3/PKG-INFO +0 -102
  29. daspy_toolbox-1.2.3/README.md +0 -65
  30. daspy_toolbox-1.2.3/daspy/__init__.py +0 -4
  31. daspy_toolbox-1.2.3/daspy/advanced_tools/__init__.py +0 -0
  32. daspy_toolbox-1.2.3/daspy/basic_tools/__init__.py +0 -0
  33. daspy_toolbox-1.2.3/daspy/core/__init__.py +0 -4
  34. daspy_toolbox-1.2.3/setup.py +0 -46
  35. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/DASPy_toolbox.egg-info/dependency_links.txt +0 -0
  36. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/DASPy_toolbox.egg-info/entry_points.txt +0 -0
  37. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/DASPy_toolbox.egg-info/requires.txt +0 -0
  38. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/DASPy_toolbox.egg-info/top_level.txt +0 -0
  39. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/LICENSE +0 -0
  40. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/example.pkl +0 -0
  41. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/daspy/core/make_example.py +0 -0
  42. {daspy_toolbox-1.2.3 → daspy_toolbox-1.2.5}/setup.cfg +0 -0
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: DASPy-toolbox
3
+ Version: 1.2.5
4
+ Summary: DASPy is an open-source Python package for Distributed Acoustic Sensing (DAS) data processing.
5
+ Home-page: https://github.com/HMZ-03/DASPy
6
+ Author: Minzhe Hu, Zefeng Li
7
+ Author-email: hmz2018@mail.ustc.edu.cn
8
+ Maintainer: Minzhe Hu
9
+ Maintainer-email: hmz2018@mail.ustc.edu.cn
10
+ License: MIT License
11
+ Project-URL: Documentation (EN), https://daspy-tutorial.readthedocs.io/en/latest/
12
+ Project-URL: Documentation (ZH), https://daspy-tutorial-cn.readthedocs.io/zh-cn/latest/
13
+ Project-URL: Source, https://github.com/HMZ-03/DASPy
14
+ Project-URL: Issue Tracker, https://github.com/HMZ-03/DASPy/issues
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy
22
+ Requires-Dist: scipy>=1.13
23
+ Requires-Dist: matplotlib
24
+ Requires-Dist: geographiclib
25
+ Requires-Dist: pyproj
26
+ Requires-Dist: h5py
27
+ Requires-Dist: segyio
28
+ Requires-Dist: nptdms
29
+ Requires-Dist: tqdm
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: license
37
+ Dynamic: license-file
38
+ Dynamic: maintainer
39
+ Dynamic: maintainer-email
40
+ Dynamic: project-url
41
+ Dynamic: requires-dist
42
+ Dynamic: requires-python
43
+ Dynamic: summary
44
+
45
+ <img src="https://raw.githubusercontent.com/HMZ-03/DASPy/main/website/logo.png" height="200" />
46
+
47
+ [![Supported Python versions](https://img.shields.io/badge/python-3.9%20and%20up-blue)](https://pypi.org/project/DASPy-toolbox/)
48
+ [![License](https://img.shields.io/pypi/l/daspy-toolbox.svg)](https://opensource.org/license/mit)
49
+ [![PyPI Version](https://img.shields.io/pypi/v/daspy-toolbox.svg)](https://pypi.org/project/DASPy-toolbox/)
50
+ [![DOI](https://img.shields.io/badge/DOI-10.1785/0220240124-blue.svg)](https://doi.org/10.1785/0220240124)
51
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/daspy-toolbox.svg?label=pypi)](https://pypi.org/project/DASPy-toolbox/)
52
+ [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/daspy-toolbox?label=conda)](https://anaconda.org/conda-forge/daspy-toolbox)
53
+
54
+ # DASPy
55
+
56
+ DASPy is an open-source Python package for **Distributed Acoustic Sensing (DAS)**
57
+ data processing.
58
+
59
+ The project aims to lower the barrier for DAS processing and to provide a
60
+ practical toolkit for DAS seismology workflows.
61
+
62
+ ## Features
63
+
64
+ DASPy includes:
65
+
66
+ - **Classic seismic processing**: preprocessing, filtering, spectral analysis,
67
+ and visualization.
68
+ - **DAS-oriented algorithms**: denoising, wavefield decomposition, channel
69
+ analysis, and strain-velocity conversion.
70
+ - **Convenient data structures**: `Section`, `Collection`, and `DASDateTime`
71
+ for waveform, continuous acquisition, and time handling workflows.
72
+
73
+ ## Documentation
74
+
75
+ - English tutorial: <https://daspy-tutorial.readthedocs.io/en/latest/>
76
+ - 中文教程: <https://daspy-tutorial-cn.readthedocs.io/zh-cn/latest/>
77
+ - Example notebook: [`document/example.ipynb`](document/example.ipynb)
78
+
79
+ ## Installation
80
+
81
+ DASPy supports **Python 3.9+** on Linux, macOS, and Windows.
82
+
83
+ ### pip
84
+
85
+ Install from PyPI:
86
+
87
+ ```bash
88
+ pip install daspy-toolbox
89
+ ```
90
+
91
+ Install the latest development version:
92
+
93
+ ```bash
94
+ pip install git+https://github.com/HMZ-03/DASPy.git
95
+ ```
96
+
97
+ ### conda
98
+
99
+ ```bash
100
+ conda install conda-forge::daspy-toolbox
101
+ ```
102
+
103
+ If you are using Python 3.13 or later, installation through conda may fail
104
+ because `segyio` is not yet available for all conda-forge builds. In that case,
105
+ use `pip` or Python 3.12 and earlier.
106
+
107
+ ### Manual installation
108
+
109
+ 1. Install dependencies: `numpy`, `scipy>=1.13`, `matplotlib`,
110
+ `geographiclib`, `pyproj`, `h5py`, `segyio`, `nptdms`, `tqdm`.
111
+ 2. Add DASPy to your Python path, or install it in editable mode:
112
+
113
+ ```bash
114
+ git clone https://github.com/HMZ-03/DASPy.git
115
+ cd DASPy
116
+ pip install -e .
117
+ ```
118
+
119
+ ## Quick start
120
+
121
+ ```python
122
+ from daspy import read
123
+
124
+ sec = read() # load the built-in example waveform
125
+ sec.bandpass(1, 15)
126
+ sec.plot()
127
+ ```
128
+
129
+ <img src="./website/waveform.png" height="500" />
130
+
131
+ ## Contributing
132
+
133
+ Contributions are welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md).
134
+
135
+ ## Reference
136
+
137
+ - Minzhe Hu and Zefeng Li (2024),
138
+ [DASPy: A Python Toolbox for DAS Seismology](https://pubs.geoscienceworld.org/ssa/srl/article/95/5/3055/645865/DASPy-A-Python-Toolbox-for-DAS-Seismology),
139
+ *Seismological Research Letters*, 95(5), 3055–3066,
140
+ doi: `https://doi.org/10.1785/0220240124`.
141
+
142
+ ## Contact
143
+
144
+ If you have questions, please contact <hmz2018@mail.ustc.edu.cn>.
@@ -1,5 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
+ pyproject.toml
3
4
  setup.py
4
5
  DASPy_toolbox.egg-info/PKG-INFO
5
6
  DASPy_toolbox.egg-info/SOURCES.txt
@@ -8,6 +9,7 @@ DASPy_toolbox.egg-info/entry_points.txt
8
9
  DASPy_toolbox.egg-info/requires.txt
9
10
  DASPy_toolbox.egg-info/top_level.txt
10
11
  daspy/__init__.py
12
+ daspy/main.py
11
13
  daspy/advanced_tools/__init__.py
12
14
  daspy/advanced_tools/channel.py
13
15
  daspy/advanced_tools/decomposition.py
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: DASPy-toolbox
3
+ Version: 1.2.5
4
+ Summary: DASPy is an open-source Python package for Distributed Acoustic Sensing (DAS) data processing.
5
+ Home-page: https://github.com/HMZ-03/DASPy
6
+ Author: Minzhe Hu, Zefeng Li
7
+ Author-email: hmz2018@mail.ustc.edu.cn
8
+ Maintainer: Minzhe Hu
9
+ Maintainer-email: hmz2018@mail.ustc.edu.cn
10
+ License: MIT License
11
+ Project-URL: Documentation (EN), https://daspy-tutorial.readthedocs.io/en/latest/
12
+ Project-URL: Documentation (ZH), https://daspy-tutorial-cn.readthedocs.io/zh-cn/latest/
13
+ Project-URL: Source, https://github.com/HMZ-03/DASPy
14
+ Project-URL: Issue Tracker, https://github.com/HMZ-03/DASPy/issues
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy
22
+ Requires-Dist: scipy>=1.13
23
+ Requires-Dist: matplotlib
24
+ Requires-Dist: geographiclib
25
+ Requires-Dist: pyproj
26
+ Requires-Dist: h5py
27
+ Requires-Dist: segyio
28
+ Requires-Dist: nptdms
29
+ Requires-Dist: tqdm
30
+ Dynamic: author
31
+ Dynamic: author-email
32
+ Dynamic: classifier
33
+ Dynamic: description
34
+ Dynamic: description-content-type
35
+ Dynamic: home-page
36
+ Dynamic: license
37
+ Dynamic: license-file
38
+ Dynamic: maintainer
39
+ Dynamic: maintainer-email
40
+ Dynamic: project-url
41
+ Dynamic: requires-dist
42
+ Dynamic: requires-python
43
+ Dynamic: summary
44
+
45
+ <img src="https://raw.githubusercontent.com/HMZ-03/DASPy/main/website/logo.png" height="200" />
46
+
47
+ [![Supported Python versions](https://img.shields.io/badge/python-3.9%20and%20up-blue)](https://pypi.org/project/DASPy-toolbox/)
48
+ [![License](https://img.shields.io/pypi/l/daspy-toolbox.svg)](https://opensource.org/license/mit)
49
+ [![PyPI Version](https://img.shields.io/pypi/v/daspy-toolbox.svg)](https://pypi.org/project/DASPy-toolbox/)
50
+ [![DOI](https://img.shields.io/badge/DOI-10.1785/0220240124-blue.svg)](https://doi.org/10.1785/0220240124)
51
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/daspy-toolbox.svg?label=pypi)](https://pypi.org/project/DASPy-toolbox/)
52
+ [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/daspy-toolbox?label=conda)](https://anaconda.org/conda-forge/daspy-toolbox)
53
+
54
+ # DASPy
55
+
56
+ DASPy is an open-source Python package for **Distributed Acoustic Sensing (DAS)**
57
+ data processing.
58
+
59
+ The project aims to lower the barrier for DAS processing and to provide a
60
+ practical toolkit for DAS seismology workflows.
61
+
62
+ ## Features
63
+
64
+ DASPy includes:
65
+
66
+ - **Classic seismic processing**: preprocessing, filtering, spectral analysis,
67
+ and visualization.
68
+ - **DAS-oriented algorithms**: denoising, wavefield decomposition, channel
69
+ analysis, and strain-velocity conversion.
70
+ - **Convenient data structures**: `Section`, `Collection`, and `DASDateTime`
71
+ for waveform, continuous acquisition, and time handling workflows.
72
+
73
+ ## Documentation
74
+
75
+ - English tutorial: <https://daspy-tutorial.readthedocs.io/en/latest/>
76
+ - 中文教程: <https://daspy-tutorial-cn.readthedocs.io/zh-cn/latest/>
77
+ - Example notebook: [`document/example.ipynb`](document/example.ipynb)
78
+
79
+ ## Installation
80
+
81
+ DASPy supports **Python 3.9+** on Linux, macOS, and Windows.
82
+
83
+ ### pip
84
+
85
+ Install from PyPI:
86
+
87
+ ```bash
88
+ pip install daspy-toolbox
89
+ ```
90
+
91
+ Install the latest development version:
92
+
93
+ ```bash
94
+ pip install git+https://github.com/HMZ-03/DASPy.git
95
+ ```
96
+
97
+ ### conda
98
+
99
+ ```bash
100
+ conda install conda-forge::daspy-toolbox
101
+ ```
102
+
103
+ If you are using Python 3.13 or later, installation through conda may fail
104
+ because `segyio` is not yet available for all conda-forge builds. In that case,
105
+ use `pip` or Python 3.12 and earlier.
106
+
107
+ ### Manual installation
108
+
109
+ 1. Install dependencies: `numpy`, `scipy>=1.13`, `matplotlib`,
110
+ `geographiclib`, `pyproj`, `h5py`, `segyio`, `nptdms`, `tqdm`.
111
+ 2. Add DASPy to your Python path, or install it in editable mode:
112
+
113
+ ```bash
114
+ git clone https://github.com/HMZ-03/DASPy.git
115
+ cd DASPy
116
+ pip install -e .
117
+ ```
118
+
119
+ ## Quick start
120
+
121
+ ```python
122
+ from daspy import read
123
+
124
+ sec = read() # load the built-in example waveform
125
+ sec.bandpass(1, 15)
126
+ sec.plot()
127
+ ```
128
+
129
+ <img src="./website/waveform.png" height="500" />
130
+
131
+ ## Contributing
132
+
133
+ Contributions are welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md).
134
+
135
+ ## Reference
136
+
137
+ - Minzhe Hu and Zefeng Li (2024),
138
+ [DASPy: A Python Toolbox for DAS Seismology](https://pubs.geoscienceworld.org/ssa/srl/article/95/5/3055/645865/DASPy-A-Python-Toolbox-for-DAS-Seismology),
139
+ *Seismological Research Letters*, 95(5), 3055–3066,
140
+ doi: `https://doi.org/10.1785/0220240124`.
141
+
142
+ ## Contact
143
+
144
+ If you have questions, please contact <hmz2018@mail.ustc.edu.cn>.
@@ -0,0 +1,100 @@
1
+ <img src="https://raw.githubusercontent.com/HMZ-03/DASPy/main/website/logo.png" height="200" />
2
+
3
+ [![Supported Python versions](https://img.shields.io/badge/python-3.9%20and%20up-blue)](https://pypi.org/project/DASPy-toolbox/)
4
+ [![License](https://img.shields.io/pypi/l/daspy-toolbox.svg)](https://opensource.org/license/mit)
5
+ [![PyPI Version](https://img.shields.io/pypi/v/daspy-toolbox.svg)](https://pypi.org/project/DASPy-toolbox/)
6
+ [![DOI](https://img.shields.io/badge/DOI-10.1785/0220240124-blue.svg)](https://doi.org/10.1785/0220240124)
7
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/daspy-toolbox.svg?label=pypi)](https://pypi.org/project/DASPy-toolbox/)
8
+ [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/daspy-toolbox?label=conda)](https://anaconda.org/conda-forge/daspy-toolbox)
9
+
10
+ # DASPy
11
+
12
+ DASPy is an open-source Python package for **Distributed Acoustic Sensing (DAS)**
13
+ data processing.
14
+
15
+ The project aims to lower the barrier for DAS processing and to provide a
16
+ practical toolkit for DAS seismology workflows.
17
+
18
+ ## Features
19
+
20
+ DASPy includes:
21
+
22
+ - **Classic seismic processing**: preprocessing, filtering, spectral analysis,
23
+ and visualization.
24
+ - **DAS-oriented algorithms**: denoising, wavefield decomposition, channel
25
+ analysis, and strain-velocity conversion.
26
+ - **Convenient data structures**: `Section`, `Collection`, and `DASDateTime`
27
+ for waveform, continuous acquisition, and time handling workflows.
28
+
29
+ ## Documentation
30
+
31
+ - English tutorial: <https://daspy-tutorial.readthedocs.io/en/latest/>
32
+ - 中文教程: <https://daspy-tutorial-cn.readthedocs.io/zh-cn/latest/>
33
+ - Example notebook: [`document/example.ipynb`](document/example.ipynb)
34
+
35
+ ## Installation
36
+
37
+ DASPy supports **Python 3.9+** on Linux, macOS, and Windows.
38
+
39
+ ### pip
40
+
41
+ Install from PyPI:
42
+
43
+ ```bash
44
+ pip install daspy-toolbox
45
+ ```
46
+
47
+ Install the latest development version:
48
+
49
+ ```bash
50
+ pip install git+https://github.com/HMZ-03/DASPy.git
51
+ ```
52
+
53
+ ### conda
54
+
55
+ ```bash
56
+ conda install conda-forge::daspy-toolbox
57
+ ```
58
+
59
+ If you are using Python 3.13 or later, installation through conda may fail
60
+ because `segyio` is not yet available for all conda-forge builds. In that case,
61
+ use `pip` or Python 3.12 and earlier.
62
+
63
+ ### Manual installation
64
+
65
+ 1. Install dependencies: `numpy`, `scipy>=1.13`, `matplotlib`,
66
+ `geographiclib`, `pyproj`, `h5py`, `segyio`, `nptdms`, `tqdm`.
67
+ 2. Add DASPy to your Python path, or install it in editable mode:
68
+
69
+ ```bash
70
+ git clone https://github.com/HMZ-03/DASPy.git
71
+ cd DASPy
72
+ pip install -e .
73
+ ```
74
+
75
+ ## Quick start
76
+
77
+ ```python
78
+ from daspy import read
79
+
80
+ sec = read() # load the built-in example waveform
81
+ sec.bandpass(1, 15)
82
+ sec.plot()
83
+ ```
84
+
85
+ <img src="./website/waveform.png" height="500" />
86
+
87
+ ## Contributing
88
+
89
+ Contributions are welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md).
90
+
91
+ ## Reference
92
+
93
+ - Minzhe Hu and Zefeng Li (2024),
94
+ [DASPy: A Python Toolbox for DAS Seismology](https://pubs.geoscienceworld.org/ssa/srl/article/95/5/3055/645865/DASPy-A-Python-Toolbox-for-DAS-Seismology),
95
+ *Seismological Research Letters*, 95(5), 3055–3066,
96
+ doi: `https://doi.org/10.1785/0220240124`.
97
+
98
+ ## Contact
99
+
100
+ If you have questions, please contact <hmz2018@mail.ustc.edu.cn>.
@@ -0,0 +1,13 @@
1
+ """Top-level public API for DASPy.
2
+
3
+ DASPy focuses on Distributed Acoustic Sensing (DAS) waveform processing while
4
+ keeping a lightweight user-facing API for common workflows.
5
+ """
6
+
7
+ from daspy.core.collection import Collection
8
+ from daspy.core.dasdatetime import DASDateTime, local_tz, utc
9
+ from daspy.core.read import read
10
+ from daspy.core.section import Section
11
+
12
+ __all__ = ["Section", "Collection", "read", "DASDateTime", "local_tz", "utc"]
13
+ __version__ = "1.2.5"
@@ -0,0 +1,49 @@
1
+ """Advanced algorithms for denoising, decomposition, and DAS conversion."""
2
+
3
+ from daspy.advanced_tools.channel import (
4
+ channel_checking,
5
+ channel_spacing,
6
+ closest_channel_to_point,
7
+ distance_to_channels,
8
+ equally_spaced_channels,
9
+ location_interpolation,
10
+ robust_polyfit,
11
+ turning_points,
12
+ )
13
+ from daspy.advanced_tools.decomposition import curvelet_windowing, fk_fan_mask, fk_filter
14
+ from daspy.advanced_tools.denoising import (
15
+ common_mode_noise_removal,
16
+ curvelet_denoising,
17
+ spike_removal,
18
+ )
19
+ from daspy.advanced_tools.fdct import fdct_wrapping, fdct_wrapping_window, ifdct_wrapping
20
+ from daspy.advanced_tools.strain2vel import (
21
+ curvelet_conversion,
22
+ fk_rescaling,
23
+ slant_stacking,
24
+ slowness,
25
+ )
26
+
27
+ __all__ = [
28
+ "robust_polyfit",
29
+ "channel_checking",
30
+ "location_interpolation",
31
+ "turning_points",
32
+ "channel_spacing",
33
+ "distance_to_channels",
34
+ "closest_channel_to_point",
35
+ "equally_spaced_channels",
36
+ "fk_fan_mask",
37
+ "fk_filter",
38
+ "curvelet_windowing",
39
+ "spike_removal",
40
+ "common_mode_noise_removal",
41
+ "curvelet_denoising",
42
+ "fdct_wrapping_window",
43
+ "fdct_wrapping",
44
+ "ifdct_wrapping",
45
+ "fk_rescaling",
46
+ "curvelet_conversion",
47
+ "slowness",
48
+ "slant_stacking",
49
+ ]
@@ -1,7 +1,8 @@
1
- # Purpose: Several functions for analysis data quality and geometry of channels
2
- # Author: Minzhe Hu, Zefeng Li
3
- # Date: 2025.3.31
4
- # Email: hmz2018@mail.ustc.edu.cn
1
+ """Several functions for analysis data quality and geometry of channels.
2
+ Author: Minzhe Hu, Zefeng Li
3
+ Date: 2025.3.31
4
+ Email: hmz2018@mail.ustc.edu.cn"""
5
+
5
6
  import numpy as np
6
7
  from copy import deepcopy
7
8
  from geographiclib.geodesic import Geodesic
@@ -118,8 +119,8 @@ def _channel_location(track_pt):
118
119
  interp_ch = []
119
120
  chn = np.floor(tn[idx_kp[0]]).astype(int)
120
121
  interp_ch.append([*track[idx_kp[0]], chn])
121
- if abs(chn - tn[idx_kp[0]]) > 1e-6:
122
- chn += 1
122
+ # if abs(chn - tn[idx_kp[0]]) > 1e-6:
123
+ # chn += 1
123
124
 
124
125
  seg_interval = []
125
126
  for i in range(1, len(idx_kp)):
@@ -511,4 +512,4 @@ def equally_spaced_channels(geometry, dx, depth_info=False, verbose=False):
511
512
  _equally_spacing(dist[s:e], dx)])
512
513
  idx_equal.append(e)
513
514
 
514
- return channels[idx_equal]
515
+ return channels[idx_equal]
@@ -1,7 +1,8 @@
1
- # Purpose: Waveform decomposition
2
- # Author: Minzhe Hu
3
- # Date: 2024.5.13
4
- # Email: hmz2018@mail.ustc.edu.cn
1
+ """Waveform decomposition.
2
+ Author: Minzhe Hu
3
+ Date: 2024.5.13
4
+ Email: hmz2018@mail.ustc.edu.cn"""
5
+
5
6
  import numpy as np
6
7
  from numpy.fft import irfft2, ifftshift
7
8
  from daspy.basic_tools.preprocessing import padding, cosine_taper
@@ -1,7 +1,8 @@
1
- # Purpose: Remove noise from data
2
- # Author: Minzhe Hu, Zefeng Li
3
- # Date: 2025.9.18
4
- # Email: hmz2018@mail.ustc.edu.cn
1
+ """Remove noise from data.
2
+ Author: Minzhe Hu, Zefeng Li
3
+ Date: 2025.9.18
4
+ Email: hmz2018@mail.ustc.edu.cn"""
5
+
5
6
  import numpy as np
6
7
  from copy import deepcopy
7
8
  from scipy.ndimage import median_filter
@@ -273,4 +274,4 @@ def curvelet_denoising(data, choice=0, pad=0.3, noise=None, noise_perc=95,
273
274
  dn, reverse=True)
274
275
  return data_dn, data_n
275
276
  else:
276
- return data_dn
277
+ return data_dn
@@ -1,10 +1,10 @@
1
- # Purpose: Fast Discrete Curvelet Transform
2
- # Author: Minzhe Hu
3
- # Date: 2024.4.11
4
- # Email: hmz2018@mail.ustc.edu.cn
5
- # Modified from
6
- # http://www.curvelet.org/download-secure.php?file=CurveLab-2.1.3.tar.gz
7
- # (matlab version)
1
+ """Fast Discrete Curvelet Transform.
2
+ Author: Minzhe Hu
3
+ Date: 2024.4.11
4
+ Email: hmz2018@mail.ustc.edu.cn
5
+ Modified from
6
+ http://www.curvelet.org/download-secure.php?file=CurveLab-2.1.3.tar.gz"""
7
+
8
8
  import numpy as np
9
9
  from numpy.fft import fftshift, ifftshift, fft2, ifft2
10
10
 
@@ -1,7 +1,8 @@
1
- # Purpose: Convert strain rate data to velocity
2
- # Author: Minzhe Hu
3
- # Date: 2024.3.10
4
- # Email: hmz2018@mail.ustc.edu.cn
1
+ """Convert strain rate data to velocity.
2
+ Author: Minzhe Hu
3
+ Date: 2024.3.10
4
+ Email: hmz2018@mail.ustc.edu.cn"""
5
+
5
6
  import numpy as np
6
7
  from numpy.fft import irfft2, ifftshift
7
8
  from scipy.signal import hilbert
@@ -0,0 +1,61 @@
1
+ """Basic processing functions used by :class:`daspy.core.section.Section`."""
2
+
3
+ from daspy.basic_tools.filter import (
4
+ bandpass,
5
+ bandstop,
6
+ envelope,
7
+ highpass,
8
+ lowpass,
9
+ lowpass_cheby_2,
10
+ )
11
+ from daspy.basic_tools.freqattributes import (
12
+ fk_transform,
13
+ next_pow_2,
14
+ power,
15
+ psd,
16
+ spectrogram,
17
+ spectrum,
18
+ )
19
+ from daspy.basic_tools.preprocessing import (
20
+ cosine_taper,
21
+ demeaning,
22
+ detrending,
23
+ distance_integration,
24
+ downsampling,
25
+ normalization,
26
+ padding,
27
+ phase2strain,
28
+ stacking,
29
+ time_differential,
30
+ time_integration,
31
+ trimming,
32
+ )
33
+ from daspy.basic_tools.visualization import plot
34
+
35
+ __all__ = [
36
+ "phase2strain",
37
+ "normalization",
38
+ "demeaning",
39
+ "detrending",
40
+ "stacking",
41
+ "cosine_taper",
42
+ "downsampling",
43
+ "trimming",
44
+ "padding",
45
+ "time_integration",
46
+ "time_differential",
47
+ "distance_integration",
48
+ "bandpass",
49
+ "bandstop",
50
+ "lowpass",
51
+ "lowpass_cheby_2",
52
+ "highpass",
53
+ "envelope",
54
+ "next_pow_2",
55
+ "spectrum",
56
+ "psd",
57
+ "spectrogram",
58
+ "fk_transform",
59
+ "power",
60
+ "plot",
61
+ ]
@@ -1,8 +1,9 @@
1
- # Purpose: Filter the waveform
2
- # Author: Minzhe Hu
3
- # Date: 2024.10.16
4
- # Email: hmz2018@mail.ustc.edu.cn
5
- # Modified from https://docs.obspy.org/_modules/obspy/signal/filter.html
1
+ """Filter the waveform.
2
+ Author: Minzhe Hu
3
+ Date: 2024.10.16
4
+ Email: hmz2018@mail.ustc.edu.cn
5
+ Modified from https://docs.obspy.org/_modules/obspy/signal/filter.html"""
6
+
6
7
  import warnings
7
8
  import numpy as np
8
9
  from scipy.signal import cheb2ord, cheby2, hilbert, iirfilter, zpk2sos, sosfilt
@@ -1,7 +1,8 @@
1
- # Purpose: Analyze frequency attribute and transform in frequency domain
2
- # Author: Minzhe Hu
3
- # Date: 2025.11.12
4
- # Email: hmz2018@mail.ustc.edu.cn
1
+ """Analyze frequency attribute and transform in frequency domain.
2
+ Author: Minzhe Hu
3
+ Date: 2025.11.12
4
+ Email: hmz2018@mail.ustc.edu.cn"""
5
+
5
6
  import numpy as np
6
7
  from numpy.fft import rfft, rfft2, fftshift, fftfreq, rfftfreq
7
8
  from scipy.signal import stft, welch
@@ -156,4 +157,4 @@ def power(data):
156
157
  :param data: numpy.ndarray. Data to calculate the power.
157
158
  :return: numpy.ndarray. Power of each channel.
158
159
  """
159
- return np.sqrt(np.mean(data ** 2, axis=-1))
160
+ return np.sqrt(np.mean(data ** 2, axis=-1))