Skip to content

Commit

Permalink
Merge branch 'develop' into bug-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kbspooner authored Aug 16, 2023
2 parents aa0279f + cb44b03 commit a6eb49f
Show file tree
Hide file tree
Showing 231 changed files with 4,887 additions and 1,544 deletions.
84 changes: 44 additions & 40 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
.. image:: figures/tp-logo-header.png
:alt: The ThermoPlotter logo, which looks like "TP"
:target: https://smtg-ucl.github.io/ThermoPlotter/
:alt: The ThermoParser logo, which looks like "TP"
:target: https://smtg-ucl.github.io/ThermoParser/
:align: center

.. code-block::
________
///// \\\\
\________/_______________________________________________________________
|_____ : ___ \
| | | :| \ | | | /
| | |__ __ |___ |_____ __ :|___/ | ___ __|__ __|__ __ |__ \
| | | | / \ | \ | | | / \:| | / \ | | / \ | \ /
| | | | |__/ | | | | | |:| | | | | | |__/ | \_____
| | | | \__ | | | | \__/:| \__ \___/ \__ \__ \__ | :2.3.0\
|_________________________________:______________________________________:_____/
\________/________________________________________________________________
|_____ : ___ \
| | | :| \ /
| | |___ ___ |___ |_____ ___ :|___/ ___ |___ ___ ___ |___ \
| | | | / \ | \ | | | / \:| / | | \ / / \ | \/
| | | | |___/ | | | | | |:| | | | \___ |___/ | \_____
| | | | \___ | | | | \___/:| \___|_ | \ \___ | :3.0.0\
|____________________________________:_______________________/____________:_____/
.. image:: https://travis-ci.com/SMTG-UCL/ThermoPlotter.svg?branch=master
.. image:: https://travis-ci.com/SMTG-UCL/ThermoParser.svg?branch=master
:alt: The travis-ci badge
:target: https://travis-ci.com/SMTG-UCL/ThermoPlotter
:target: https://travis-ci.com/SMTG-UCL/ThermoParser

ThermoPlotter is a toolkit used to simplify the analysis of data
ThermoParser is a toolkit used to simplify the analysis of data
produced by specialist materials science codes, centred around
thermoelectrics, but also useful for anything pertaining to electronic
and/ or phononic transport. ThermoPlotter is a Python library which
and/ or phononic transport. ThermoParser is a Python library which
contains functions for data retrieval, manipulation and plotting, which
can be easily used with a little Python knowlege to generate a wide
array of high-quality plots in only a few lines of code. ThermoPlotter
array of high-quality plots in only a few lines of code. ThermoParser
also contains a suite of command-line tools which can retrieve specific
data, save derived properties and plot graphs in a single command.

Click on the image to go to the `gallery`_!

.. image:: figures/wideband.png
:alt: A phonon dispersion where widened bands show phonon scattering
:target: https://smtg-ucl.github.io/ThermoPlotter/gallery.html
:target: https://smtg-ucl.github.io/ThermoParser/gallery.html

.. _gallery: https://smtg-ucl.github.io/ThermoPlotter/gallery.html
.. _gallery: https://smtg-ucl.github.io/ThermoParser/gallery.html

Installation
------------

ThermoPlotter can easily be installed with git and pip:
ThermoParser can easily be installed with git and pip:

.. code-block:: bash
git clone https://github.com/SMTG-UCL/ThermoPlotter.git
cd ThermoPlotter
git clone https://github.com/SMTG-UCL/ThermoParser.git
cd ThermoParser
pip install .
After installing, you may want to copy ``ThermoPlotter/tprc.yaml`` to
After installing, you may want to copy ``ThermoParser/tprc.yaml`` to
``~/.config/tprc.yaml``, if you want to set your own default axis
labels, unit conversions, default style sheets (two are provided),
other aesthetic alterations and more!
Expand All @@ -66,22 +66,26 @@ longer process is required:
2. ``python3 -m pip install cython numpy``
3. ``brew info hdf5`` to retrieve the path to your hdf5 install
4. ``HDF5_DIR=YOUR_HDF5_PATH --no-build-isolation h5py``
5. ``git clone https://github.com/SMTG-UCL/ThermoPlotter.git``
6. ``cd ThermoPlotter``
5. ``git clone https://github.com/SMTG-UCL/ThermoParser.git``
6. ``cd ThermoParser``
7. ``pip install --user -e .``

Using conda may circumvent this process.

Command Line Usage
------------------
Command Line Interface (CLI)
----------------------------

ThermoPlotter uses `click`_, which has an easily navigable structure
ThermoParser uses `click`_, which has an easily navigable structure
from the command-line, detailed in the `tutorials`_.
The most frequently useful commands are included in the CLI for maximum
ease, including the ``tp get`` functions, which verbosely retrieve data
from files which are normally tiresome and error-prone to navigate; and
most of the simplest plot-types available through the Python interface.

Python Usage
------------
Python Interface
----------------

ThermoPlotter is designed to have four main stages:
ThermoParser is designed to have four main stages:

#. *Axes*:
Pick an axis layout from ``tp.axes``.
Expand All @@ -92,19 +96,19 @@ ThermoPlotter is designed to have four main stages:
#. *Save*:
Use ``plt.savefig`` or equivalent to produce the figure.

As ThermoPlotter is dependent on matplotlib, each stage can be
As ThermoParser is dependent on matplotlib, each stage can be
substituted with bespoke code, e.g. using ``matplotlib.pyplot.subplots``
or ``matplotlib.axes.Axes.scatter``. These can still be supplemented
with ThermoPlotter helper functions, such as default labels which the
with ThermoParser helper functions, such as default labels which the
user can set in ``tp.settings``, colourmap generators in
``tp.plot.colour`` or legend helpers such as ``tp.axes.legend.alphabetise``.

The best way to get a feel for ThermoPlotter is to see it in action:
The best way to get a feel for ThermoParser is to see it in action:
Take a look at our `examples`_ and `tutorials`_. Currently supported
codes are:

.. _examples: https://github.com/smtg-ucl/ThermoPlotter/tree/master/examples
.. _tutorials: https://smtg-ucl.github.io/ThermoPlotter/tutorials.html
.. _examples: https://github.com/smtg-ucl/ThermoParser/tree/master/examples
.. _tutorials: https://smtg-ucl.github.io/ThermoParser/tutorials.html

* Phononic properties:

Expand Down Expand Up @@ -152,10 +156,10 @@ appropriate `examples`_, further `documentation`_ and `tests`_ are greatly
appreciated. Documentation uses the `sphinx`_ package, and can be built from
the ``docs`` directory with ``sphinx-build -b html src/ .``.

.. _issue tracker: https://github.com/smtg-ucl/ThermoPlotter/issues
.. _issue tracker: https://github.com/smtg-ucl/ThermoParser/issues
.. _fork and pull: https://guides.github.com/activities/forking
.. _documentation: https://smtg-ucl.github.io/ThermoPlotter/
.. _tests: https://github.com/smtg-ucl/ThermoPlotter/tree/master/tests
.. _documentation: https://smtg-ucl.github.io/ThermoParser/
.. _tests: https://github.com/smtg-ucl/ThermoParser/tree/master/tests

Testing
-------
Expand All @@ -168,7 +172,7 @@ with ``python3 -m unittest``.
Contributors
------------

Many thanks to all those who contributed code or ideas to ThermoPlotter!
Many thanks to all those who contributed code or ideas to ThermoParser!
Roughly chronologically, they are so far:

* Kieran B. Spooner
Expand All @@ -184,13 +188,13 @@ Roughly chronologically, they are so far:
License
-------

ThermoPlotter is licensed under the GNU Affero General Public License v3
ThermoParser is licensed under the GNU Affero General Public License v3
(AGPLv3).

Requirements
------------

ThermoPlotter uses the following open-source packages:
ThermoParser uses the following open-source packages:

* `click <https://click.palletsprojects.com/en/8.0.x/>`_
* `h5py <http://docs.h5py.org/>`_
Expand Down
19 changes: 19 additions & 0 deletions citation.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cff-version: 1.2.0
message: "If you use ThermoParser, please cite it as below:"
authors:
- family-names: "Spooner"
given-names: "Kieran B."
orcid: "https://orcid.org/0000-0002-4078-3148"
- family-names: "Einhorn"
given-names: "Maud"
orcid: "https://orcid.org/0000-0003-0371-0262"
- family-names: "Davies"
given-names: "Daniel W."
orcid: "https://orcid.org/0000-0003-4094-5992"
- family-names: "Scanlon"
given-names: "David O."
orcid: "https://orcid.org/0000-0001-9174-8601"
title: "ThermoParser: Streamlined Analysis of Thermoelectric Properties"
version: 3.0.0
date-released: 2023-08-16
url: "https://github.com/SMTG-UCL/ThermoParser"
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 8763cfb3d8fdbb00210c4d226bd71e51
config: 0941f3fdcba972ea838af7d173568d7a
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added docs/.doctrees/avg-rates.doctree
Binary file not shown.
Binary file modified docs/.doctrees/contents.doctree
Binary file not shown.
Binary file added docs/.doctrees/cumkappa.doctree
Binary file not shown.
Binary file added docs/.doctrees/dos.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/gallery.doctree
Binary file not shown.
Binary file added docs/.doctrees/heatmaps.doctree
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file added docs/.doctrees/phonons.doctree
Binary file not shown.
Binary file added docs/.doctrees/prophon.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tp.axes.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tp.cli.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tp.data.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tp.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tp.plot.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tp.setup.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-00.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-01.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-02.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-03.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-04.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-05.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorial-06.doctree
Binary file not shown.
Binary file modified docs/.doctrees/tutorials.doctree
Binary file not shown.
Binary file added docs/.doctrees/waterfalls.doctree
Binary file not shown.
Binary file added docs/_images/avg-rates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/cumkappa1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/density.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/dos1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/kappa-target1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/multiphon1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/phonons1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/prophon1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/waterfall1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/wideband1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/ztdiff1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/ztmap1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; ThermoPlotter 2.0.0 documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<title>Overview: module code &mdash; ThermoParser 3.0.0 documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
Expand All @@ -23,7 +23,7 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../contents.html" class="icon icon-home"> ThermoPlotter<img src="../_static/tp-logo.png" class="logo" alt="Logo"/>
<a href="../contents.html" class="icon icon-home"> ThermoParser<img src="../_static/tp-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand All @@ -37,8 +37,8 @@
<li class="toctree-l1"><a class="reference internal" href="../gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#command-line-usage">Command Line Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#python-usage">Python Usage</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#command-line-interface-cli">Command Line Interface (CLI)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#python-interface">Python Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#contributing">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#testing">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#contributors">Contributors</a></li>
Expand All @@ -53,7 +53,7 @@

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../contents.html">ThermoPlotter</a>
<a href="../contents.html">ThermoParser</a>
</nav>

<div class="wy-nav-content">
Expand All @@ -71,6 +71,7 @@
<div itemprop="articleBody">

<h1>All modules for which code is available</h1>
<ul><li><a href="tp.html">tp</a></li>
<ul><li><a href="tp/axes/large.html">tp.axes.large</a></li>
<li><a href="tp/axes/legend.html">tp.axes.legend</a></li>
<li><a href="tp/axes/small.html">tp.axes.small</a></li>
Expand All @@ -89,7 +90,7 @@ <h1>All modules for which code is available</h1>
<li><a href="tp/plot/utilities.html">tp.plot.utilities</a></li>
<li><a href="tp/settings.html">tp.settings</a></li>
<li><a href="tp/setup/vasp.html">tp.setup.vasp</a></li>
</ul>
</ul></ul>

</div>
</div>
Expand All @@ -98,7 +99,7 @@ <h1>All modules for which code is available</h1>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2021, Scanlon Materials Theory Group.</p>
<p>&#169; Copyright 2023, Scanlon Materials Theory Group.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
Expand Down
123 changes: 123 additions & 0 deletions docs/_modules/tp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tp &mdash; ThermoParser 3.0.0 documentation</title><link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../contents.html" class="icon icon-home"> ThermoParser<img src="../_static/tp-logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../gallery.html">Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorials.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#command-line-interface-cli">Command Line Interface (CLI)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#python-interface">Python Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#contributing">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#testing">Testing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#contributors">Contributors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#license">License</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#requirements">Requirements</a></li>
<li class="toctree-l1"><a class="reference internal" href="../modules.html">Python Package</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../contents.html">ThermoParser</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../contents.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="index.html">Module code</a> &raquo;</li>
<li>tp</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<h1>Source code for tp</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;Everything.</span>

<span class="sd">Modules</span>
<span class="sd">-------</span>

<span class="sd"> calculate</span>
<span class="sd"> tools for calculating derived properties and interpolating</span>
<span class="sd"> settings</span>
<span class="sd"> default values and metadata</span>
<span class="sd">&quot;&quot;&quot;</span>

<div class="viewcode-block" id="docstring_replace"><a class="viewcode-back" href="../tp.html#tp.docstring_replace">[docs]</a><span class="k">def</span> <span class="nf">docstring_replace</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">d</span><span class="p">(</span><span class="n">f</span><span class="p">):</span>
<span class="n">f</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="vm">__doc__</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="k">return</span> <span class="n">f</span>
<span class="k">return</span> <span class="n">d</span></div>

<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">settings</span> <span class="c1"># required for other imports, prevents circularity</span>
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">axes</span><span class="p">,</span> <span class="n">calculate</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">plot</span><span class="p">,</span> <span class="n">setup</span><span class="p">,</span> <span class="n">cli</span>
</pre></div>

</div>
</div>
<footer>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023, Scanlon Materials Theory Group.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
Loading

0 comments on commit a6eb49f

Please sign in to comment.