Metadata-Version: 2.1
Name: swprepost
Version: 1.0.0
Summary: A Python Package for Surface Wave Inversion Pre- and Post-Processing
Home-page: https://github.com/jpvantassel/swprepost
Author: Joseph P. Vantassel
Author-email: jvantassel@utexas.edu
License: UNKNOWN
Description: # _swprepost_ - A Python Package for Surface Wave Inversion Pre- and Post-Processing
        
        > Joseph P. Vantassel, The University of Texas at Austin
        
        [![DOI](https://zenodo.org/badge/222287042.svg)](https://zenodo.org/badge/latestdoi/222287042)
        [![PyPI - License](https://img.shields.io/pypi/l/hvsrpy)](https://github.com/jpvantassel/swprepost/blob/main/LICENSE.txt)
        [![CircleCI](https://circleci.com/gh/jpvantassel/swprepost.svg?style=svg)](https://circleci.com/gh/jpvantassel/swprepost)
        [![Documentation Status](https://readthedocs.org/projects/swprepost/badge/?version=latest)](https://swprepost.readthedocs.io/en/latest/?badge=latest)
        [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/jpvantassel/swprepost.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/jpvantassel/swprepost/context:python)
        [![Codacy Badge](https://app.codacy.com/project/badge/Grade/150eb75dee3848f5bbfac0d9f2c33644)](https://www.codacy.com/manual/jpvantassel/swprepost?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jpvantassel/swprepost&amp;utm_campaign=Badge_Grade)
        [![codecov](https://codecov.io/gh/jpvantassel/swprepost/branch/main/graph/badge.svg?token=N5kQxjr2RB)](https://codecov.io/gh/jpvantassel/swprepost)
        ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/swprepost)
        
        ## Table of Contents
        
        ---
        
        - [About _swprepost_](#About-swprepost)
        - [A Few Examples](#A-Few-Examples)
        - [Getting Started](#Getting-Started)
        
        ## About _swprepost_
        
        ---
        
        _swprepost_ is a Python package for performing surface wave inversion pre- and
        post-processing. _swprepost_ was developed by Joseph P. Vantassel under the
        supervision of Professor Brady R. Cox at The University of Texas at Austin. The
        package includes 11 class definitions for interacting with the various
        components required for surface wave inversion. It is designed to integrate
        seamlessly with the Dinver module of the popular open-source software Geopsy,
        however has been written in a general manner to ensure its usefulness with other
        inversion programs. Furthermore, some of the class definitions provided such as
        `GroundModel` may even be of use to those working in the Geotechnical or
        Geophysical fields, but who do not perform surface wave inversions.
        
        If you use _swprepost_ in your research or consulting we ask you please cite the
        following:
        
        > Joseph Vantassel. (2020). jpvantassel/swprepost: latest (Concept). Zenodo.
        > http://doi.org/10.5281/zenodo.3839998
        
        _Note: For software, version specific citations should be preferred to general_
        _concept citations, such as that listed above. To generate a version specific_
        _citation for _swprepost_, please use the citation tool for that specific_
        _version on the _swprepost_ [archive](https://doi.org/10.5281/zenodo.3839998)._
        
        For the motivation behind the development of _swprepost_ and its role in a
        larger project focused on developing a complete and rigorous workflow for
        surface wave inversion please refer to and consider citing the following:
        
        > Vantassel, J.P. and Cox, B.R. (2021). SWinvert: a workflow for performing
        > rigorous 1-D surface wave inversions. Geophysical Journal International
        > 224, 1141-1156. https://doi.org/10.1093/gji/ggaa426
        
        ## A Few Examples
        
        All examples presented here can be replicated using the Jupyter notebook titled
        `ReadmeExamples.ipynb` in the `examples` directory.
        
        ### Import 100 ground models in less than 0.5 seconds
        
        ```Python
        time_start = time.perf_counter()
        gm_suite = swprepost.GroundModelSuite.from_geopsy(fname="inputs/from_geopsy_100gm.txt")
        time_stop = time.perf_counter()
        print(f"Elapsed Time: {np.round(time_stop - time_start)} seconds.")
        print(gm_suite)
        ```
        
        ```Bash
        Elapsed Time: 0.0 seconds.
        GroundModelSuite with 100 GroundModels.
        ```
        
        ### Plot the ground models
        
        ```Python
        fig, ax = plt.subplots(figsize=(2,4), dpi=150)
        # Plot 100 best
        label = "100 Best"
        for gm in gm_suite:
            ax.plot(gm.vs2, gm.depth, color="#ababab", label=label)
            label=None
        # Plot the single best in different color
        ax.plot(gm_suite[0].vs2, gm_suite[0].depth, color="#00ffff", label="1 Best")
        ax.set_ylim(50,0)
        ax.set_xlabel("Vs (m/s)")
        ax.set_ylabel("Depth (m)")
        ax.legend()
        plt.show()
        ```
        
        ![100bestvs.svg](figs/100bestvs.svg)
        
        ### Compute and plot their uncertainty
        
        ```Python
        fig, ax = plt.subplots(figsize=(2,4), dpi=150)
        disc_depth, siglnvs = gm_suite.sigma_ln()
        ax.plot(siglnvs, disc_depth, color="#00ff00")
        ax.set_xlim(0, 0.2)
        ax.set_ylim(50,0)
        ax.set_xlabel("$\sigma_{ln,Vs}$")
        ax.set_ylabel("Depth (m)")
        plt.show()
        ```
        
        ![siglnvs.svg](figs/siglnvs.svg)
        
        ## Getting Started
        
        ---
        
        ### Installing or Upgrading _swprepost_
        
        1.  If you do not have Python 3.6 or later installed, you will need to do
        so. A detailed set of instructions can be found
        [here](https://jpvantassel.github.io/python3-course/#/intro/installing_python).
        
        2.  If you have not installed _swprepost_ previously use
        `pip install swprepost`. If you are not familiar with `pip`, a useful tutorial
        can be found [here](https://jpvantassel.github.io/python3-course/#/intro/pip).
        If you have an earlier version and would like to upgrade to the latest version
        of _swprepost_ use `pip install swprepost --upgrade`.
        
        3.  Confirm that `swprepost` has installed/updated successfully by examining the
        last few lines of text displayed in the console.
        
        ### Using _swprepost_
        
        1.  Download the contents of the
          [examples](https://github.com/jpvantassel/swprepost/tree/main/examples)
          directory to any location of your choice.
        
        2.  Explore the Jupyter notebooks in the
          [basic](https://github.com/jpvantassel/swprepost/tree/main/examples/basic)
          directory for a no-coding-required introduction to the _swprepost_ package.
          If you have not installed `Jupyter`, detailed instructions can be found
          [here](https://jpvantassel.github.io/python3-course/#/intro/installing_jupyter).
        
        3.  Move to the [adv](https://github.com/jpvantassel/swprepost/tree/main/examples/adv)
          directory and follow the Jupyter notebook title `example_swinvert_workflow.ipynb` for
          an example application of _swprepost_ to the SWinvert workflow
          (Vantassel and Cox, 2021).
        
        4.  Enjoy!
        
Keywords: surface wave inversion geopsy pre-process post-process dispersion surface waves
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >3.6
Description-Content-Type: text/markdown
Provides-Extra: dev
