qseek 0.1.0__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 (116) hide show
  1. qseek-0.1.0/.github/workflows/build.yaml +78 -0
  2. qseek-0.1.0/.github/workflows/docs.yaml +26 -0
  3. qseek-0.1.0/.github/workflows/tests.yaml +59 -0
  4. qseek-0.1.0/.gitignore +166 -0
  5. qseek-0.1.0/.pre-commit-config.yaml +22 -0
  6. qseek-0.1.0/LICENSE +674 -0
  7. qseek-0.1.0/PKG-INFO +147 -0
  8. qseek-0.1.0/README.md +94 -0
  9. qseek-0.1.0/docs/benchmark.md +51 -0
  10. qseek-0.1.0/docs/components/configuration.md +130 -0
  11. qseek-0.1.0/docs/components/feature_extraction.md +0 -0
  12. qseek-0.1.0/docs/components/general.md +37 -0
  13. qseek-0.1.0/docs/components/image_function.md +17 -0
  14. qseek-0.1.0/docs/components/octree.md +16 -0
  15. qseek-0.1.0/docs/components/ray_tracer.md +59 -0
  16. qseek-0.1.0/docs/components/station_corrections.md +27 -0
  17. qseek-0.1.0/docs/components/station_metadata.md +17 -0
  18. qseek-0.1.0/docs/components/waveform_data.md +12 -0
  19. qseek-0.1.0/docs/getting_started.md +49 -0
  20. qseek-0.1.0/docs/images/FORGE-velocity-model.webp +0 -0
  21. qseek-0.1.0/docs/images/delay-volume.webp +0 -0
  22. qseek-0.1.0/docs/images/fmm-concept.webp +0 -0
  23. qseek-0.1.0/docs/images/logo.webp +0 -0
  24. qseek-0.1.0/docs/images/octree-concept.webp +0 -0
  25. qseek-0.1.0/docs/images/qgis-loaded.webp +0 -0
  26. qseek-0.1.0/docs/images/reykjanes-demo.webp +0 -0
  27. qseek-0.1.0/docs/images/squirrel-reykjanes.webp +0 -0
  28. qseek-0.1.0/docs/images/station-delay-times.webp +0 -0
  29. qseek-0.1.0/docs/index.md +39 -0
  30. qseek-0.1.0/docs/theme/announce.html +1 -0
  31. qseek-0.1.0/docs/theme/main.html +6 -0
  32. qseek-0.1.0/docs/visualizing_results.md +15 -0
  33. qseek-0.1.0/mkdocs.yml +109 -0
  34. qseek-0.1.0/pyproject.toml +132 -0
  35. qseek-0.1.0/setup.cfg +4 -0
  36. qseek-0.1.0/setup.py +15 -0
  37. qseek-0.1.0/src/qseek/__init__.py +0 -0
  38. qseek-0.1.0/src/qseek/apps/__init__.py +0 -0
  39. qseek-0.1.0/src/qseek/apps/qseek.py +476 -0
  40. qseek-0.1.0/src/qseek/console.py +3 -0
  41. qseek-0.1.0/src/qseek/corrections/__init__.py +0 -0
  42. qseek-0.1.0/src/qseek/corrections/base.py +88 -0
  43. qseek-0.1.0/src/qseek/corrections/corrections.py +15 -0
  44. qseek-0.1.0/src/qseek/corrections/simple.py +38 -0
  45. qseek-0.1.0/src/qseek/distance_weights.py +141 -0
  46. qseek-0.1.0/src/qseek/exporters/__init__.py +2 -0
  47. qseek-0.1.0/src/qseek/exporters/base.py +19 -0
  48. qseek-0.1.0/src/qseek/exporters/simple.py +99 -0
  49. qseek-0.1.0/src/qseek/exporters/velest.py +295 -0
  50. qseek-0.1.0/src/qseek/ext/array_tools.c +169 -0
  51. qseek-0.1.0/src/qseek/ext/array_tools.pyi +27 -0
  52. qseek-0.1.0/src/qseek/features/__init__.py +28 -0
  53. qseek-0.1.0/src/qseek/features/base.py +56 -0
  54. qseek-0.1.0/src/qseek/features/ground_motion.py +97 -0
  55. qseek-0.1.0/src/qseek/images/__init__.py +0 -0
  56. qseek-0.1.0/src/qseek/images/base.py +201 -0
  57. qseek-0.1.0/src/qseek/images/images.py +226 -0
  58. qseek-0.1.0/src/qseek/images/seisbench.py +342 -0
  59. qseek-0.1.0/src/qseek/magnitudes/__init__.py +20 -0
  60. qseek-0.1.0/src/qseek/magnitudes/base.py +199 -0
  61. qseek-0.1.0/src/qseek/magnitudes/local_magnitude.py +239 -0
  62. qseek-0.1.0/src/qseek/magnitudes/local_magnitude_model.py +411 -0
  63. qseek-0.1.0/src/qseek/magnitudes/moment_magnitude.py +376 -0
  64. qseek-0.1.0/src/qseek/magnitudes/moment_magnitude_store.py +1223 -0
  65. qseek-0.1.0/src/qseek/models/__init__.py +2 -0
  66. qseek-0.1.0/src/qseek/models/catalog.py +397 -0
  67. qseek-0.1.0/src/qseek/models/detection.py +972 -0
  68. qseek-0.1.0/src/qseek/models/detection_uncertainty.py +82 -0
  69. qseek-0.1.0/src/qseek/models/location.py +280 -0
  70. qseek-0.1.0/src/qseek/models/semblance.py +391 -0
  71. qseek-0.1.0/src/qseek/models/station.py +317 -0
  72. qseek-0.1.0/src/qseek/octree.py +808 -0
  73. qseek-0.1.0/src/qseek/plot/__init__.py +0 -0
  74. qseek-0.1.0/src/qseek/plot/base.py +77 -0
  75. qseek-0.1.0/src/qseek/plot/catalog.py +131 -0
  76. qseek-0.1.0/src/qseek/plot/manager.py +27 -0
  77. qseek-0.1.0/src/qseek/plot/octree.py +162 -0
  78. qseek-0.1.0/src/qseek/plot/utils.py +40 -0
  79. qseek-0.1.0/src/qseek/pre_processing/__init__.py +0 -0
  80. qseek-0.1.0/src/qseek/pre_processing/base.py +80 -0
  81. qseek-0.1.0/src/qseek/pre_processing/deep_denoiser.py +73 -0
  82. qseek-0.1.0/src/qseek/pre_processing/downsample.py +96 -0
  83. qseek-0.1.0/src/qseek/pre_processing/frequency_filters.py +193 -0
  84. qseek-0.1.0/src/qseek/pre_processing/module.py +128 -0
  85. qseek-0.1.0/src/qseek/py.typed +0 -0
  86. qseek-0.1.0/src/qseek/search.py +1055 -0
  87. qseek-0.1.0/src/qseek/server.py +150 -0
  88. qseek-0.1.0/src/qseek/signals.py +32 -0
  89. qseek-0.1.0/src/qseek/stats.py +89 -0
  90. qseek-0.1.0/src/qseek/test.py +7 -0
  91. qseek-0.1.0/src/qseek/testing.py +165 -0
  92. qseek-0.1.0/src/qseek/tracers/__init__.py +0 -0
  93. qseek-0.1.0/src/qseek/tracers/base.py +91 -0
  94. qseek-0.1.0/src/qseek/tracers/cake.py +699 -0
  95. qseek-0.1.0/src/qseek/tracers/constant_velocity.py +82 -0
  96. qseek-0.1.0/src/qseek/tracers/tracers.py +80 -0
  97. qseek-0.1.0/src/qseek/utils.py +681 -0
  98. qseek-0.1.0/src/qseek/waveforms/__init__.py +0 -0
  99. qseek-0.1.0/src/qseek/waveforms/base.py +117 -0
  100. qseek-0.1.0/src/qseek/waveforms/providers.py +11 -0
  101. qseek-0.1.0/src/qseek/waveforms/squirrel.py +344 -0
  102. qseek-0.1.0/src/qseek.egg-info/PKG-INFO +147 -0
  103. qseek-0.1.0/src/qseek.egg-info/SOURCES.txt +114 -0
  104. qseek-0.1.0/src/qseek.egg-info/dependency_links.txt +1 -0
  105. qseek-0.1.0/src/qseek.egg-info/entry_points.txt +2 -0
  106. qseek-0.1.0/src/qseek.egg-info/requires.txt +31 -0
  107. qseek-0.1.0/src/qseek.egg-info/top_level.txt +1 -0
  108. qseek-0.1.0/test/conftest.py +1 -0
  109. qseek-0.1.0/test/test_array_tools.py +29 -0
  110. qseek-0.1.0/test/test_cake.py +145 -0
  111. qseek-0.1.0/test/test_location.py +128 -0
  112. qseek-0.1.0/test/test_moment_magnitude_store.py +194 -0
  113. qseek-0.1.0/test/test_octree.py +43 -0
  114. qseek-0.1.0/test/test_search.py +20 -0
  115. qseek-0.1.0/test/test_utils.py +72 -0
  116. qseek-0.1.0/test/upload_data.sh +3 -0
@@ -0,0 +1,78 @@
1
+ name: Deploy
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "*"
9
+
10
+ workflow_run:
11
+ workflows:
12
+ - Pre-commit and Tests
13
+ types:
14
+ - completed
15
+
16
+ jobs:
17
+ build_wheels:
18
+ name: Build wheels on ${{ matrix.os }}
19
+
20
+ runs-on: ${{ matrix.os }}
21
+ strategy:
22
+ matrix:
23
+ os: [ubuntu-20.04]
24
+
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+
28
+ - name: Build wheels
29
+ uses: pypa/cibuildwheel@v2.22.0
30
+ env:
31
+ CIBW_SKIP: "cp311-* cp312-*"
32
+ CIBW_BUILD: "cp310-manylinux_x86_64"
33
+ with:
34
+ config-file: "{package}/pyproject.toml"
35
+
36
+ - uses: actions/upload-artifact@v4
37
+ with:
38
+ name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
39
+ path: ./wheelhouse/*.whl
40
+
41
+ make_sdist:
42
+ name: Make SDist
43
+ runs-on: ubuntu-latest
44
+ needs: build_wheels
45
+ steps:
46
+ - uses: actions/checkout@v4
47
+ with:
48
+ fetch-depth: 0 # Optional, use if you use setuptools_scm
49
+ submodules: false # Optional, use if you have submodules
50
+
51
+ - name: Build SDist
52
+ run: pipx run build --sdist
53
+
54
+ - uses: actions/upload-artifact@v4
55
+ with:
56
+ name: cibw-sdist
57
+ path: dist/*.tar.gz
58
+
59
+ pypi-publish:
60
+ name: Upload release to PyPI
61
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
62
+ needs: [build_wheels, make_sdist]
63
+ runs-on: ubuntu-latest
64
+ environment:
65
+ name: pypi
66
+ url: https://pypi.org/p/qseek
67
+ permissions:
68
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
69
+ steps:
70
+ - name: Download all the wheels and sdists
71
+ uses: actions/download-artifact@v4
72
+ with:
73
+ pattern: cibw-*
74
+ path: dist
75
+ merge-multiple: true
76
+ verbose: true
77
+ - name: Publish package distributions to PyPI
78
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,26 @@
1
+ name: Deploy Docs
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*"
7
+
8
+ permissions:
9
+ contents: write
10
+ jobs:
11
+ deploy-docs:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v4
16
+ with:
17
+ python-version: 3.11
18
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
19
+ - uses: actions/cache@v3
20
+ with:
21
+ key: mkdocs-material-${{ env.cache_id }}
22
+ path: .cache
23
+ restore-keys: |
24
+ mkdocs-material-
25
+ - run: pip install .[docs]
26
+ - run: mkdocs gh-deploy --force
@@ -0,0 +1,59 @@
1
+ name: Pre-commit and Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+ tags:
9
+ - "*"
10
+
11
+ jobs:
12
+ pre-commit:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - uses: actions/setup-python@v3
17
+ - uses: pre-commit/action@v3.0.1
18
+
19
+ test:
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ matrix:
23
+ python-version: ["3.10", "3.11", "3.12"]
24
+
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v4
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ cache: "pip" # caching pip dependencies
32
+ cache-dependency-path: "**/pyproject.toml"
33
+ - name: Install dependencies
34
+ run: |
35
+ python -m pip install --upgrade pip
36
+ pip install .[dev]
37
+ - name: Test with pytest
38
+ run: |
39
+ pytest -m "not plot"
40
+
41
+ build_docs:
42
+ runs-on: ubuntu-latest
43
+ needs: test
44
+ steps:
45
+ - uses: actions/checkout@v4
46
+ - uses: actions/setup-python@v4
47
+ with:
48
+ python-version: 3.11
49
+ cache: "pip" # caching pip dependencies
50
+ cache-dependency-path: "**/pyproject.toml"
51
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
52
+ - uses: actions/cache@v3
53
+ with:
54
+ key: mkdocs-material-${{ env.cache_id }}
55
+ path: .cache
56
+ restore-keys: |
57
+ mkdocs-material-
58
+ - run: pip install .[docs]
59
+ - run: mkdocs build
qseek-0.1.0/.gitignore ADDED
@@ -0,0 +1,166 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ .idea/
161
+ .vscode
162
+
163
+ # Data files
164
+ *.mseed
165
+
166
+ test/data/
@@ -0,0 +1,22 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: trailing-whitespace
8
+ - id: end-of-file-fixer
9
+ - id: check-added-large-files
10
+ - id: mixed-line-ending
11
+ - repo: https://github.com/astral-sh/ruff-pre-commit
12
+ # Ruff version.
13
+ rev: v0.8.1
14
+ hooks:
15
+ - id: ruff
16
+ - id: ruff-format
17
+ - args: [--fix]
18
+ id: ruff
19
+ - repo: https://github.com/pre-commit/mirrors-clang-format
20
+ rev: v19.1.4
21
+ hooks:
22
+ - id: clang-format