Skip to main content

Plate Model Manager

Project description

plate-model-manager

build workflow PyPI version anaconda_badge platforms downloads

This is a dataset manager for plate tectonic models. It is similar to NPM or Conda for software packages.

How to install

pip install plate-model-manager

How to use

Use the command line

  • pmm ls This command will list all available reconstruction models, such as
    • muller2019
    • muller2022
    • muller2016
    • merdith2021
    • matthews2016
    • matthews2016_mantle_ref
    • matthews2016_pmag_ref
    • domeier2014
    • golonka
    • pehrsson2015
    • paleomap
    • torsvikcocks2017
    • rodinia
    • seton2012
  • pmm ls Muller2019 This command will show the details of model 'Muller2019'.
  • pmm download Muller2019 plate-models-data-dir This command will download model "Muller2019" into a folder 'plate-models-data-dir'.
  • pmm download all This command will download all available models into the current working directory.

Use in Python script

The Python code below prints all available model names.

    # print all available model names
    from plate_model_manager import PlateModelManager

    m_manager = PlateModelManager()
    for name in pm_manager.get_available_model_names():
      print(name)

The Python code below downloads the "Muller2019" model into folder "plate-models-data-dir". The model.get_rotation_model() function returns the rotation file location.

    from plate_model_manager import PlateModelManager

    pm_manager = PlateModelManager()
    model = pm_manager.get_model("Muller2019",data_dir="plate-models-data-dir")
    model.download_all_layers()
    print(model.get_rotation_model())
['plate-models-data-dir/muller2019//Rotations/Muller2019-Young2019-Cao2020.rot']

Examples

This Python module is mostly used in GPlately, GPlates Web Service, PyGPlates Tutorials and GPlates Python Proxy.

A good example of using PlateModelManager with PyGPlates can be found here.

The examples of using PlateModelManager with GPlately:

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

plate-model-manager-1.1.0.tar.gz (30.1 kB view hashes)

Uploaded Source

Built Distribution

plate_model_manager-1.1.0-py3-none-any.whl (33.3 kB view hashes)

Uploaded Python 3

Supported by

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