pySATSI 0.2.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.
- pysatsi-0.2.0/.gitignore +131 -0
- pysatsi-0.2.0/CODE_OF_CONDUCT.md +7 -0
- pysatsi-0.2.0/CONTRIBUTING.md +16 -0
- pysatsi-0.2.0/DISCLAIMER.md +11 -0
- pysatsi-0.2.0/LICENSE.md +46 -0
- pysatsi-0.2.0/PKG-INFO +72 -0
- pysatsi-0.2.0/README.md +52 -0
- pysatsi-0.2.0/pyproject.toml +46 -0
- pysatsi-0.2.0/src/pySATSI/__init__.py +1 -0
- pysatsi-0.2.0/src/pySATSI/functions/__init__.py +1 -0
- pysatsi-0.2.0/src/pySATSI/functions/bootmech.py +481 -0
- pysatsi-0.2.0/src/pySATSI/functions/checkerboard.py +115 -0
- pysatsi-0.2.0/src/pySATSI/functions/colormaps/colorwheel.txt +256 -0
- pysatsi-0.2.0/src/pySATSI/functions/colormaps/rainbow.txt +256 -0
- pysatsi-0.2.0/src/pySATSI/functions/default_params.py +124 -0
- pysatsi-0.2.0/src/pySATSI/functions/file_io.py +597 -0
- pysatsi-0.2.0/src/pySATSI/functions/fun.py +337 -0
- pysatsi-0.2.0/src/pySATSI/functions/gridding.py +562 -0
- pysatsi-0.2.0/src/pySATSI/functions/knee.py +183 -0
- pysatsi-0.2.0/src/pySATSI/functions/mech.py +305 -0
- pysatsi-0.2.0/src/pySATSI/functions/plotting.py +576 -0
- pysatsi-0.2.0/src/pySATSI/functions/stress.py +317 -0
- pysatsi-0.2.0/src/pySATSI/pySATSI.py +179 -0
pysatsi-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
cover/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
.pybuilder/
|
|
74
|
+
target/
|
|
75
|
+
|
|
76
|
+
# Jupyter Notebook
|
|
77
|
+
.ipynb_checkpoints
|
|
78
|
+
|
|
79
|
+
# IPython
|
|
80
|
+
#profile_default/
|
|
81
|
+
#ipython_config.py
|
|
82
|
+
|
|
83
|
+
# PEP 582
|
|
84
|
+
__pypackages__/
|
|
85
|
+
|
|
86
|
+
# Celery stuff
|
|
87
|
+
celerybeat-schedule
|
|
88
|
+
celerybeat.pid
|
|
89
|
+
|
|
90
|
+
# SageMath parsed files
|
|
91
|
+
*.sage.py
|
|
92
|
+
|
|
93
|
+
# Environments
|
|
94
|
+
.env
|
|
95
|
+
.venv
|
|
96
|
+
env/
|
|
97
|
+
venv/
|
|
98
|
+
ENV/
|
|
99
|
+
env.bak/
|
|
100
|
+
venv.bak/
|
|
101
|
+
|
|
102
|
+
# Spyder project settings
|
|
103
|
+
.spyderproject
|
|
104
|
+
.spyproject
|
|
105
|
+
|
|
106
|
+
# Rope project settings
|
|
107
|
+
.ropeproject
|
|
108
|
+
|
|
109
|
+
# mkdocs documentation
|
|
110
|
+
/site
|
|
111
|
+
|
|
112
|
+
# mypy
|
|
113
|
+
.mypy_cache/
|
|
114
|
+
.dmypy.json
|
|
115
|
+
dmypy.json
|
|
116
|
+
|
|
117
|
+
# Pyre type checker
|
|
118
|
+
.pyre/
|
|
119
|
+
|
|
120
|
+
# pytype static type analyzer
|
|
121
|
+
.pytype/
|
|
122
|
+
|
|
123
|
+
# Cython debug symbols
|
|
124
|
+
cython_debug/
|
|
125
|
+
|
|
126
|
+
# Mac DS_Store
|
|
127
|
+
.DS_Store
|
|
128
|
+
|
|
129
|
+
# VSCode workspace
|
|
130
|
+
*.code-workspace
|
|
131
|
+
.pylintrc
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Contributing
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
Contributions are welcome from the community. Questions can be asked on the
|
|
5
|
+
[issues page][1]. Before creating a new issue, please take a moment to search
|
|
6
|
+
and make sure a similar issue does not already exist. If one does exist, you
|
|
7
|
+
can comment (most simply even with just a `:+1:`) to show your support for that
|
|
8
|
+
issue.
|
|
9
|
+
|
|
10
|
+
If you have direct contributions you would like considered for incorporation
|
|
11
|
+
into the project you can [fork this repository][2] and
|
|
12
|
+
[submit a pull request][3] for review.
|
|
13
|
+
|
|
14
|
+
[1]: https://code.usgs.gov/esc/pySATSI/issues
|
|
15
|
+
[2]: https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#create-a-fork
|
|
16
|
+
[3]: https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Disclaimer
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
This software is preliminary or provisional and is subject to revision. It is
|
|
5
|
+
being provided to meet the need for timely best science. The software has not
|
|
6
|
+
received final approval by the U.S. Geological Survey (USGS). No warranty,
|
|
7
|
+
expressed or implied, is made by the USGS or the U.S. Government as to the
|
|
8
|
+
functionality of the software and related material nor shall the fact of release
|
|
9
|
+
constitute any such warranty. The software is provided on the condition that
|
|
10
|
+
neither the USGS nor the U.S. Government shall be held liable for any damages
|
|
11
|
+
resulting from the authorized or unauthorized use of the software.
|
pysatsi-0.2.0/LICENSE.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
License
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
Unless otherwise noted, This project is in the public domain in the United
|
|
5
|
+
States because it contains materials that originally came from the United
|
|
6
|
+
States Geological Survey, an agency of the United States Department of
|
|
7
|
+
Interior. For more information, see the official USGS copyright policy at
|
|
8
|
+
https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits
|
|
9
|
+
|
|
10
|
+
Additionally, we waive copyright and related rights in the work
|
|
11
|
+
worldwide through the CC0 1.0 Universal public domain dedication.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
CC0 1.0 Universal Summary
|
|
15
|
+
-------------------------
|
|
16
|
+
|
|
17
|
+
This is a human-readable summary of the
|
|
18
|
+
[Legal Code (read the full text)][1].
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### No Copyright
|
|
22
|
+
|
|
23
|
+
The person who associated a work with this deed has dedicated the work to
|
|
24
|
+
the public domain by waiving all of his or her rights to the work worldwide
|
|
25
|
+
under copyright law, including all related and neighboring rights, to the
|
|
26
|
+
extent allowed by law.
|
|
27
|
+
|
|
28
|
+
You can copy, modify, distribute and perform the work, even for commercial
|
|
29
|
+
purposes, all without asking permission.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Other Information
|
|
33
|
+
|
|
34
|
+
In no way are the patent or trademark rights of any person affected by CC0,
|
|
35
|
+
nor are the rights that other persons may have in the work or in how the
|
|
36
|
+
work is used, such as publicity or privacy rights.
|
|
37
|
+
|
|
38
|
+
Unless expressly stated otherwise, the person who associated a work with
|
|
39
|
+
this deed makes no warranties about the work, and disclaims liability for
|
|
40
|
+
all uses of the work, to the fullest extent permitted by applicable law.
|
|
41
|
+
When using or citing the work, you should not imply endorsement by the
|
|
42
|
+
author or the affirmer.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
[1]: https://creativecommons.org/publicdomain/zero/1.0/legalcode
|
pysatsi-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pySATSI
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Python package for focal mechanism stress inversions
|
|
5
|
+
Project-URL: Homepage, https://code.usgs.gov/esc/pySATSI
|
|
6
|
+
Project-URL: Issues, https://code.usgs.gov/esc/pySATSI/-/issues
|
|
7
|
+
Author-email: "Robert J. Skoumal" <rskoumal@usgs.gov>
|
|
8
|
+
License-Expression: CC0-1.0
|
|
9
|
+
License-File: LICENSE.md
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Requires-Dist: numpy<2.0
|
|
14
|
+
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: scikit-learn
|
|
16
|
+
Requires-Dist: scipy
|
|
17
|
+
Provides-Extra: plot
|
|
18
|
+
Requires-Dist: matplotlib; extra == 'plot'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# pySATSI
|
|
22
|
+
|
|
23
|
+
Python package for focal mechanism stress inversions.
|
|
24
|
+
|
|
25
|
+
Author: Robert Skoumal, U.S. Geological Survey | rskoumal@usgs.gov
|
|
26
|
+
|
|
27
|
+
This project contains Python code to compute damped stress inversions using earthquake focal mechanism solutions.
|
|
28
|
+
|
|
29
|
+
## How to Use
|
|
30
|
+
#### 1. Install the latest release in your virtual environment:
|
|
31
|
+
<pre>
|
|
32
|
+
# If you <i><b>don't</b></i> want to create any plots:
|
|
33
|
+
pip install -U pySATSI
|
|
34
|
+
|
|
35
|
+
# If you <i><b>do</b></i> want to create plots:
|
|
36
|
+
pip install -U pySATSI[plots]
|
|
37
|
+
</pre>
|
|
38
|
+
Python 3.8+ versions are supported.
|
|
39
|
+
|
|
40
|
+
#### 2. Run pySATSI with your desired control file:
|
|
41
|
+
```
|
|
42
|
+
pySATSI path_to/control_file.txt
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## More information
|
|
46
|
+
### Running examples
|
|
47
|
+
A variety of examples are provided in the repository. It's recommended you play around with these examples to learn about some of the features.
|
|
48
|
+
1. Download the examples folder available [HERE](https://code.usgs.gov/esc/pySATSI/-/archive/main/pySATSI-main.zip?path=examples).
|
|
49
|
+
2. Unzip the folder.
|
|
50
|
+
3. Navigate to the examples folder you just downloaded, e.g.:
|
|
51
|
+
`
|
|
52
|
+
cd examples
|
|
53
|
+
`
|
|
54
|
+
4. Run pySATSI with the example of your choice, e.g.:
|
|
55
|
+
`pySATSI 0D/control_file.txt`
|
|
56
|
+
|
|
57
|
+
### Manual
|
|
58
|
+
Refer to the [manual](https://code.usgs.gov/esc/pySATSI/-/blob/main/pySATSI_manual.pdf) or the [wiki](https://code.usgs.gov/esc/pySATSI/-/wikis/home) for additional information about running the code.
|
|
59
|
+
|
|
60
|
+
## Citation
|
|
61
|
+
Please cite our paper if you use anything in this project:
|
|
62
|
+
|
|
63
|
+
- Skoumal, R.J., Hardebeck, J.L., Michael, A.J. (in review). pySATSI: A Python package for computing focal mechanism stress inversions. _Seismological Research Letters_.
|
|
64
|
+
|
|
65
|
+
Significant portions of this algorithm are based on [SATSI](https://www.usgs.gov/node/279402):
|
|
66
|
+
|
|
67
|
+
- Hardebeck, J.L., & Michael, A.J. (2006). Damped regional‐scale stress inversions: Methodology and examples for southern California and the Coalinga aftershock sequence. Journal of Geophysical Research: Solid Earth, 111(B11). https://doi.org/10.1029/2005JB004144
|
|
68
|
+
|
|
69
|
+
## License and Disclaimer
|
|
70
|
+
[License](https://code.usgs.gov/esc/pySATSI/-/blob/main/LICENSE.md): This project is in the public domain.
|
|
71
|
+
|
|
72
|
+
[Disclaimer](https://code.usgs.gov/esc/pySATSI/-/blob/main/DISCLAIMER.md): This software is preliminary or provisional and is subject to revision.
|
pysatsi-0.2.0/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# pySATSI
|
|
2
|
+
|
|
3
|
+
Python package for focal mechanism stress inversions.
|
|
4
|
+
|
|
5
|
+
Author: Robert Skoumal, U.S. Geological Survey | rskoumal@usgs.gov
|
|
6
|
+
|
|
7
|
+
This project contains Python code to compute damped stress inversions using earthquake focal mechanism solutions.
|
|
8
|
+
|
|
9
|
+
## How to Use
|
|
10
|
+
#### 1. Install the latest release in your virtual environment:
|
|
11
|
+
<pre>
|
|
12
|
+
# If you <i><b>don't</b></i> want to create any plots:
|
|
13
|
+
pip install -U pySATSI
|
|
14
|
+
|
|
15
|
+
# If you <i><b>do</b></i> want to create plots:
|
|
16
|
+
pip install -U pySATSI[plots]
|
|
17
|
+
</pre>
|
|
18
|
+
Python 3.8+ versions are supported.
|
|
19
|
+
|
|
20
|
+
#### 2. Run pySATSI with your desired control file:
|
|
21
|
+
```
|
|
22
|
+
pySATSI path_to/control_file.txt
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## More information
|
|
26
|
+
### Running examples
|
|
27
|
+
A variety of examples are provided in the repository. It's recommended you play around with these examples to learn about some of the features.
|
|
28
|
+
1. Download the examples folder available [HERE](https://code.usgs.gov/esc/pySATSI/-/archive/main/pySATSI-main.zip?path=examples).
|
|
29
|
+
2. Unzip the folder.
|
|
30
|
+
3. Navigate to the examples folder you just downloaded, e.g.:
|
|
31
|
+
`
|
|
32
|
+
cd examples
|
|
33
|
+
`
|
|
34
|
+
4. Run pySATSI with the example of your choice, e.g.:
|
|
35
|
+
`pySATSI 0D/control_file.txt`
|
|
36
|
+
|
|
37
|
+
### Manual
|
|
38
|
+
Refer to the [manual](https://code.usgs.gov/esc/pySATSI/-/blob/main/pySATSI_manual.pdf) or the [wiki](https://code.usgs.gov/esc/pySATSI/-/wikis/home) for additional information about running the code.
|
|
39
|
+
|
|
40
|
+
## Citation
|
|
41
|
+
Please cite our paper if you use anything in this project:
|
|
42
|
+
|
|
43
|
+
- Skoumal, R.J., Hardebeck, J.L., Michael, A.J. (in review). pySATSI: A Python package for computing focal mechanism stress inversions. _Seismological Research Letters_.
|
|
44
|
+
|
|
45
|
+
Significant portions of this algorithm are based on [SATSI](https://www.usgs.gov/node/279402):
|
|
46
|
+
|
|
47
|
+
- Hardebeck, J.L., & Michael, A.J. (2006). Damped regional‐scale stress inversions: Methodology and examples for southern California and the Coalinga aftershock sequence. Journal of Geophysical Research: Solid Earth, 111(B11). https://doi.org/10.1029/2005JB004144
|
|
48
|
+
|
|
49
|
+
## License and Disclaimer
|
|
50
|
+
[License](https://code.usgs.gov/esc/pySATSI/-/blob/main/LICENSE.md): This project is in the public domain.
|
|
51
|
+
|
|
52
|
+
[Disclaimer](https://code.usgs.gov/esc/pySATSI/-/blob/main/DISCLAIMER.md): This software is preliminary or provisional and is subject to revision.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pySATSI"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Robert J. Skoumal", email="rskoumal@usgs.gov" },
|
|
10
|
+
]
|
|
11
|
+
description = "Python package for focal mechanism stress inversions"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.8"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"numpy<2.0",
|
|
16
|
+
"pandas",
|
|
17
|
+
"scipy",
|
|
18
|
+
"scikit-learn",
|
|
19
|
+
]
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
]
|
|
24
|
+
license = "CC0-1.0"
|
|
25
|
+
license-files = ["LICENSE.md"]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
plot=[
|
|
29
|
+
"matplotlib",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[tool.hatch.build]
|
|
33
|
+
exclude = [
|
|
34
|
+
"examples",
|
|
35
|
+
"code.json",
|
|
36
|
+
"requirements.txt",
|
|
37
|
+
"*.pdf",
|
|
38
|
+
"*.so",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.scripts]
|
|
42
|
+
pySATSI = "pySATSI.pySATSI:main"
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://code.usgs.gov/esc/pySATSI"
|
|
46
|
+
Issues = "https://code.usgs.gov/esc/pySATSI/-/issues"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import os, sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
|