33The code is divided between Python modules in ` tesseroid-density ` , Jupyter
44notebooks in ` notebooks ` , and analysis scripts in ` scripts ` .
55The modules implement the methodology and code that is reused in different applications.
6- This code is tested using ` pytest ` with the test code in ` tests ` .
76
87The ` Makefile ` automates all processes related to executing code.
98Run the following to perform all actions from building the software to
@@ -24,9 +23,9 @@ function to every tesseroid by defining a regular Python function with a single
2423` height ` argument (float or numpy 1d array) that returns a float.
2524
2625
27- ## Building, testing, and linting
26+ ## Building and linting
2827
29- Use the ` Makefile ` to build, test, and lint the software:
28+ Use the ` Makefile ` to build and lint the software:
3029
3130* Build and install:
3231
@@ -36,45 +35,62 @@ Use the `Makefile` to build, test, and lint the software:
3635
3736 make check
3837
39- * Run the tests in ` tests ` and doctests in docstrings:
4038
41- make test
42-
43- * Calculate the test coverage of the main Python code (not including the
44- notebooks):
45-
46- make coverage
39+ ## Scripts
40+
41+ Inside ` scripts ` we can find the Python scripts that create the results and figures
42+ shown on the manuscript.
43+
44+ - ` density-based-discretization.py ` : Create example figure for how the
45+ discretization-based algorithm works.
46+ - ` linear_density.py ` : Compares the numerical results of a spherical shell with its
47+ analytical solution in case of a linear density in depth. Only the adaptive
48+ discretization algorithm is performed.
49+ - ` grid_search.py ` : Performs a grid search by comparing the numerical results of
50+ a spherical shell with its analytical solution in case of an exponential density. The
51+ grid search is done by exploring values of distance-size ratio (D) and delta ratio.
52+ - ` exponential_density.py ` : Compares the numerical results of a spherical shell with its
53+ analytical solution in case of an exponential density in depth. It fixes the
54+ distance-size ratio (D) for the values obtained on the linear density case.
55+ - ` sine_density.py ` : Compares the numerical results of a spherical shell with its
56+ analytical solution in case of a sinusoidal density in depth. The purpose of this
57+ comparison is only to test the behaviour of the numerical approximation even on
58+ a highly varying density function. These kind of density functions are not intended to
59+ be applied on an actual geophysical case.
60+ - ` number-of-tesseroids.py ` : Compute the number of discretization the density-based
61+ algorithm performs for different density functions.
62+ - ` neuquen_basin.py ` : Apply the new methodology to forward model the Neuquén Basin with
63+ an exponential increasing density in depth and compare it with the results for an
64+ homogeneous and a linear density.
65+
66+ Extra files:
67+ - ` tesseroid_model.py ` : File containing useful classes for the Neuquén Basin forward
68+ modelling.
69+
70+ Directories:
71+ - ` results ` : Directory where all resulting files generated by the scripts will be saved.
72+
73+
74+ You can generate the results by running all scripts with:
75+ ```
76+ make results
77+ ```
78+ This could take a lot of time, so please be patient.
79+
80+ Or you can just recreate the figures with:
81+ ```
82+ make figures
83+ ```
4784
4885## Notebooks
4986
50- Inside ` notebooks ` we can find notebooks that show examples on how to use the
51- package, solve the analytical solutions of the gravity fields generated by a
52- spherical shell with variable density, determine the optimal parameters needed
53- to achieve a good numerical approximation of the gravity fields and perform a
54- forward modelling of the Neuquén Basin using an increasing exponential density
55- function with depth.
87+ Inside ` notebooks ` we can find a single notebook showing how ` tesseroid_density ` could
88+ be used on forward modelling a mesh of tesseroids or a single one.
5689
57- * [ 01-simple-example .ipynb] ( ) : Shows examples on how to use the variable
58- density tesseroid code to model a single Tesseroid or Tesseroids meshes and
90+ * [ tesseroid_density_example .ipynb] ( ) : Shows examples on how to use the variable
91+ density tesseroid code to model a single tesseroid or tesseroids meshes and
5992 compute the gravitational fields they generate.
60- * [ 02-spherical-shell-analytical-solutions.ipynb] ( ) : Obtains the analytical
61- solution for the gravitational potential generated by a spherical shell with
62- variable density in the radial direction. Gives specific solutions for
63- linear and exponential density functions.
64- * [ 03-linear-density-test.ipynb] ( ) : Obtains the density-size ratio for the
65- for a linear density Tesseroids by comparing the numerical results with the
66- analytical solution of the gravitational fields generated by a spherical
67- shell with the same linear density.
68- * [ 04-density-based-discretization-algorithm.ipynb] ( ) : Illustrates how the new
69- density-based discretization algorithm works and how a lower value of delta
70- produces more subdivisions to the original tesseroids.
71- * [ 05-exponential-density-grid-search.ipynb] ( ) : Performs a grid search on the
72- D-delta space to find the optimal distance-size ratio and delta ratio pair by
73- comparing the numerical result with the analytical solution for the spherical
74- shell.
75- * [ 06-exponential-density-delta-determination.ipynb] ( ) : Determines the optimal
76- value of delta ratio for several exponential density functions while keeping
77- D equal to the values determined in the linear density case.
78- * [ 07-neuquen-basin.ipynb] ( ) : Forward model of the Neuquén Basin using an
79- increasing exponential density.
80- * [ 08-plot-figures.ipynb] ( ) : Produces ready to publish figures.
93+
94+ In order to open the notebook, run ` jupyter-notebook ` . It will open a new tab on your
95+ web browser in which you can navigate and open the notebook.
96+ If you want to obtain the same results, run the cells in order.
0 commit comments