platerecipy 1.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.
- platerecipy-1.2.0/LICENSE +21 -0
- platerecipy-1.2.0/MANIFEST.in +6 -0
- platerecipy-1.2.0/PKG-INFO +26 -0
- platerecipy-1.2.0/README.md +72 -0
- platerecipy-1.2.0/pyproject.toml +3 -0
- platerecipy-1.2.0/setup.cfg +4 -0
- platerecipy-1.2.0/setup.py +52 -0
- platerecipy-1.2.0/src/clib/segmentation.c +791 -0
- platerecipy-1.2.0/src/clib/segmentation.h +525 -0
- platerecipy-1.2.0/src/clib/transform.c +794 -0
- platerecipy-1.2.0/src/clib/transform.h +359 -0
- platerecipy-1.2.0/src/platerecipy/__init__.py +40 -0
- platerecipy-1.2.0/src/platerecipy/analysis.py +189 -0
- platerecipy-1.2.0/src/platerecipy/grid.py +558 -0
- platerecipy-1.2.0/src/platerecipy/io.py +396 -0
- platerecipy-1.2.0/src/platerecipy/model.py +401 -0
- platerecipy-1.2.0/src/platerecipy/segmentation.py +596 -0
- platerecipy-1.2.0/src/platerecipy/transform.py +459 -0
- platerecipy-1.2.0/src/platerecipy.egg-info/PKG-INFO +26 -0
- platerecipy-1.2.0/src/platerecipy.egg-info/SOURCES.txt +22 -0
- platerecipy-1.2.0/src/platerecipy.egg-info/dependency_links.txt +1 -0
- platerecipy-1.2.0/src/platerecipy.egg-info/not-zip-safe +1 -0
- platerecipy-1.2.0/src/platerecipy.egg-info/requires.txt +5 -0
- platerecipy-1.2.0/src/platerecipy.egg-info/top_level.txt +3 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 P. Javaheri
|
|
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.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: platerecipy
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: PLATE RECognition In PYthon
|
|
5
|
+
Home-page: https://github.com/pjavaheri/platerecipy
|
|
6
|
+
Author: Pejvak Javaheri
|
|
7
|
+
Author-email: pejvak.javaheri@mail.utoronto.ca
|
|
8
|
+
License: MIT
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: numpy
|
|
12
|
+
Requires-Dist: scipy
|
|
13
|
+
Requires-Dist: matplotlib
|
|
14
|
+
Requires-Dist: pyvista
|
|
15
|
+
Requires-Dist: pandas
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: description
|
|
19
|
+
Dynamic: description-content-type
|
|
20
|
+
Dynamic: home-page
|
|
21
|
+
Dynamic: license
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
Dynamic: requires-dist
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
platerecipy is a tool for detecting candidate plates on global geophysical datasets. It analyzes the surface to identify diffuse and non-conforming regions, as well as regions with low confidence in plate assignment.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
# `platerecipy`: a package for PLATE RECognition In PYthon
|
|
4
|
+
`platerecipy` is a tool for detecting candidate plates on global geophysical
|
|
5
|
+
datasets. It analyzes the surface to identify diffuse and non-conforming regions,
|
|
6
|
+
as well as regions with low confidence in plate assignment.
|
|
7
|
+
|
|
8
|
+
## Supported platforms
|
|
9
|
+
|
|
10
|
+
Though `platerecipy` is fundamentally a `Python` package, it also relies on
|
|
11
|
+
backend functionalities that are implemented in `C`. Typically, Windows compared
|
|
12
|
+
to Linux requires a slightly different compilation and linking which at this
|
|
13
|
+
stage is not supported. That is why, currently, Linux is the only supported platform.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
Releases are made available on PyPI so that `platerecipy` can be installed using
|
|
18
|
+
`pip` on the shell as follows:
|
|
19
|
+
```bash
|
|
20
|
+
python -m pip install platerecipy
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## User guide
|
|
24
|
+
|
|
25
|
+
`platerecipy`'s documentation is moved to [platerecipy.readthedocs.io](https://platerecipy.readthedocs.io/)!
|
|
26
|
+
|
|
27
|
+
For a detailed explanation and illustration of `platerecipy`'s core functionalities,
|
|
28
|
+
please refer to:
|
|
29
|
+
> Javaheri, P., & Lowman, J. P. (2026). A random walker algorithm for plate boundary detection in spherical mantle convection models and global geophysical data sets: Application to Euler vector determination. _Journal of Geophysical Research: Solid Earth_, 131, e2025JB032259. https://doi.org/10.1029/2025JB032259
|
|
30
|
+
|
|
31
|
+
As a demonstration, assuming a given `input_xs`, `input_ys`, `input_zs`, and
|
|
32
|
+
`input_field` (all `numpy` arrays), using `platerecipy` is as simple as follows:
|
|
33
|
+
```python
|
|
34
|
+
from platerecipy.model import PlateModel
|
|
35
|
+
from platerecipy.grid import SphericalGrid
|
|
36
|
+
|
|
37
|
+
input_xs = # to be specified ...
|
|
38
|
+
input_ys = # to be specified ...
|
|
39
|
+
input_zs = # to be specified ...
|
|
40
|
+
input_field = # to be specified ...
|
|
41
|
+
|
|
42
|
+
# generating a consistent grid for interpolation
|
|
43
|
+
grid = SphericalGrid(input_xs, input_ys, input_zs)
|
|
44
|
+
|
|
45
|
+
# interpolating an input field
|
|
46
|
+
field = grid.interpolate_field(input_field)
|
|
47
|
+
|
|
48
|
+
# initializing a plate model
|
|
49
|
+
m = PlateModel(grid)
|
|
50
|
+
|
|
51
|
+
# stacking the interpolated field
|
|
52
|
+
m.stack_field(field, take_log=True)
|
|
53
|
+
|
|
54
|
+
# finding plates on the stacked field
|
|
55
|
+
m.find_plates(
|
|
56
|
+
boundary_quantile = 0.9, # threshold for the boundaries
|
|
57
|
+
separation_tolerance = 4*3.1416/180., # 4 degrees for separation tolerance
|
|
58
|
+
RW_beta = 200, # RW beta (for feature sharpness)
|
|
59
|
+
min_marker_size = 100 # to filter out micro plates
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# outputting as a ParaView readable .vtp file
|
|
63
|
+
from platerecipy import io
|
|
64
|
+
io.save_as_vtp(m)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
--------------------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
Developed by Pejvak Javaheri,
|
|
70
|
+
[pejvak.javaheri@mail.utoronto.ca](pejvak.javaheri@mail.utoronto.ca).
|
|
71
|
+
|
|
72
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from setuptools import setup, Extension, find_packages
|
|
2
|
+
|
|
3
|
+
extra_compile_args=[
|
|
4
|
+
'-O3','-std=c99', '-fPIC', '-DLIBCTOOLS'
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
platerecipy_clib_transform_module = Extension(
|
|
8
|
+
'platerecipy_clib_transform',
|
|
9
|
+
sources = [
|
|
10
|
+
'src/clib/transform.c'
|
|
11
|
+
],
|
|
12
|
+
include_dirs = ['src/clib'],
|
|
13
|
+
extra_compile_args=extra_compile_args,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
platerecipy_clib_segmentation_module = Extension(
|
|
17
|
+
'platerecipy_clib_segmentation',
|
|
18
|
+
sources = [
|
|
19
|
+
'src/clib/segmentation.c'
|
|
20
|
+
],
|
|
21
|
+
include_dirs = ['src/clib'],
|
|
22
|
+
extra_compile_args=extra_compile_args,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
setup(
|
|
26
|
+
name = 'platerecipy',
|
|
27
|
+
version = '1.2.0',
|
|
28
|
+
description = 'PLATE RECognition In PYthon',
|
|
29
|
+
long_description =
|
|
30
|
+
'platerecipy is a tool for detecting candidate plates on global geophysical '
|
|
31
|
+
'datasets. It analyzes the surface to identify diffuse and non-conforming regions, '
|
|
32
|
+
'as well as regions with low confidence in plate assignment.',
|
|
33
|
+
long_description_content_type = 'text/markdown',
|
|
34
|
+
url = 'https://github.com/pjavaheri/platerecipy',
|
|
35
|
+
author = 'Pejvak Javaheri',
|
|
36
|
+
author_email = 'pejvak.javaheri@mail.utoronto.ca',
|
|
37
|
+
license = 'MIT',
|
|
38
|
+
packages = find_packages(where='src', include=['platerecipy']),
|
|
39
|
+
package_dir = {'' : 'src'},
|
|
40
|
+
install_requires = [
|
|
41
|
+
'numpy',
|
|
42
|
+
'scipy',
|
|
43
|
+
'matplotlib',
|
|
44
|
+
'pyvista',
|
|
45
|
+
'pandas'
|
|
46
|
+
],
|
|
47
|
+
ext_modules = [
|
|
48
|
+
platerecipy_clib_transform_module,
|
|
49
|
+
platerecipy_clib_segmentation_module
|
|
50
|
+
],
|
|
51
|
+
zip_safe = False
|
|
52
|
+
)
|