gprm 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 (58) hide show
  1. gprm-0.1.0/LICENSE +21 -0
  2. gprm-0.1.0/MANIFEST.in +2 -0
  3. gprm-0.1.0/PKG-INFO +116 -0
  4. gprm-0.1.0/README.md +68 -0
  5. gprm-0.1.0/gprm/Data/boucot_paleolithology.gpkg +0 -0
  6. gprm-0.1.0/gprm/Data/healpix_mesh_128.gpmlz +0 -0
  7. gprm-0.1.0/gprm/Data/healpix_mesh_16.gpmlz +0 -0
  8. gprm-0.1.0/gprm/Data/healpix_mesh_256.gpmlz +0 -0
  9. gprm-0.1.0/gprm/Data/healpix_mesh_32.gpmlz +0 -0
  10. gprm-0.1.0/gprm/Data/healpix_mesh_4.gpmlz +0 -0
  11. gprm-0.1.0/gprm/Data/healpix_mesh_64.gpmlz +0 -0
  12. gprm-0.1.0/gprm/Data/healpix_mesh_8.gpmlz +0 -0
  13. gprm-0.1.0/gprm/GPlatesReconstructionModel.py +2051 -0
  14. gprm-0.1.0/gprm/__init__.py +58 -0
  15. gprm-0.1.0/gprm/datasets/Geology.py +92 -0
  16. gprm-0.1.0/gprm/datasets/Paleogeography.py +135 -0
  17. gprm-0.1.0/gprm/datasets/Reconstructions.py +827 -0
  18. gprm-0.1.0/gprm/datasets/Rocks.py +172 -0
  19. gprm-0.1.0/gprm/datasets/Seafloor.py +291 -0
  20. gprm-0.1.0/gprm/datasets/Strat.py +328 -0
  21. gprm-0.1.0/gprm/datasets/Zircons.py +545 -0
  22. gprm-0.1.0/gprm/datasets/__init__.py +59 -0
  23. gprm-0.1.0/gprm/datasets/_fetch.py +107 -0
  24. gprm-0.1.0/gprm/utils/__init__.py +38 -0
  25. gprm-0.1.0/gprm/utils/_optional.py +41 -0
  26. gprm-0.1.0/gprm/utils/create_gpml.py +167 -0
  27. gprm-0.1.0/gprm/utils/deformation.py +331 -0
  28. gprm-0.1.0/gprm/utils/fileio.py +162 -0
  29. gprm-0.1.0/gprm/utils/geometry.py +312 -0
  30. gprm-0.1.0/gprm/utils/inpaint.py +184 -0
  31. gprm-0.1.0/gprm/utils/molchan.py +923 -0
  32. gprm-0.1.0/gprm/utils/paleogeography.py +441 -0
  33. gprm-0.1.0/gprm/utils/paleotopography.py +438 -0
  34. gprm-0.1.0/gprm/utils/pca_utils.py +222 -0
  35. gprm-0.1.0/gprm/utils/platetree.py +339 -0
  36. gprm-0.1.0/gprm/utils/pmag.py +254 -0
  37. gprm-0.1.0/gprm/utils/proximity.py +343 -0
  38. gprm-0.1.0/gprm/utils/raster.py +399 -0
  39. gprm-0.1.0/gprm/utils/rotation.py +68 -0
  40. gprm-0.1.0/gprm/utils/spatial.py +722 -0
  41. gprm-0.1.0/gprm/utils/sphere.py +335 -0
  42. gprm-0.1.0/gprm/utils/vector.py +121 -0
  43. gprm-0.1.0/gprm/utils/web_service.py +108 -0
  44. gprm-0.1.0/gprm/utils/wrapping_tools.py +129 -0
  45. gprm-0.1.0/gprm.egg-info/PKG-INFO +116 -0
  46. gprm-0.1.0/gprm.egg-info/SOURCES.txt +56 -0
  47. gprm-0.1.0/gprm.egg-info/dependency_links.txt +1 -0
  48. gprm-0.1.0/gprm.egg-info/requires.txt +33 -0
  49. gprm-0.1.0/gprm.egg-info/top_level.txt +1 -0
  50. gprm-0.1.0/pyproject.toml +80 -0
  51. gprm-0.1.0/setup.cfg +4 -0
  52. gprm-0.1.0/tests/test_dataset_loaders.py +53 -0
  53. gprm-0.1.0/tests/test_import_contract.py +109 -0
  54. gprm-0.1.0/tests/test_molchan.py +506 -0
  55. gprm-0.1.0/tests/test_network.py +67 -0
  56. gprm-0.1.0/tests/test_proximity.py +137 -0
  57. gprm-0.1.0/tests/test_regressions.py +609 -0
  58. gprm-0.1.0/tests/test_subduction_convergence.py +86 -0
gprm-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Simon Williams
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
gprm-0.1.0/MANIFEST.in ADDED
@@ -0,0 +1,2 @@
1
+ recursive-include gprm/Data *
2
+ include LICENSE README.md
gprm-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: gprm
3
+ Version: 0.1.0
4
+ Summary: Tools for building and working with GPlates plate tectonic reconstruction models
5
+ Author-email: Simon Williams <siwill22@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/siwill22/GPlatesReconstructionModel
8
+ Classifier: Intended Audience :: Science/Research
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Natural Language :: English
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Requires-Python: >=3.8
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: numpy
19
+ Requires-Dist: scipy
20
+ Requires-Dist: pandas
21
+ Requires-Dist: geopandas
22
+ Requires-Dist: shapely
23
+ Requires-Dist: matplotlib
24
+ Requires-Dist: xarray
25
+ Requires-Dist: pygplates
26
+ Requires-Dist: PlateTectonicTools
27
+ Requires-Dist: pooch
28
+ Requires-Dist: rasterio
29
+ Requires-Dist: requests
30
+ Requires-Dist: tqdm
31
+ Requires-Dist: pyyaml
32
+ Requires-Dist: setuptools<80
33
+ Requires-Dist: cartopy
34
+ Provides-Extra: viz
35
+ Requires-Dist: pygmt; extra == "viz"
36
+ Provides-Extra: geophysics
37
+ Requires-Dist: pyshtools; extra == "geophysics"
38
+ Requires-Dist: litho1pt0; extra == "geophysics"
39
+ Requires-Dist: pmagpy; extra == "geophysics"
40
+ Provides-Extra: spatial
41
+ Requires-Dist: stripy; extra == "spatial"
42
+ Requires-Dist: astropy-healpix; extra == "spatial"
43
+ Requires-Dist: scikit-image; extra == "spatial"
44
+ Requires-Dist: scikit-learn; extra == "spatial"
45
+ Provides-Extra: all
46
+ Requires-Dist: gprm[geophysics,spatial,viz]; extra == "all"
47
+ Dynamic: license-file
48
+
49
+ # GPlatesReconstructionModel
50
+
51
+ *Prototyping for GPlates plate reconstructions as a python class*
52
+
53
+ - Usage examples are available in the test_notebooks directory
54
+
55
+ ## Installation
56
+
57
+ Install directly from GitHub with pip:
58
+ ```
59
+ pip install git+https://github.com/siwill22/GPlatesReconstructionModel
60
+ ```
61
+
62
+ This pulls in every core dependency automatically, including `pygplates` and
63
+ `PlateTectonicTools`, both of which are ordinary PyPI packages.
64
+
65
+ To also install the optional dependencies for plotting, geophysics helpers, and additional
66
+ spatial algorithms, install the `all` extra:
67
+ ```
68
+ pip install "gprm[all] @ git+https://github.com/siwill22/GPlatesReconstructionModel"
69
+ ```
70
+
71
+ A plain install needs **no system packages** — every core dependency has wheels on PyPI for
72
+ Linux, macOS and Windows. That means the data-preparation and analysis path (fetching
73
+ reconstruction models, assigning plate IDs, reconstructing data, plate snapshots, and all
74
+ proximity calculations) runs on a headless machine or in CI with nothing but `pip install`.
75
+
76
+ `pygmt` is deliberately **not** a core dependency, because it is a wrapper around the GMT
77
+ command-line library and does not bundle GMT itself — that is the one thing pip cannot
78
+ install for you. It is only needed for plotting and for a few grid-sampling helpers, all of
79
+ which import it at the point of use and tell you what to install if it is missing.
80
+
81
+ ## Python Dependencies
82
+ ### Required (installed automatically, all pip-installable):
83
+ - numpy, scipy, pandas
84
+ - geopandas, shapely, rasterio
85
+ - matplotlib, xarray, cartopy
86
+ - pygplates
87
+ - PlateTectonicTools (https://github.com/EarthByte/PlateTectonicTools) — this itself
88
+ imports `cartopy` unconditionally, which is why `cartopy` is required rather than optional
89
+ - pooch, requests, tqdm, pyyaml
90
+
91
+ ### Optional extras:
92
+ - `pip install "gprm[viz]"` — pygmt (plotting, grid sampling). **pygmt also needs GMT >=6
93
+ installed separately**: `conda install -c conda-forge gmt`, Homebrew's `gmt`, or your Linux
94
+ package manager.
95
+ - `pip install "gprm[geophysics]"` — pyshtools, litho1pt0, pmagpy
96
+ - `pip install "gprm[spatial]"` — stripy, astropy-healpix, scikit-image, scikit-learn
97
+ (if astropy-healpix is not installed, some functions fall back on precomputed point
98
+ distributions in the `Data` folder)
99
+ - `pip install "gprm[all]"` — everything above
100
+
101
+ ### Where downloaded data goes
102
+ Datasets are cached with `pooch`, in a platform-dependent location. Ask for it rather than
103
+ writing it out by hand:
104
+ ```python
105
+ from gprm.datasets import cache_path
106
+ cache_path() # the cache root
107
+ cache_path('TorsvikCocks2017', 'CEED6_LAND.gpml') # a file inside a fetched bundle
108
+ ```
109
+
110
+ **Note on `stripy`**: `stripy` (pulled in directly by `spatial`, and transitively by
111
+ `geophysics` via `litho1pt0`) has no prebuilt wheel for Apple Silicon macOS on any Python
112
+ version, and none at all for Python 3.13+. On those platforms pip will try to build it from
113
+ source, which needs a Fortran compiler (e.g. `brew install gcc` on macOS, or
114
+ `conda install -c conda-forge stripy` as an alternative to pip for just that package).
115
+
116
+
gprm-0.1.0/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # GPlatesReconstructionModel
2
+
3
+ *Prototyping for GPlates plate reconstructions as a python class*
4
+
5
+ - Usage examples are available in the test_notebooks directory
6
+
7
+ ## Installation
8
+
9
+ Install directly from GitHub with pip:
10
+ ```
11
+ pip install git+https://github.com/siwill22/GPlatesReconstructionModel
12
+ ```
13
+
14
+ This pulls in every core dependency automatically, including `pygplates` and
15
+ `PlateTectonicTools`, both of which are ordinary PyPI packages.
16
+
17
+ To also install the optional dependencies for plotting, geophysics helpers, and additional
18
+ spatial algorithms, install the `all` extra:
19
+ ```
20
+ pip install "gprm[all] @ git+https://github.com/siwill22/GPlatesReconstructionModel"
21
+ ```
22
+
23
+ A plain install needs **no system packages** — every core dependency has wheels on PyPI for
24
+ Linux, macOS and Windows. That means the data-preparation and analysis path (fetching
25
+ reconstruction models, assigning plate IDs, reconstructing data, plate snapshots, and all
26
+ proximity calculations) runs on a headless machine or in CI with nothing but `pip install`.
27
+
28
+ `pygmt` is deliberately **not** a core dependency, because it is a wrapper around the GMT
29
+ command-line library and does not bundle GMT itself — that is the one thing pip cannot
30
+ install for you. It is only needed for plotting and for a few grid-sampling helpers, all of
31
+ which import it at the point of use and tell you what to install if it is missing.
32
+
33
+ ## Python Dependencies
34
+ ### Required (installed automatically, all pip-installable):
35
+ - numpy, scipy, pandas
36
+ - geopandas, shapely, rasterio
37
+ - matplotlib, xarray, cartopy
38
+ - pygplates
39
+ - PlateTectonicTools (https://github.com/EarthByte/PlateTectonicTools) — this itself
40
+ imports `cartopy` unconditionally, which is why `cartopy` is required rather than optional
41
+ - pooch, requests, tqdm, pyyaml
42
+
43
+ ### Optional extras:
44
+ - `pip install "gprm[viz]"` — pygmt (plotting, grid sampling). **pygmt also needs GMT >=6
45
+ installed separately**: `conda install -c conda-forge gmt`, Homebrew's `gmt`, or your Linux
46
+ package manager.
47
+ - `pip install "gprm[geophysics]"` — pyshtools, litho1pt0, pmagpy
48
+ - `pip install "gprm[spatial]"` — stripy, astropy-healpix, scikit-image, scikit-learn
49
+ (if astropy-healpix is not installed, some functions fall back on precomputed point
50
+ distributions in the `Data` folder)
51
+ - `pip install "gprm[all]"` — everything above
52
+
53
+ ### Where downloaded data goes
54
+ Datasets are cached with `pooch`, in a platform-dependent location. Ask for it rather than
55
+ writing it out by hand:
56
+ ```python
57
+ from gprm.datasets import cache_path
58
+ cache_path() # the cache root
59
+ cache_path('TorsvikCocks2017', 'CEED6_LAND.gpml') # a file inside a fetched bundle
60
+ ```
61
+
62
+ **Note on `stripy`**: `stripy` (pulled in directly by `spatial`, and transitively by
63
+ `geophysics` via `litho1pt0`) has no prebuilt wheel for Apple Silicon macOS on any Python
64
+ version, and none at all for Python 3.13+. On those platforms pip will try to build it from
65
+ source, which needs a Fortran compiler (e.g. `brew install gcc` on macOS, or
66
+ `conda install -c conda-forge stripy` as an alternative to pip for just that package).
67
+
68
+