Skip to content

Commit cf77f72

Browse files
committed
- added rgeomod to the gempy pipeline
1 parent 8f2f4e7 commit cf77f72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+18936
-1
lines changed
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# 1 - Installation test\n",
8+
"\n",
9+
"This notebook is for testing the dependencies for rgeomod. Just run the following code cell.\n",
10+
"\n",
11+
"<div class=\"alert alert-info\">\n",
12+
"**Your task**: Run the code in the following cells (either using the \"Run\"-button above, or by usign the corresponding shortcut (typically <code>\"Shift\"+\"Enter\"</code>, see Help function above): \n",
13+
"</div>\n",
14+
"\n",
15+
"\n"
16+
]
17+
},
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {},
21+
"source": [
22+
"#### Fundamental libraries"
23+
]
24+
},
25+
{
26+
"cell_type": "code",
27+
"execution_count": 1,
28+
"metadata": {},
29+
"outputs": [
30+
{
31+
"name": "stdout",
32+
"output_type": "stream",
33+
"text": [
34+
"Fundamental Python libraries imported correctly.\n"
35+
]
36+
}
37+
],
38+
"source": [
39+
"import numpy, sys, os, tqdm\n",
40+
"print(\"Fundamental Python libraries imported correctly.\")"
41+
]
42+
},
43+
{
44+
"cell_type": "markdown",
45+
"metadata": {},
46+
"source": [
47+
"#### Plotting libraries"
48+
]
49+
},
50+
{
51+
"cell_type": "code",
52+
"execution_count": 2,
53+
"metadata": {},
54+
"outputs": [
55+
{
56+
"name": "stdout",
57+
"output_type": "stream",
58+
"text": [
59+
"Plotting libraries imported correctly.\n"
60+
]
61+
}
62+
],
63+
"source": [
64+
"import matplotlib.pyplot, mplstereonet\n",
65+
"from mpl_toolkits.mplot3d import Axes3D\n",
66+
"print(\"Plotting libraries imported correctly.\")"
67+
]
68+
},
69+
{
70+
"cell_type": "markdown",
71+
"metadata": {},
72+
"source": [
73+
"#### 3D-Visualization library"
74+
]
75+
},
76+
{
77+
"cell_type": "markdown",
78+
"metadata": {},
79+
"source": [
80+
"<div class=\"alert alert-danger\">\n",
81+
"**Important note**: 3D-Visualization using VTK is not available if you use Docker to run this exercise. This module is **optional**.\n",
82+
"</div>"
83+
]
84+
},
85+
{
86+
"cell_type": "code",
87+
"execution_count": 3,
88+
"metadata": {},
89+
"outputs": [
90+
{
91+
"name": "stdout",
92+
"output_type": "stream",
93+
"text": [
94+
"3D-Visualization library VTK imported correctly.\n"
95+
]
96+
}
97+
],
98+
"source": [
99+
"try:\n",
100+
" import vtk\n",
101+
" print(\"3D-Visualization library VTK imported correctly.\")\n",
102+
"except: \n",
103+
" print(\"3D-Visualization library VTK not found.\")\n",
104+
" print(\"This module is optional for the 3D visualization of data and geological models.\")"
105+
]
106+
},
107+
{
108+
"cell_type": "markdown",
109+
"metadata": {},
110+
"source": [
111+
"#### remote-geomod"
112+
]
113+
},
114+
{
115+
"cell_type": "code",
116+
"execution_count": 4,
117+
"metadata": {},
118+
"outputs": [
119+
{
120+
"ename": "ModuleNotFoundError",
121+
"evalue": "No module named 'rgeomod'",
122+
"output_type": "error",
123+
"traceback": [
124+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
125+
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
126+
"\u001b[0;32m<ipython-input-4-3de1b9db30ef>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mr\"..\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# append local path to access rgeomod module\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mrgeomod\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Python package remote-geomod imported correctly.\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
127+
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'rgeomod'"
128+
]
129+
}
130+
],
131+
"source": [
132+
"sys.path.append(r\"..\") # append local path to access rgeomod module\n",
133+
"import rgeomod\n",
134+
"print(\"Python package remote-geomod imported correctly.\")"
135+
]
136+
},
137+
{
138+
"cell_type": "markdown",
139+
"metadata": {},
140+
"source": [
141+
"<div class=\"alert alert-danger\">\n",
142+
"**Important note**: If importing `rgeomod` fails, then make sure that you pulled it correctly from github (especially when using the rgeomod-dependencies docker image).\n",
143+
"</div>"
144+
]
145+
},
146+
{
147+
"cell_type": "markdown",
148+
"metadata": {},
149+
"source": [
150+
"#### GemPy\n",
151+
"\n",
152+
"<div class=\"alert alert-danger\">\n",
153+
"**Important note**: Any warnings that occur when loading the library can safely be ignored for the context of the exercise. If you want to get rid of the warning notes, simply execute the cell twice.\n",
154+
"</div>\n"
155+
]
156+
},
157+
{
158+
"cell_type": "code",
159+
"execution_count": 5,
160+
"metadata": {},
161+
"outputs": [
162+
{
163+
"name": "stderr",
164+
"output_type": "stream",
165+
"text": [
166+
"WARNING (theano.configdefaults): install mkl with `conda install mkl-service`: No module named 'mkl'\n"
167+
]
168+
},
169+
{
170+
"name": "stdout",
171+
"output_type": "stream",
172+
"text": [
173+
"3D-Modeling library GemPy imported correctly.\n"
174+
]
175+
},
176+
{
177+
"name": "stderr",
178+
"output_type": "stream",
179+
"text": [
180+
"/anaconda3/envs/remote-geomod/lib/python3.6/site-packages/gempy/UncertaintyAnalysisPYMC2.py:8: UserWarning: pymc (v2) package is not installed. No support for stochastic simulation posterior analysis.\n",
181+
" warnings.warn(\"pymc (v2) package is not installed. No support for stochastic simulation posterior analysis.\")\n"
182+
]
183+
}
184+
],
185+
"source": [
186+
"sys.path.append(\"../../gempy/\")\n",
187+
"sys.path.append(\"../gempy/\")\n",
188+
"import gempy\n",
189+
"print(\"3D-Modeling library GemPy imported correctly.\")"
190+
]
191+
},
192+
{
193+
"cell_type": "markdown",
194+
"metadata": {},
195+
"source": [
196+
"<div class=\"alert alert-danger\">\n",
197+
"If importing `gempy` fails, then check that the relative path is set correctly in `sys.path.append()` above.\n",
198+
"</div>"
199+
]
200+
},
201+
{
202+
"cell_type": "markdown",
203+
"metadata": {},
204+
"source": [
205+
"<div class=\"alert alert-success\">\n",
206+
"If all packages were imported correctly, then you should see `... imported correctly` after executing each cell - and you are good to go with the following exercises! If you get a warning message from gempy, then it can be ignored (you can execute the cell again, then this warning should disappear).\n",
207+
"</div>"
208+
]
209+
},
210+
{
211+
"cell_type": "code",
212+
"execution_count": null,
213+
"metadata": {},
214+
"outputs": [],
215+
"source": []
216+
}
217+
],
218+
"metadata": {
219+
"kernelspec": {
220+
"display_name": "Python 3",
221+
"language": "python",
222+
"name": "python3"
223+
},
224+
"language_info": {
225+
"codemirror_mode": {
226+
"name": "ipython",
227+
"version": 3
228+
},
229+
"file_extension": ".py",
230+
"mimetype": "text/x-python",
231+
"name": "python",
232+
"nbconvert_exporter": "python",
233+
"pygments_lexer": "ipython3",
234+
"version": "3.6.3"
235+
},
236+
"latex_envs": {
237+
"LaTeX_envs_menu_present": true,
238+
"autocomplete": true,
239+
"bibliofile": "biblio.bib",
240+
"cite_by": "apalike",
241+
"current_citInitial": 1,
242+
"eqLabelWithNumbers": true,
243+
"eqNumInitial": 1,
244+
"hotkeys": {
245+
"equation": "Ctrl-E",
246+
"itemize": "Ctrl-I"
247+
},
248+
"labels_anchors": false,
249+
"latex_user_defs": false,
250+
"report_style_numbering": false,
251+
"user_envs_cfg": false
252+
},
253+
"toc": {
254+
"colors": {
255+
"hover_highlight": "#DAA520",
256+
"running_highlight": "#FF0000",
257+
"selected_highlight": "#FFD700"
258+
},
259+
"moveMenuLeft": true,
260+
"nav_menu": {
261+
"height": "123px",
262+
"width": "251px"
263+
},
264+
"navigate_menu": true,
265+
"number_sections": true,
266+
"sideBar": true,
267+
"threshold": 4,
268+
"toc_cell": false,
269+
"toc_section_display": "block",
270+
"toc_window_display": false,
271+
"widenNotebook": false
272+
}
273+
},
274+
"nbformat": 4,
275+
"nbformat_minor": 2
276+
}

0 commit comments

Comments
 (0)