evodcinv

Inversion of dispersion curves using Evolutionary Algorithms

https://github.com/keurfonluu/evodcinv

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.5%) to scientific vocabulary

Keywords

dispersion geosciences inversion python seismology surface-wave
Last synced: 6 months ago · JSON representation ·

Repository

Inversion of dispersion curves using Evolutionary Algorithms

Basic Info
  • Host: GitHub
  • Owner: keurfonluu
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 101 MB
Statistics
  • Stars: 108
  • Watchers: 7
  • Forks: 34
  • Open Issues: 6
  • Releases: 8
Topics
dispersion geosciences inversion python seismology surface-wave
Created almost 8 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.rst

evodcinv
========

|License| |Stars| |Pyversions| |Version| |Downloads| |Code style: black| |Codacy Badge| |Codecov| |Build| |Docs| |DOI|

**evodcinv** is a Python library to invert surface wave dispersion data (e.g., phase velocity dispersion curves) for an isotropic layered velocity model using Evolutionary Algorithms. It relies on `stochopy `__ for the evolutionary optimizers while forward modeling is heavy-lifted by `disba `__.

.. figure:: https://raw.githubusercontent.com/keurfonluu/evodcinv/master/.github/sample.png
   :alt: sample
   :width: 100%
   :align: center

   Inversion of phase velocity dispersion curve (fundamental mode).

Features
--------

Invertible data curves:

-  Love-wave phase and/or group velocity dispersion curves,
-  Rayleigh-wave phase and/or group velocity dispersion curves,
-  Rayleigh-wave ellipticity (experimental).

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

The recommended way to install **evodcinv** and all its dependencies is through the Python Package Index:

.. code:: bash

   pip install evodcinv --user

Otherwise, clone and extract the package, then run from the package location:

.. code:: bash

   pip install . --user

To test the integrity of the installed package, check out this repository and run:

.. code:: bash

   pytest

Documentation
-------------

Refer to the online `documentation `__ for detailed description of the API and examples.

Alternatively, the documentation can be built using `Sphinx `__:

.. code:: bash

   pip install -r doc/requirements.txt
   sphinx-build -b html doc/source doc/build

Usage
-----

The following example inverts a Rayleigh-wave phase velocity dispersion curve (fundamental mode).

.. code:: python

    from evodcinv import EarthModel, Layer, Curve

    # Initialize model
    model = EarthModel()

    # Build model search boundaries from top to bottom
    # First argument is the bounds of layer's thickness [km]
    # Second argument is the bounds of layer's S-wave velocity [km/s]
    model.add(Layer([0.001, 0.1], [0.1, 3.0]))
    model.add(Layer([0.001, 0.1], [0.1, 3.0]))

    # Configure model
    model.configure(
        optimizer="cpso",  # Evolutionary algorithm
        misfit="rmse",  # Misfit function type
        optimizer_args={
            "popsize": 10,  # Population size
            "maxiter": 100,  # Number of iterations
            "workers": -1,  # Number of cores
            "seed": 0,
        },
    )

    # Define the dispersion curves to invert
    # period and velocity are assumed to be data arrays
    curves = [Curve(period, velocity, 0, "rayleigh", "phase")]

    # Run inversion
    res = model.invert(curves)
    print(res)

Expected output:

.. code-block::

    --------------------------------------------------------------------------------
    Best model out of 501 models (1 run)
  
    Velocity model                                    Model parameters
    ----------------------------------------          ------------------------------
             d        vp        vs       rho                   d        vs        nu
          [km]    [km/s]    [km/s]   [g/cm3]                [km]    [km/s]       [-]
    ----------------------------------------          ------------------------------
        0.0298    0.5033    0.2055    2.0000              0.0298    0.2055    0.4000
        1.0000    2.0586    0.9935    2.0000                   -    0.9935    0.3482
    ----------------------------------------          ------------------------------
  
    Number of layers: 2
    Number of parameters: 5
    Best model misfit: 0.0038
    --------------------------------------------------------------------------------

Contributing
------------

Please refer to the `Contributing
Guidelines `__ to see how you can help. This project is released with a `Code of Conduct `__ which you agree to abide by when contributing.

.. |License| image:: https://img.shields.io/github/license/keurfonluu/evodcinv
   :target: https://github.com/keurfonluu/evodcinv/blob/master/LICENSE

.. |Stars| image:: https://img.shields.io/github/stars/keurfonluu/evodcinv?logo=github
   :target: https://github.com/keurfonluu/evodcinv

.. |Pyversions| image:: https://img.shields.io/pypi/pyversions/evodcinv.svg?style=flat
   :target: https://pypi.org/pypi/evodcinv/

.. |Version| image:: https://img.shields.io/pypi/v/evodcinv.svg?style=flat
   :target: https://pypi.org/project/evodcinv

.. |Downloads| image:: https://pepy.tech/badge/evodcinv
   :target: https://pepy.tech/project/evodcinv

.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat
   :target: https://github.com/psf/black

.. |Codacy Badge| image:: https://img.shields.io/codacy/grade/bd53f27ac85d419d996c434353f08760.svg?style=flat
   :target: https://www.codacy.com/gh/keurfonluu/evodcinv/dashboard?utm_source=github.com&utm_medium=referral&utm_content=keurfonluu/evodcinv&utm_campaign=Badge_Grade

.. |Codecov| image:: https://img.shields.io/codecov/c/github/keurfonluu/evodcinv.svg?style=flat
   :target: https://codecov.io/gh/keurfonluu/evodcinv

.. |DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5775193.svg?style=flat
   :target: https://doi.org/10.5281/zenodo.5775193

.. |Build| image:: https://img.shields.io/github/actions/workflow/status/keurfonluu/evodcinv/ci.yml
   :target: https://github.com/keurfonluu/evodcinv

.. |Docs| image:: https://img.shields.io/github/actions/workflow/status/keurfonluu/evodcinv/doc.yml?label=docs
   :target: https://keurfonluu.github.io/evodcinv/

Owner

  • Name: Keurfon Luu
  • Login: keurfonluu
  • Kind: user
  • Location: Wettingen, Switzerland
  • Company: INTERA Incorporated

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Luu"
  given-names: "Keurfon"
  orcid: "https://orcid.org/0000-0001-7927-0019"
title: "evodcinv: Inversion of dispersion curves using Evolutionary Algorithms"
doi: 10.5281/zenodo.5775193
url: https://github.com/keurfonluu/evodcinv
license: BSD-3-Clause

GitHub Events

Total
  • Issues event: 1
  • Watch event: 27
  • Issue comment event: 1
  • Fork event: 3
Last Year
  • Issues event: 1
  • Watch event: 27
  • Issue comment event: 1
  • Fork event: 3

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 130
  • Total Committers: 2
  • Avg Commits per committer: 65.0
  • Development Distribution Score (DDS): 0.169
Past Year
  • Commits: 31
  • Committers: 1
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Keurfon Luu k****u@o****m 108
theo.rebert t****t@s****m 22
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 15
  • Total pull requests: 10
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 17 hours
  • Total issue authors: 12
  • Total pull request authors: 2
  • Average comments per issue: 5.47
  • Average comments per pull request: 1.2
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ariellellouch (4)
  • xdxal (1)
  • wgajek (1)
  • liaohaiyang1534 (1)
  • marscfeng (1)
  • AriesChen-UPC (1)
  • SorawatSiangpipop (1)
  • jhsa26 (1)
  • mcardenass (1)
  • dylanmikesell (1)
  • 79seismo (1)
  • avinash07guddu (1)
Pull Request Authors
  • keurfonluu (9)
  • th-reb (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 166 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 9
  • Total maintainers: 1
pypi.org: evodcinv

Inversion of dispersion curves using Evolutionary Algorithms

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 166 Last month
Rankings
Forks count: 7.4%
Stargazers count: 8.8%
Dependent packages count: 10.1%
Average: 12.1%
Downloads: 12.5%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

doc/requirements.txt pypi
  • matplotlib *
  • pydata-sphinx-theme *
  • sphinx *
  • sphinx-argparse *
  • sphinx-gallery *
  • sphinxcontrib-bibtex *
requirements-dev.txt pypi
  • black * development
  • docformatter * development
  • invoke * development
  • isort * development
  • pytest * development
  • pytest-cov * development