Preface by Simon M. Mudd
This describes some of the python scripts for plotting analyses from LSDTopoTools.
1. Background and Motivation
This documentation describes plotting scripts, written in python that are used to plot output from LSDTopoTools. If you are looking for inforamtion on how to use LSDTopoTools, see our workshop documentation or our full documentation.
The output from LSDTopoTools is compatible with GIS software, so why would we write plotting scripts? The reason is that we want plotting tools that are totally reproducible: if you use our data and scripts you can get exactly the same figures that we get. Our objective is for anyone who reads our papers to be able to produce the exact same publication-ready figures that we had in the paper.
In addition, it can be very annoying to import layers into a GIS repeatedly and have to click loads of buttons selecting formatting, colour schemes, transparancies, etc. These scripts automate that process so you don’t have to do a bunch of clicking.
We aim to use these scripts to compress our workflows, and hope that other users will benefit. One example is our chi mapping methods: in 2014 it took several weeks of concerted effort to get chi maps at a landscape scale and turn them into publication-ready figures. That process now takes a few hours thanks to these scripts.
Our scripts have seen much less development than our acutal analysis code (that is LSDTopoTools) and this documentation reflects the fact that these tools are incomplete. However, if you are a user of LSDTopoTools you can keep checking back and hopefully this documentation will grow through time,
2. Setting up Python
Python is an open source programming language popular with scientists and engineers. You will need to both set up python and install the appropriate packages for our scripts to work. To do this, we use Miniconda, which works on all common operating systems (Linux, Windows and MacOS) and makes installation and updates of python packages very simple.
There are a number of ways to install python but we find miniconda the best because it is lightweight and easy to update (c.f. anaconda, python(x,y)). |
2.1. Setting up Python with Miniconda
Hopefully this will be both simple and painless. You will need to be connected to the internet.
-
Download and install the python 2.7 version of Miniconda for your operating system.
You MUST use python 2.7 because our scripts use a package called GDAL that is not compatible with python 3! -
Once you have installed miniconda, you can go into a powershell (windows) or terminal (MacOS and Linux) and get the other stuff you need:
PS> conda install scipy PS> conda install matplotlib PS> conda install pandas PS> conda install gdal PS> conda install spyder
-
To run Spyder you just type
spyder
at the command line.Spyder needs an older version of a package called PyQt. If spyder doesn’t start correctly, run conda install pyqt=4.10 -f
For Spyder to work you will need a windowing system so you cannot run it through a text-only server. That means if you are using a vagrant machine you should install pyhton on your host computer and not on the vagrant machine. -
Everything should be set up. Yay!!
3. Getting our plotting scripts
Use git!
3.1. Why not put a summary here?
4. Plotting simple rasters
I am going to type stuff here later.