Skip to content

Commit

Permalink
[DOC] Converted all notebooks into .py files that can be rendered by …
Browse files Browse the repository at this point in the history
…sphinx-gallery
  • Loading branch information
Leguark committed Apr 19, 2020
1 parent e446caf commit 279bbe9
Show file tree
Hide file tree
Showing 231 changed files with 19,895 additions and 95 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@ docs/build
test/figs

Profiles
notebooks/data/input_data/Claudius/Results_
examples/data/input_data/Claudius/Results_

File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
X,Y,Z,formation
551308.0638427734,7817436.131347656,-9982.79296875,Claudius_fault
551332.5639648438,7817579.006347656,-9904.140625,Claudius_fault
551369.22265625,7817557.0078125,-9829.345703125,Claudius_fault
551392.1899414062,7817380.302246094,-9829.375,Claudius_fault
551295.9052734375,7817601.0048828125,-9978.935546875,Claudius_fault
551263.0708007812,7817619.436035156,-10056.42578125,Claudius_fault
551238.6942138672,7817445.431152344,-10134.3076171875,Claudius_fault
551230.236328125,7817637.8671875,-10133.916015625,Claudius_fault
551263.62109375,7817324.58984375,-10105.4716796875,Claudius_fault
551313.3098144531,7817272.009277344,-10001.0986328125,Claudius_fault
551198.9991455078,7817340.512207031,-10290.7216796875,Claudius_fault
551200.4428710938,7817518.826171875,-10234.3095703125,Claudius_fault
551250.6811523438,7817214.169921875,-10164.8349609375,Claudius_fault
551206.1387939453,7817128.526855469,-10322.6513671875,Claudius_fault
551290.9270019531,7817117.673828125,-10065.6259765625,Claudius_fault
551344.9963378906,7817056.1494140625,-9946.55078125,Claudius_fault
551269.4575195312,7817008.346191406,-10155.7412109375,Claudius_fault
551322.4930419922,7816966.090332031,-10041.7109375,Claudius_fault
551289.2056884766,7816802.7236328125,-10164.2353515625,Claudius_fault
551228.7355957031,7816985.663574219,-10296.001953125,Claudius_fault
551375.7451171875,7816857.3740234375,-9987.642578125,Claudius_fault
551355.7924804688,7816730.1103515625,-10030.49609375,Claudius_fault
551414.2355957031,7816951.4853515625,-9911.6533203125,Claudius_fault
551520.7449951172,7816835.132324219,-9842.5078125,Claudius_fault
551419.0349121094,7816755.515625,-9938.2119140625,Claudius_fault
551497.33984375,7816916.469238281,-9819.5302734375,Claudius_fault
551473.9345703125,7816997.806152344,-9796.5517578125,Claudius_fault
551450.529296875,7817079.143066406,-9773.57421875,Claudius_fault
551383.8768310547,7817231.6875,-9863.8818359375,Claudius_fault
551454.0200195312,7817156.0537109375,-9751.478515625,Claudius_fault
551456.6416015625,7817233.363769531,-9730.7548828125,Claudius_fault
551458.6007080078,7817311.084472656,-9711.509765625,Claudius_fault
551426.5402832031,7817397.7392578125,-9762.8623046875,Claudius_fault
551408.2010498047,7817522.5703125,-9771.2919921875,Claudius_fault
551461.3784179688,7817389.3876953125,-9694.8798828125,Claudius_fault
551454.2790527344,7817438.760253906,-9704.05859375,Claudius_fault
551447.1796875,7817488.1328125,-9713.2373046875,Claudius_fault
551499.1973876953,7816760.854980469,-9855.96875,Claudius_fault
551428.234375,7816643.288574219,-9934.4306640625,Claudius_fault
551378.8187255859,7816599.999511719,-9999.4306640625,Claudius_fault
551477.6499023438,7816686.577636719,-9869.4306640625,Claudius_fault
551342.1833496094,7816599.999511719,-10065.8974609375,Claudius_fault
551290.9747314453,7816698.323730469,-10164.35546875,Claudius_fault
551305.5483398438,7816600.0,-10132.3642578125,Claudius_fault
551245.0620117188,7816742.201660156,-10302.87109375,Claudius_fault
551213.5291748047,7816865.625488281,-10379.919921875,Claudius_fault
551264.8028564453,7816600.0,-10265.0625,Claudius_fault
551247.9504394531,7816600.0,-10346.0361328125,Claudius_fault
551285.1754150391,7816600.0,-10198.712890625,Claudius_fault
551231.0980224609,7816600.0,-10427.009765625,Claudius_fault
551178.1384277344,7816767.62890625,-10531.529296875,Claudius_fault
551214.2456054688,7816600.0,-10507.9833984375,Claudius_fault
551157.58984375,7816967.4248046875,-10509.6181640625,Claudius_fault
551120.8643798828,7816876.406738281,-10653.6484375,Claudius_fault
551175.5936279297,7817065.5888671875,-10429.6123046875,Claudius_fault
551139.4320068359,7817139.765625,-10527.142578125,Claudius_fault
551153.9641113281,7817295.504394531,-10452.296875,Claudius_fault
551102.3103027344,7817208.231933594,-10629.1787109375,Claudius_fault
551108.2183837891,7817019.916503906,-10635.7587890625,Claudius_fault
551085.8785400391,7817331.839355469,-10659.529296875,Claudius_fault
551117.4158935547,7817456.2919921875,-10505.0478515625,Claudius_fault
551051.5262451172,7817257.37890625,-10770.8310546875,Claudius_fault
551044.1201171875,7817395.307128906,-10769.2890625,Claudius_fault
551072.5325927734,7817128.564941406,-10725.423828125,Claudius_fault
551009.4955444336,7817172.916503906,-10920.0,Claudius_fault
551069.0616455078,7816937.451171875,-10782.697265625,Claudius_fault
551015.2289428711,7817077.422363281,-10920.0,Claudius_fault
551084.7166748047,7816720.567871094,-10803.7255859375,Claudius_fault
551142.0057373047,7816732.46875,-10660.8056640625,Claudius_fault
551031.9792480469,7816790.987792969,-10920.0,Claudius_fault
551029.3375244141,7816886.6142578125,-10920.0,Claudius_fault
551036.5262451172,7816695.449707031,-10920.0,Claudius_fault
551080.2843017578,7816600.0,-10846.9560546875,Claudius_fault
551042.9626464844,7816600.0,-10920.0,Claudius_fault
551117.1239013672,7816600.0,-10773.669921875,Claudius_fault
551153.5712890625,7816600.0,-10700.185546875,Claudius_fault
551173.7958984375,7816600.0,-10636.1181640625,Claudius_fault
551194.0206298828,7816600.0,-10572.05078125,Claudius_fault
551021.9738769531,7816981.9970703125,-10920.0,Claudius_fault
551003.8161621094,7817268.414550781,-10920.0,Claudius_fault
550997.1382446289,7817363.837890625,-10920.0,Claudius_fault
551004.0888671875,7817492.404785156,-10851.55859375,Claudius_fault
550987.9814453125,7817459.04296875,-10920.0,Claudius_fault
551020.1965332031,7817525.767089844,-10783.1162109375,Claudius_fault
551036.3039550781,7817559.12890625,-10714.6748046875,Claudius_fault
551076.5969238281,7817462.095703125,-10632.2294921875,Claudius_fault
551051.4537353516,7817602.02734375,-10632.5390625,Claudius_fault
551066.603515625,7817644.92578125,-10550.4033203125,Claudius_fault
551099.2509765625,7817652.19921875,-10466.86328125,Claudius_fault
551160.8074951172,7817503.076171875,-10356.4638671875,Claudius_fault
551131.8984375,7817659.47265625,-10383.3232421875,Claudius_fault
551164.4124755859,7817653.730957031,-10299.95703125,Claudius_fault
551197.1921386719,7817646.529296875,-10216.8203125,Claudius_fault
X,Y,Z,formation
551308.0638427734,7817436.131347656,-9982.79296875,Claudius_fault
551332.5639648438,7817579.006347656,-9904.140625,Claudius_fault
551369.22265625,7817557.0078125,-9829.345703125,Claudius_fault
551392.1899414062,7817380.302246094,-9829.375,Claudius_fault
551295.9052734375,7817601.0048828125,-9978.935546875,Claudius_fault
551263.0708007812,7817619.436035156,-10056.42578125,Claudius_fault
551238.6942138672,7817445.431152344,-10134.3076171875,Claudius_fault
551230.236328125,7817637.8671875,-10133.916015625,Claudius_fault
551263.62109375,7817324.58984375,-10105.4716796875,Claudius_fault
551313.3098144531,7817272.009277344,-10001.0986328125,Claudius_fault
551198.9991455078,7817340.512207031,-10290.7216796875,Claudius_fault
551200.4428710938,7817518.826171875,-10234.3095703125,Claudius_fault
551250.6811523438,7817214.169921875,-10164.8349609375,Claudius_fault
551206.1387939453,7817128.526855469,-10322.6513671875,Claudius_fault
551290.9270019531,7817117.673828125,-10065.6259765625,Claudius_fault
551344.9963378906,7817056.1494140625,-9946.55078125,Claudius_fault
551269.4575195312,7817008.346191406,-10155.7412109375,Claudius_fault
551322.4930419922,7816966.090332031,-10041.7109375,Claudius_fault
551289.2056884766,7816802.7236328125,-10164.2353515625,Claudius_fault
551228.7355957031,7816985.663574219,-10296.001953125,Claudius_fault
551375.7451171875,7816857.3740234375,-9987.642578125,Claudius_fault
551355.7924804688,7816730.1103515625,-10030.49609375,Claudius_fault
551414.2355957031,7816951.4853515625,-9911.6533203125,Claudius_fault
551520.7449951172,7816835.132324219,-9842.5078125,Claudius_fault
551419.0349121094,7816755.515625,-9938.2119140625,Claudius_fault
551497.33984375,7816916.469238281,-9819.5302734375,Claudius_fault
551473.9345703125,7816997.806152344,-9796.5517578125,Claudius_fault
551450.529296875,7817079.143066406,-9773.57421875,Claudius_fault
551383.8768310547,7817231.6875,-9863.8818359375,Claudius_fault
551454.0200195312,7817156.0537109375,-9751.478515625,Claudius_fault
551456.6416015625,7817233.363769531,-9730.7548828125,Claudius_fault
551458.6007080078,7817311.084472656,-9711.509765625,Claudius_fault
551426.5402832031,7817397.7392578125,-9762.8623046875,Claudius_fault
551408.2010498047,7817522.5703125,-9771.2919921875,Claudius_fault
551461.3784179688,7817389.3876953125,-9694.8798828125,Claudius_fault
551454.2790527344,7817438.760253906,-9704.05859375,Claudius_fault
551447.1796875,7817488.1328125,-9713.2373046875,Claudius_fault
551499.1973876953,7816760.854980469,-9855.96875,Claudius_fault
551428.234375,7816643.288574219,-9934.4306640625,Claudius_fault
551378.8187255859,7816599.999511719,-9999.4306640625,Claudius_fault
551477.6499023438,7816686.577636719,-9869.4306640625,Claudius_fault
551342.1833496094,7816599.999511719,-10065.8974609375,Claudius_fault
551290.9747314453,7816698.323730469,-10164.35546875,Claudius_fault
551305.5483398438,7816600.0,-10132.3642578125,Claudius_fault
551245.0620117188,7816742.201660156,-10302.87109375,Claudius_fault
551213.5291748047,7816865.625488281,-10379.919921875,Claudius_fault
551264.8028564453,7816600.0,-10265.0625,Claudius_fault
551247.9504394531,7816600.0,-10346.0361328125,Claudius_fault
551285.1754150391,7816600.0,-10198.712890625,Claudius_fault
551231.0980224609,7816600.0,-10427.009765625,Claudius_fault
551178.1384277344,7816767.62890625,-10531.529296875,Claudius_fault
551214.2456054688,7816600.0,-10507.9833984375,Claudius_fault
551157.58984375,7816967.4248046875,-10509.6181640625,Claudius_fault
551120.8643798828,7816876.406738281,-10653.6484375,Claudius_fault
551175.5936279297,7817065.5888671875,-10429.6123046875,Claudius_fault
551139.4320068359,7817139.765625,-10527.142578125,Claudius_fault
551153.9641113281,7817295.504394531,-10452.296875,Claudius_fault
551102.3103027344,7817208.231933594,-10629.1787109375,Claudius_fault
551108.2183837891,7817019.916503906,-10635.7587890625,Claudius_fault
551085.8785400391,7817331.839355469,-10659.529296875,Claudius_fault
551117.4158935547,7817456.2919921875,-10505.0478515625,Claudius_fault
551051.5262451172,7817257.37890625,-10770.8310546875,Claudius_fault
551044.1201171875,7817395.307128906,-10769.2890625,Claudius_fault
551072.5325927734,7817128.564941406,-10725.423828125,Claudius_fault
551009.4955444336,7817172.916503906,-10920.0,Claudius_fault
551069.0616455078,7816937.451171875,-10782.697265625,Claudius_fault
551015.2289428711,7817077.422363281,-10920.0,Claudius_fault
551084.7166748047,7816720.567871094,-10803.7255859375,Claudius_fault
551142.0057373047,7816732.46875,-10660.8056640625,Claudius_fault
551031.9792480469,7816790.987792969,-10920.0,Claudius_fault
551029.3375244141,7816886.6142578125,-10920.0,Claudius_fault
551036.5262451172,7816695.449707031,-10920.0,Claudius_fault
551080.2843017578,7816600.0,-10846.9560546875,Claudius_fault
551042.9626464844,7816600.0,-10920.0,Claudius_fault
551117.1239013672,7816600.0,-10773.669921875,Claudius_fault
551153.5712890625,7816600.0,-10700.185546875,Claudius_fault
551173.7958984375,7816600.0,-10636.1181640625,Claudius_fault
551194.0206298828,7816600.0,-10572.05078125,Claudius_fault
551021.9738769531,7816981.9970703125,-10920.0,Claudius_fault
551003.8161621094,7817268.414550781,-10920.0,Claudius_fault
550997.1382446289,7817363.837890625,-10920.0,Claudius_fault
551004.0888671875,7817492.404785156,-10851.55859375,Claudius_fault
550987.9814453125,7817459.04296875,-10920.0,Claudius_fault
551020.1965332031,7817525.767089844,-10783.1162109375,Claudius_fault
551036.3039550781,7817559.12890625,-10714.6748046875,Claudius_fault
551076.5969238281,7817462.095703125,-10632.2294921875,Claudius_fault
551051.4537353516,7817602.02734375,-10632.5390625,Claudius_fault
551066.603515625,7817644.92578125,-10550.4033203125,Claudius_fault
551099.2509765625,7817652.19921875,-10466.86328125,Claudius_fault
551160.8074951172,7817503.076171875,-10356.4638671875,Claudius_fault
551131.8984375,7817659.47265625,-10383.3232421875,Claudius_fault
551164.4124755859,7817653.730957031,-10299.95703125,Claudius_fault
551197.1921386719,7817646.529296875,-10216.8203125,Claudius_fault
File renamed without changes.
File renamed without changes.
121 changes: 121 additions & 0 deletions examples/examples/Alesmodel - Plotting sections and maps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: sphinx
# format_version: '1.1'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---

#import warnings
import sys
sys.path.append("../..")

import gempy as gp
import numpy as np
import matplotlib.pyplot as plt
import os

""
path_interf = os.pardir+"/data/input_data/AlesModel/2018_interf.csv"
path_orient = os.pardir+"/data/input_data/AlesModel/2018_orient_clust_n_init5_0.csv"
path_dem = os.pardir+"/data/input_data/AlesModel/_cropped_DEM_coarse.tif"

""
resolution = [100, 100, 100]
extent = np.array([729550.0, 751500.0, 1913500.0, 1923650.0, -1800.0, 800.0])
geo_model = gp.create_model('Alesmodel')
gp.init_data(geo_model, extent = extent, resolution = resolution,
path_i = path_interf,
path_o = path_orient)

""
sdict = {'section1':([732000, 1916000],[745000,1916000],[200,150])}
geo_model.grid.create_section_grid(sdict)

""
print(len(geo_model.orientations.df))
print(len(geo_model.surface_points.df))
print(len(geo_model.surfaces.df))

""
#sorting of lithologies
gp.map_series_to_surfaces(geo_model,{'fault_left':('fault_left'),
'fault_right':('fault_right'),
'fault_lr':('fault_lr'),
'Trias_Series':('TRIAS','LIAS'),
'Carbon_Series':('CARBO'),
'Basement_Series':('basement')},remove_unused_series=True)

""
colordict = {'LIAS':'#015482', 'TRIAS': '#9f0052', 'CARBO':'#ffbe00','basement':'#728f02',
'fault_left':'#2a2a2a','fault_right':'#545454', 'fault_lr': '#a5a391'}
geo_model.surfaces.colors.change_colors(colordict)

""
a = gp.plot.plot_data(geo_model,direction='y')

""
geo_model.rescaling

""
gp.plot.plot_section_traces(geo_model, contour_lines=True, show_all_data=False)

"""
##### Faults
"""

geo_model.set_is_fault(['fault_right', 'fault_left', 'fault_lr'], change_color=True)

""
gp.set_interpolation_data(geo_model,
output=['geology'], compile_theano=True,
theano_optimizer='fast_run', dtype='float64',
verbose=[])

###############################################################################
# ### Topography

geo_model.set_topography(source='gdal', filepath=path_dem)

""
from scipy.spatial import Delaunay
tri=Delaunay(geo_model.grid.topography.values[:,:2])
f = tri.simplices
f

""
geo_model.grid.topography.values_3D.shape, geo_model.grid.topography.values_3D_res.shape, geo_model.grid.topography.values.shape

""
geo_model.surfaces

""
_=gp.compute_model(geo_model, compute_mesh=True, compute_mesh_options={'rescale': True})

""
geo_model.interpolator.theano_graph.n_surfaces_per_series.get_value()

""
geo_model.interpolator.print_theano_shared()

""
gp.plot.plot_section(geo_model, 4, direction='y',show_topo=True, show_data=True, show_faults=True, show_all_data=True)

""
gp.plot.plot_map(geo_model, show_data=False, contour_lines=False)

""
#np.save('Ales_vert3', geo_model.solutions.vertices)
#np.save('Ales_edges3', geo_model.solutions.edges)

""
gp.plot.plot_ar(geo_model)

""

Loading

0 comments on commit 279bbe9

Please sign in to comment.