Coder Social home page Coder Social logo

stratigraph's Introduction

stratigraph

stratigraph is a Python package for visualizing and analyzing stratigraphic models. These models ideally have the topographic surfaces through time, not just the stratigraphy, although it is possible to tweak the code so that stratigraphy-only models are visualized. The 3D visualizations rely on Mayavi.

Stratigraphic data can be visualized in time or in space. In the time domain, stratigraph can be used create time-elevation (Barrell) plots and chronostratigraphic (Wheeler) diagrams. For example, here is the stratigraph version of Joseph Barrell's time-elevation plot from 1918:

Wheeler's first chronostratigraphic diagram (Wheeler, 1964) might look something like this:

stratigraph is best suited for more complex datasets, for example the ones derived from experiments where the surface topography is carefully tracked through time. For example, this is a dip section through the deposits of the XES-02 experiment, which was run at St. Anthony Falls Laboratory, University of Minnesota:

The cross section in the upper panel is colored by water depth (not grain size); the lower panel shows the corresponding Wheeler diagram.

stratigraph can also be used to display stratigraphic models in 3D; for example, this is a meandering river model (created with 'meanderpy'):

If you want to show more of the stratigraphy, you can create an 'exploded view':

The four Jupyter notebooks in this folder illustrate the ways stratigraph can be used to visualize stratigraphy.

For more details, see this paper.

Requirements

The following packages are required and will be installed when you install stratigraph.

  • matplotlib
  • numpy
  • mayavi
  • scipy
  • scikit-learn
  • scikit-image
  • Pillow
  • shapely
  • tqdm

To run the Jupyter Notebooks, you will also need jupyter and pandas. See also the requirements.yml file. This file can be used to create a virtual environment.

Installation

First install mayavi according to the installation instructions. You can also install it with Conda: conda install -c conda-forge mayavi.

stratigraph can be installed using pip:

pip install stratigraph

Citing stratigraph

If you use stratigraph in your work, please cite this paper:

Sylvester, Z., Straub, K. M., and Covault, J. A. (2024), Stratigraphy in space and time: A reproducible approach to analysis and visualization, Earth Science Reviews, v. 250, 104706. https://doi.org/10.1016/j.earscirev.2024.104706

stratigraph's People

Contributors

cmspeed avatar kwinkunks avatar zsylvester avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stratigraph's Issues

Add tests

If you plan to continue developing this tool, it's probably a good idea to start adding some tests, at least of the low-level functions. This will help you avoid breaking things that currently work.

The Pytest plugin pytest-mpl might also be useful for benchmarking plots to make sure they do not change too much.

I'd be happy to set up some basic tests which you can build on.

Use dynamic versioning

This will free you from having to remember to change the version in pyproject.toml.

The way to do it is to use setuptools_scm, see for example this example project

#2 already removed it from __init__.py, where its use is considered obsolete because the best way to find the package info is in its metadata.

Add some CI

When you have tests and/or are updating regularly, it will be nice to have automated integration, eg to build the package and run the tests when you push to main.

You can also automate the release process, eg upload to PyPI.

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.