Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ in the top level folder of this repository(pygplates-tutorials)
`` docker run -it --rm -p 8888:8888 -v `pwd`:/workspace gplates/pygplates-tutorials ``

Note that this sets up Docker to display notebooks in your current working directory (where you cloned or downloaded the Github repository).
Also note: 'pwd' may be replaced with the full path to local project repo if there is an issue with docker run command, in particular if no files show up in localhost web GUI of jupyter workspace

### Step 4: Open the notebooks in a web browser

Expand Down
6 changes: 3 additions & 3 deletions libs/tut.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import plate_tectonic_utils, velocity_utils

data_root = 'Data/workshop/'
data_root = '../data/workshop/'
coastlines_filename = data_root+'Coastlines/Global_coastlines_2015_v1_low_res.shp'
continental_polygons_filename = data_root+'ContinentalPolygons/Seton_etal_ESR2012_ContinentalPolygons_2012.1.gpmlz'
topology_filenames = []
Expand Down Expand Up @@ -49,7 +49,7 @@ def __init__(self):
self.anchor_plate = 0
self.delta_time = 5.
Path("./tmp").mkdir(parents=True, exist_ok=True)
if not os.path.isdir('Data'):
if not os.path.isdir('../data'):
raise Exception('The Data folder is not found! Try `ln -s ../data Data` in the "notebooks" folder.')


Expand Down Expand Up @@ -353,7 +353,7 @@ def plot_layers(self, layers, ax):


def plot_earthquakes(self, ax, minmag=0.0, maxmag=100.0):
earthquakes = pygplates.FeatureCollection('Data/workshop/Earthquakes/earthquakes_new1.shp')
earthquakes = pygplates.FeatureCollection('../data/workshop/Earthquakes/earthquakes_new1.shp')

cm = plt.cm.get_cmap('gnuplot')

Expand Down
8 changes: 4 additions & 4 deletions notebooks/pygplates-getting-started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
],
"source": [
"# Names of input rotation file\n",
"input_rotation_filename = 'Data/Seton_etal_ESR2012_2012.1.rot'\n",
"input_rotation_filename = '../data/Seton_etal_ESR2012_2012.1.rot'\n",
"\n",
"# Input parameters to define how the reconstruction is made\n",
"reconstruction_time = 40.\n",
Expand Down Expand Up @@ -94,15 +94,15 @@
"outputs": [],
"source": [
"# Names of input files\n",
"input_feature_filename = 'Data/Seton_etal_ESR2012_Coastlines_2012.1_Polygon.gpmlz'\n",
"input_rotation_filename = 'Data/Seton_etal_ESR2012_2012.1.rot'\n",
"input_feature_filename = '../data/Seton_etal_ESR2012_Coastlines_2012.1_Polygon.gpmlz'\n",
"input_rotation_filename = '../data/Seton_etal_ESR2012_2012.1.rot'\n",
"\n",
"# Input parameters to define how the reconstruction is made\n",
"reconstruction_time = 120.6\n",
"anchor_plate = 0\n",
"\n",
"# Name of ouput file\n",
"output_reconstructed_feature_filename = '/tmp/tmp.shp'\n",
"output_reconstructed_feature_filename = './tmp/tmp.shp'\n",
"\n",
"# Use pygplates to carry out the reconstruction \n",
"pygplates.reconstruct(input_feature_filename, input_rotation_filename, output_reconstructed_feature_filename, \n",
Expand Down