sola-base 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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Franck Latallerie
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,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: sola-base
3
+ Version: 0.1.0
4
+ Summary: Multi-purpose modular SOLA tomography package
5
+ Author: Franck Latallerie, Christophe Zaroli, Sophie Lambotte, Alessia Maggi, Sixtine Dromigny, Andrew Walker
6
+ License-Expression: MIT
7
+ Project-URL: Documentation, https://sola-base.readthedocs.io/en/latest/
8
+ Project-URL: Repository, https://gitlab.com/FranckLatallerie/sola-base
9
+ Project-URL: Issues, https://gitlab.com/FranckLatallerie/sola-base/-/issues
10
+ Project-URL: Citation, https://doi.org/10.1093/gji/ggw315
11
+ Keywords: tomography,inverse problems,Backus-Gilbert,SOLA,seismology
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Classifier: Environment :: Console
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: OS Independent
20
+ Requires-Python: >=3.12
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: numpy>=2.4.4
24
+ Requires-Dist: pandas>=3.0.3
25
+ Requires-Dist: scipy>=1.17.1
26
+ Requires-Dist: joblib
27
+ Requires-Dist: matplotlib
28
+ Provides-Extra: docs
29
+ Requires-Dist: sphinx; extra == "docs"
30
+ Requires-Dist: myst-parser; extra == "docs"
31
+ Requires-Dist: furo; extra == "docs"
32
+ Requires-Dist: sphinx-autoapi; extra == "docs"
33
+ Provides-Extra: test
34
+ Requires-Dist: pytest>=9.0.3; extra == "test"
35
+ Dynamic: license-file
36
+
37
+ # SOLA-base
38
+
39
+ ## Introduction
40
+
41
+ SOLA-base solves linear inverse problems of the form d = G m + n for given target
42
+ resolution, tradeoff parameter, and data uncertainty using the Backus-Gilbert-based
43
+ SOLA method. For a given model parameter, it produces model estimate, model uncertainty
44
+ and model resolution. It comes with tools to handle a given parameterisation,
45
+ design target resolution, and to produce some plots.
46
+
47
+ ## Links
48
+
49
+ - [Documentation](https://sola-base.readthedocs.io/en/latest/)
50
+ - [Repository](https://gitlab.com/FranckLatallerie/sola-base)
51
+ - [Issues](https://gitlab.com/FranckLatallerie/sola-base/-/issues)
52
+
53
+ ## Installation
54
+
55
+ ```bash
56
+ pip install sola-base
57
+ ```
58
+
59
+ ## Usage
60
+
61
+ Each routine reads its settings from a parameter file (template below). ksfile is a text file listing the indices of the model parameters to solve for, one per line.
62
+
63
+ ```python
64
+ from sola_base.sola_preproc import sola_preproc
65
+ from sola_base.sola_lsqr import sola_lsqr
66
+ from sola_base.sola_postproc import sola_postproc
67
+ from sola_base.sola_ak import sola_ak
68
+
69
+ sola_preproc( 'path_to_parameterfile')
70
+ sola_lsqr( 'path_to_parameterfile', 'path_to_ksfile')
71
+ sola_postproc( 'path_to_parameterfile')
72
+ sola_ak( 'path_to_parameterfile', 'path_to_ksfile')
73
+ ```
74
+
75
+ - `sola_preproc`: From the data, data uncertainty, sensitivity matrix, tradeoff parameter,
76
+ and cell volumes, builds secondary inputs necessary for inversion.
77
+ - `sola_lsqr`: For parameters specified by their indices in ksfile, computes the
78
+ associated rows of the generalised inverse of G.
79
+ - `sola_postproc`: Computes the model estimates and model uncertainty of parameters for which
80
+ the generalised inverse rows are available.
81
+ - `sola_ak`: For parameters specified by their indices in ksfile, computes the averaging kernels using the associated rows of the generalised inverse of G.
82
+
83
+ ### Parameter file
84
+
85
+ Folder paths are relative to the directory Python is run from. The grid
86
+ sections are only needed by the corresponding grid classes in
87
+ `sola_base.parameterizations`.
88
+
89
+ ```ini
90
+ # Parameter file for the whole package.
91
+ # Parameters required are in the [inversion] section.
92
+ # Parameters for the grid are grid type dependent and only needed for grid classes.
93
+
94
+ [inversion]
95
+ solver = scipy
96
+ eta = 100
97
+ iters = 100
98
+ dumpiter = 50
99
+ # LSQR convergence criteria, passed to the scipy solver. Zero disables a
100
+ # criterion, so 0/0/0 runs exactly 'iters' iterations.
101
+ atol = 0
102
+ btol = 0
103
+ conlim = 0
104
+
105
+ [folders]
106
+ input=./sola_inputs
107
+ output=./sola_outputs
108
+
109
+ [xy_grid]
110
+ xll = 0
111
+ yll = 0
112
+ xur = 32
113
+ yur = 32
114
+ xstep = 1
115
+ ystep = 1
116
+
117
+ [latlon_grid]
118
+ latstep = 2
119
+ lonstep = 2
120
+ radius = 6371
121
+
122
+ [latlonrad_grid]
123
+ latstep = 2
124
+ lonstep = 2
125
+ radstep = 25
126
+ radmin = 3471
127
+ radmax = 6371
128
+ ```
129
+
130
+ ## Citing and license
131
+
132
+ - Zaroli 2016, (https://doi.org/10.1093/gji/ggw315)
133
+ - A software paper is in preparation and will be added once published.
134
+ - License: MIT, see LICENSE
@@ -0,0 +1,98 @@
1
+ # SOLA-base
2
+
3
+ ## Introduction
4
+
5
+ SOLA-base solves linear inverse problems of the form d = G m + n for given target
6
+ resolution, tradeoff parameter, and data uncertainty using the Backus-Gilbert-based
7
+ SOLA method. For a given model parameter, it produces model estimate, model uncertainty
8
+ and model resolution. It comes with tools to handle a given parameterisation,
9
+ design target resolution, and to produce some plots.
10
+
11
+ ## Links
12
+
13
+ - [Documentation](https://sola-base.readthedocs.io/en/latest/)
14
+ - [Repository](https://gitlab.com/FranckLatallerie/sola-base)
15
+ - [Issues](https://gitlab.com/FranckLatallerie/sola-base/-/issues)
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pip install sola-base
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Each routine reads its settings from a parameter file (template below). ksfile is a text file listing the indices of the model parameters to solve for, one per line.
26
+
27
+ ```python
28
+ from sola_base.sola_preproc import sola_preproc
29
+ from sola_base.sola_lsqr import sola_lsqr
30
+ from sola_base.sola_postproc import sola_postproc
31
+ from sola_base.sola_ak import sola_ak
32
+
33
+ sola_preproc( 'path_to_parameterfile')
34
+ sola_lsqr( 'path_to_parameterfile', 'path_to_ksfile')
35
+ sola_postproc( 'path_to_parameterfile')
36
+ sola_ak( 'path_to_parameterfile', 'path_to_ksfile')
37
+ ```
38
+
39
+ - `sola_preproc`: From the data, data uncertainty, sensitivity matrix, tradeoff parameter,
40
+ and cell volumes, builds secondary inputs necessary for inversion.
41
+ - `sola_lsqr`: For parameters specified by their indices in ksfile, computes the
42
+ associated rows of the generalised inverse of G.
43
+ - `sola_postproc`: Computes the model estimates and model uncertainty of parameters for which
44
+ the generalised inverse rows are available.
45
+ - `sola_ak`: For parameters specified by their indices in ksfile, computes the averaging kernels using the associated rows of the generalised inverse of G.
46
+
47
+ ### Parameter file
48
+
49
+ Folder paths are relative to the directory Python is run from. The grid
50
+ sections are only needed by the corresponding grid classes in
51
+ `sola_base.parameterizations`.
52
+
53
+ ```ini
54
+ # Parameter file for the whole package.
55
+ # Parameters required are in the [inversion] section.
56
+ # Parameters for the grid are grid type dependent and only needed for grid classes.
57
+
58
+ [inversion]
59
+ solver = scipy
60
+ eta = 100
61
+ iters = 100
62
+ dumpiter = 50
63
+ # LSQR convergence criteria, passed to the scipy solver. Zero disables a
64
+ # criterion, so 0/0/0 runs exactly 'iters' iterations.
65
+ atol = 0
66
+ btol = 0
67
+ conlim = 0
68
+
69
+ [folders]
70
+ input=./sola_inputs
71
+ output=./sola_outputs
72
+
73
+ [xy_grid]
74
+ xll = 0
75
+ yll = 0
76
+ xur = 32
77
+ yur = 32
78
+ xstep = 1
79
+ ystep = 1
80
+
81
+ [latlon_grid]
82
+ latstep = 2
83
+ lonstep = 2
84
+ radius = 6371
85
+
86
+ [latlonrad_grid]
87
+ latstep = 2
88
+ lonstep = 2
89
+ radstep = 25
90
+ radmin = 3471
91
+ radmax = 6371
92
+ ```
93
+
94
+ ## Citing and license
95
+
96
+ - Zaroli 2016, (https://doi.org/10.1093/gji/ggw315)
97
+ - A software paper is in preparation and will be added once published.
98
+ - License: MIT, see LICENSE
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "wheel"]
3
+ build-backend = 'setuptools.build_meta'
4
+
5
+ [project]
6
+ name = "sola-base"
7
+ dynamic = ["version"]
8
+ description = "Multi-purpose modular SOLA tomography package"
9
+ keywords = ["tomography", "inverse problems", "Backus-Gilbert", "SOLA", "seismology"]
10
+ readme = "README.md"
11
+ requires-python = ">=3.12"
12
+ license = "MIT"
13
+ license-files = ["LICENSE"]
14
+ dependencies = [
15
+ "numpy>=2.4.4",
16
+ "pandas>=3.0.3",
17
+ "scipy>=1.17.1",
18
+ "joblib",
19
+ "matplotlib"
20
+ ]
21
+ authors = [
22
+ { name = "Franck Latallerie"},
23
+ { name = "Christophe Zaroli"},
24
+ { name = "Sophie Lambotte"},
25
+ { name = "Alessia Maggi"},
26
+ { name = "Sixtine Dromigny"},
27
+ { name = "Andrew Walker"},
28
+ ]
29
+ classifiers = [
30
+ "Programming Language :: Python :: 3",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Programming Language :: Python :: 3.13",
33
+ "Programming Language :: Python :: 3.14",
34
+ "Development Status :: 3 - Alpha",
35
+ "Environment :: Console",
36
+ "Intended Audience :: Science/Research",
37
+ "Operating System :: OS Independent",
38
+ ]
39
+
40
+ [tool.setuptools.dynamic]
41
+ version = {attr = "sola_base.__version__"}
42
+
43
+ [project.optional-dependencies]
44
+ docs = ["sphinx", "myst-parser", "furo", "sphinx-autoapi"]
45
+ test = ["pytest>=9.0.3"]
46
+
47
+ [project.urls]
48
+ Documentation = "https://sola-base.readthedocs.io/en/latest/"
49
+ Repository = "https://gitlab.com/FranckLatallerie/sola-base"
50
+ Issues = "https://gitlab.com/FranckLatallerie/sola-base/-/issues"
51
+ Citation = "https://doi.org/10.1093/gji/ggw315"
52
+
53
+ [tool.setuptools.packages.find]
54
+ where= ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"