Giter Site home page Giter Site logo

fault-profile-tool-examples's Introduction

fault-profile-tool-examples

Example Jupyter notebooks for use with https://github.com/andy22b/fault-profile-tool

This readme aims to minimize use of the terminal. Anyone familiar with Anaconda in the terminal should be able to implement a few useful shortcuts to the workflow.

Requirements

The code should run on any of Windows, OS X or Linux, through Anaconda3. Anaconda3 can be downloaded from https://www.anaconda.com/products/individual

Installation

  1. Download the example repository (not the main code repo) from GitHub, using the "Download Zip" option from the "Code" dropdown. Unzip it.

image

  1. Open Anaconda Navigator on your computer (e.g. Start menu on Windows). If you have an option, choose a 64-bit edition of Anaconda3.
  2. Navigate to the environments tab, using the button near the top left of the Anaconda Navigator.

image

  1. Click the "Import" button at the bottom of the Anaconda Navigator window.

image

  1. A window like the one shown below will appear. Click the folder icon to browse and select the environment.yml file in the folder that you downloaded and unzipped in step 1.

image

  1. Click "Import" and wait for the relevant modules to install. NOTE that this may take several minutes... Be patient.
  2. Once installation has finished, a new fault-profile-tool environment should appear in the list, with a play button (triangle) next to it:

image

Launching the software

Now the software is installed, you launch it as follow.

  1. If Anaconda Navigator is not open, open it and navigate to the environments tab (steps 2 and 3 of installation).
  2. Click the play button (triangle) next to the fault-profile-tool environment and select Open with Jupyter Notebook.

image

  1. Jupyter notebook will open in your web browser. In it, navigate to the directory where your data are stored (in this case, the Mason River example).

image

NOTES:

  1. For general information on running jupyter notebooks, visit https://jupyter-notebook.readthedocs.io/en/stable/
  2. To use Jupyter on a non-standard or network drive (e.g. the J: drive at GNS), some additional steps are required.

a. Instead of step 2 above, open a terminal.

image

b. In the terminal, type or paste jupyter notebook --notebook-dir J:\_Nat_Hzds_Risks, replacing J:\_Nat_Hzds_Risks with the location of somewhere you actually want to open the notebook. Hit Enter

To close Jupyter notebook when you're done, close the tabs in your web browser and close the terminal that opened at the same time as Jupyter notebook.

Mason River (Hope Fault) example

The example contains a GeoTIFF file (topography for the region of interest) and three shapefiles. One shapefile contains fault traces as lines, and the other two shapefiles contain points (swath profile centres for Example 1) and profile lines (Example 2). All the shapefiles and the geotiff are in NZTM projection (EPSG:2193). It is very important that all these files have the same projection and that the projection is in metres rather than degrees.

Open

Updates to code

Updates to the code will unfortunately be necessary; I hope that they will become less frequent with time. To update, open a terminal using the fault-profile-tool environment in Anaconda navigator, as shown below.

image

In the terminal that opens, paste git+https://github.com/andy22b/fault-profile-tool/#subdirectory=src/fault-profile-tool and hit Enter. This should install the latest version of the tool. Once this is done, close that terminal and close and reopen jupyter notebook (step 2 of Launching the software).

fault-profile-tool-examples's People

Contributors

andy22b avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.