diff --git a/README.md b/README.md index 47a65e8..b515201 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/libs/tut.py b/libs/tut.py index 039096c..81998b2 100644 --- a/libs/tut.py +++ b/libs/tut.py @@ -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 = [] @@ -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.') @@ -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') diff --git a/notebooks/pygplates-getting-started.ipynb b/notebooks/pygplates-getting-started.ipynb index eb0417d..6aee77f 100644 --- a/notebooks/pygplates-getting-started.ipynb +++ b/notebooks/pygplates-getting-started.ipynb @@ -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", @@ -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",