Skip to main content

A tool for identifying volcano analogues.

Project description

PyVOLCANS

PyVOLCANS: A Python package to flexibly explore similarities and differences between volcanic systems

The main goal of PyVOLCANS is to help alleviate data-scarcity issues in volcanology, and contribute to developments in a range of topics, including (but not limited to): quantitative volcanic hazard assessment at local to global scales, investigation of magmatic and volcanic processes, and even teaching and scientific outreach. We hope that future users of PyVOLCANS will include any volcano scientist or enthusiast with an interest in exploring the similarities and differences between volcanic systems worldwide. Please visit our wiki pages for more information.

Installation instructions

PyVOLCANS can be installed from PyPI as follows:

pip install pyvolcans

This method adds pyvolcans to the virtual environment PATH so that it can be used from any directory.

API documentation and example usage

Users interact with PyVOLCANS via the command-line tool. The --help command describes the possible options.

$ pyvolcans --help

usage: pyvolcans [-h] [--apriori [APRIORI [APRIORI ...]]]
                 [-Ts TECTONIC_SETTING] [-G ROCK_GEOCHEMISTRY] [-M MORPHOLOGY]
                 [-Sz ERUPTION_SIZE] [-St ERUPTION_STYLE] [--count COUNT] [-w]
                 [-W] [-v] [-pa] [-S] [-V]
                 volcano

positional arguments:
  volcano               Set target volcano name or Smithsonian ID (VNUM)

optional arguments:
  -h, --help            show this help message and exit
  --apriori [APRIORI [APRIORI ...]]
                        Provide one or more a priori analogue volcanoes
  -Ts TECTONIC_SETTING, --tectonic_setting TECTONIC_SETTING
                        Set tectonic setting weight (e.g. '0.2' or '1/5')
  -G ROCK_GEOCHEMISTRY, --rock_geochemistry ROCK_GEOCHEMISTRY
                        Set rock geochemistry weight (e.g. '0.2' or '1/5')
  -M MORPHOLOGY, --morphology MORPHOLOGY
                        Set volcano morphology weight (e.g. '0.2' or '1/5')
  -Sz ERUPTION_SIZE, --eruption_size ERUPTION_SIZE
                        Set eruption size weight (e.g. '0.2' or '1/5')
  -St ERUPTION_STYLE, --eruption_style ERUPTION_STYLE
                        Set eruption style weight (e.g. '0.2' or '1/5')
  --count COUNT         Set the number of top analogue volcanoes
  -w, --write_csv_file  Write list of top analogue volcanoes as .csv file
  -W, --website         Open GVP website for top analogue volcano
  -v, --verbose         Print debug-level logging output, and include single-
                        criterion analogy values, besides the total analogy
                        values, in the PyVOLCANS results
  -pa, --plot_apriori   Generate bar plots displaying the values of single-
                        criterion and total analogy between the target volcano
                        and any 'a priori' analogues chosen by the user.
  -S, --save_figures    Save all generated figures
  -V, --version         Print PyVOLCANS package version and exit

Calling PyVOLCANS with a volcano name returns the 10 top analogue volcanoes:

$ pyvolcans Hekla

Top 10 analogue volcanoes for Hekla, Iceland (372070):
              name       country  smithsonian_id  total_analogy
       Torfajokull       Iceland          372050       0.941676
       Bardarbunga       Iceland          373030       0.921407
      Prestahnukur       Iceland          371070       0.919877
        Langjokull       Iceland          371080       0.915929
           Hengill       Iceland          371050       0.911855
 Brennisteinsfjoll       Iceland          371040       0.907751
        Kverkfjoll       Iceland          373050       0.906833
       Fremrinamar       Iceland          373070       0.905074
           Ecuador       Ecuador          353011       0.901611
     Marion Island  South Africa          234070       0.892960

A comprehensive description of the purpose, input arguments and output variables for each of the functions and methods used by pyvolcans can be found in the source scripts.

Please also visit our wiki pages to find out more details on the usage of PyVOLCANS, as well as several example outputs for different commands.

Community

For users

The best way to get in touch to ask questions, submit bug reports or contribute code is by submitting an issue in this repository.

For developers

To modify the code, first clone the PyVOLCANS repository into your local machine:

git clone https://github.com/BritishGeologicalSurvey/pyvolcans

Then move to the root directory of the project (pyvolcans, which contains the setup.py file - please also check the requirements.txt file for a full list of dependencies in the code), and run the following command to install PyVOLCANS in development mode, preferably within a clean virtual environment:

python -m pip install -e .[dev]

The -e flag makes the files in the current working directory available throughout the virtual environment and, therefore, changes are reflected straight away. With this installation, it is no longer required to set the PYTHONPATH.

The [dev] part installs packages required for development e.g. pytest.

Run tests with:

pytest -v test

Maintainers

PyVOLCANS was created by and is maintained by British Geological Survey Volcanology and Digital Capabilities.

Licence

PyVOLCANS and the associated VOLCANS Matlab scripts are distributed under the LGPL v3.0 licence. Copyright: © BGS / UKRI 2021

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvolcans-1.2.2.tar.gz (9.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvolcans-1.2.2-py3-none-any.whl (9.6 MB view details)

Uploaded Python 3

File details

Details for the file pyvolcans-1.2.2.tar.gz.

File metadata

  • Download URL: pyvolcans-1.2.2.tar.gz
  • Upload date:
  • Size: 9.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pyvolcans-1.2.2.tar.gz
Algorithm Hash digest
SHA256 90463fde3a97fe82542429db4e76349cb84802d6d92c2f571b71a40d964a4845
MD5 4b33f3d1e712d7bf761f4762c66184f1
BLAKE2b-256 d3f87db78fa47f2a24be85f7071f0ca79c791c7885c214c48ae24ed910d1b594

See more details on using hashes here.

File details

Details for the file pyvolcans-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: pyvolcans-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for pyvolcans-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 72bf534af1b36a88b22ef3d838f035941a4d7b8b568f8e87aa027d57db83a439
MD5 1b0596bb7f15b69c3d6582c43aa43719
BLAKE2b-256 68d5473db3d605813419b30febcdab2c85d83b216c1e8a5bc4c53ca9c7721c44

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page