Installation#

Installing the latest version of Tcplotter from GitHub#

Below you will find the steps to install the latest version of the Tcplotter package from GitHub. If you have difficulty with the installation, we recommend using Binder to create and save plots using Tcplotter.

First, you will need the several items in order to compile the software used for thermochronometer age and closure temperature calculations.

  • cmake

  • a compatible C compiler

  • a compatible C++ compiler

You can find more information about which compilers are able to be used with cmake from the cmake documentation page.

In addition, tcplotter requires on the following Python libraries.

  • numpy

  • matplotlib-base

  • scipy

Once the required Python libraries have been installed, you can download the Tcplotter code from GitHub by visiting the Tcplotter GitHub page, clicking on the Code button on the upper right side of the page, and selecting Download ZIP. After the download completes, you can extract the files using your preferred software.

At this point, you will need to compile the software for calculating the thermochronometer ages using cmake. The details vary for different operating systems, but likely look like something below.

Compiling age prediction codes for macOS, Linux#

Using a terminal, navigate to the directory containing the extracted Tcplotter files and type the following:

cd tcplotter/src
mkdir build && cd build
cmake ..
cmake --build .
cmake --install . --prefix=../bin

Compiling age prediction codes for Windows#

Using a command prompt, navigate to the directory containing the extracted Tcplotter files and type the following:

cd tcplotter
cd src
mkdir build
cd build
cmake -G "MinGW Makefiles" -D CMAKE_CXX_STANDARD=11 -D CMAKE_INSTALL_PREFIX="..\bin"
cmake --build .
cmake --build . --target install

Testing the installation#

At this point you should have a working Tcplotter installation. You can test this by navigating to the base tcplotter directory in a terminal and typing the following:

tcplotter/eu_vs_radius.py

This should produce a contour plot of cooling ages and closure temperatures for a range of effective uranium and grain radius values.

Optional graphical progress bar#

It is possible to enable a graphical progress bar with tcplotter when using it in a Jupyter notebook. This requires the ipywidgets library. ipywidgets can also be installed using conda.

conda install -c conda-forge ipywidgets