Metadata-Version: 2.1
Name: merph
Version: 1.0.0
Summary: Bayesian methods for inferring mass eruption rate for column height (or vice versa) for volcanic eruptions
Author-email: "Mark J. Woodhouse" <mark.woodhouse@bristol.ac.uk>
License: Copyright 2024 Mark J. Woodhouse
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: Homepage, https://bitbucket.org/markwoodhouse/merph
Project-URL: Bug Tacker, https://bitbucket.org/markwoodhouse/merph/admin/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: matplotlib >=3.7.0
Requires-Dist: numpy >=1.24.0
Requires-Dist: pandas >=1.4.1
Requires-Dist: scipy >=1.8.0
Requires-Dist: click >=4.0
Provides-Extra: nb
Requires-Dist: notebook ; extra == 'nb'

# MERPH #

Bayesian methods for inferring mass eruption rate from column height (or vice versa) for volcanic eruptions

### Introduction ###

*MERPH* uses Bayesian methods to explore the relationship between the mass eruption rate (Q) of a volcanic eruption and the height reached by the volcanic eruption column (H) that is produced.

The mass eruption rate is a quantity that is very important in volcanology and in the dispersion of volcanic ash in the atmosphere, but it is very difficult to measure directly.

Often the mass eruption rate is inferred from observations of the height of the volcanic eruption column, since the eruption column is often much easier to measure.  The eruption column height is linked to the mass eruption rate through the fluid dynamics of turbulent buoyant plumes, but there are often external volcanological and atmospheric effects that contribute and complicate the relationship.

Datasets of the mass eruption rate and eruption column height have been compiled and used to determine an empirical relationship these quantities, using linear regression.  This has then been used to infer the mass eruption rate from the plume height.

*MERPH* goes further, by using Bayesian methods to perform the regression.  Bayesian methods:
* allow us to incorporate a range of *uncertainties* quantitatively into our model;
* provide a meaningful quantitative comparison of different models.

### Main Features ###

*MERPH* is a python package containing MER--Plume height data sets:
     * Sparks
     * Mastin
     * Aubry
     * IVESPA

and tools to perform Bayesian linear regression of the data and posterior prediction.

The package also contains

* example jupyter notebooks to illustrate the use

* a command line interface to perform regression and posterior predicition

---

### Install ###

*MERPH* can be installed from pypi using pip.

It is recommended to create a virtual environment, e.g. with Anaconda/Miniconda (`conda create --name merph "python=3.11"`), and install in the environment.

#### Basic, light-weight set up ####
The basic modules (with no notebooks or app interface) can be installed with `pip install merph`

#### Other features ####
Install with example notebooks using `pip install merph[nb]`

---

### How to use ###

I recommend looking first at the notebook examples, which show how the *MERPH* module can be used.  After installing, the examples can be launched using the command line interface:
`merph-example 1` and `merph-example 2`.

The command `merph` launches a command line interface for basic use.

---

### Dependencies ###

#### Basic, light-weight set up ####
* matplotlib>=3.7.1
* numpy>=1.24.2
* pandas>=1.4.1
* scipy>=1.8.0
* click>=4.0

#### Other features ####

##### Notebooks #####
* notebook

---

### Contacts ###

Mark J. Woodhouse
<mark.woodhouse@bristol.ac.uk>

#### Repository ####
https://bitbucket.org/markwoodhouse/merph

