bruces

A bunch of really useful codes for earthquake stuff

https://github.com/keurfonluu/bruces

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.6%) to scientific vocabulary

Keywords

declustering etas python seismology
Last synced: 6 months ago · JSON representation ·

Repository

A bunch of really useful codes for earthquake stuff

Basic Info
  • Host: GitHub
  • Owner: keurfonluu
  • License: other
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 1.26 MB
Statistics
  • Stars: 8
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 8
Topics
declustering etas python seismology
Created over 5 years ago · Last pushed about 3 years ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.rst

bruces
======

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

Inspired by `bruges `__, **bruces** aims to be a collection of lightweight codes/tools for seismology with an emphasis on computational efficiency.

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

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

.. code:: bash

   pip install bruces[full] --user

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

.. code:: bash

   pip install .[full] --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

Example
-------

The following code snippet will decluster a catalog downloaded with `pycsep `__ using the nearest-neighbor method:

.. code-block:: python

   from datetime import datetime

   import csep
   import matplotlib.pyplot as plt

   import bruces

   # Download catalog using pycsep
   catalog = csep.query_comcat(
      start_time=datetime(2008, 1, 1),
      end_time=datetime(2018, 1, 1),
      min_magnitude=3.0,
      min_latitude=35.0,
      max_latitude=37.0,
      min_longitude=-99.5,
      max_longitude=-96.0,
   )

   # Decluster pycsep catalog
   cat = bruces.from_csep(catalog)
   eta_0 = cat.fit_cutoff_threshold()
   catd = cat.decluster(method="thinning", eta_0=eta_0)

   # Display declustering result
   fig, ax = plt.subplots(1, 2, figsize=(12, 6))
   cat.plot_time_space_distances(eta_0=eta_0, eta_0_diag=eta_0, ax=ax[0])
   catd.plot_time_space_distances(eta_0=eta_0, eta_0_diag=eta_0, ax=ax[1])

.. figure:: https://raw.githubusercontent.com/keurfonluu/bruces/4272457d2421697833514c5c08ad6b2ccf105748/.github/sample.svg
   :alt: sample
   :width: 100%
   :align: center

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.

Notice
------

bruces Copyright (c) 2022, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at `IPO@lbl.gov `__.

This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

.. |License| image:: https://img.shields.io/badge/license-BSD--3--Clause-green
   :target: https://github.com/keurfonluu/bruces/blob/master/LICENSE

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

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

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

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

.. |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/27f1025983384885a3ed0f1089d3775e.svg?style=flat
   :target: https://www.codacy.com/gh/keurfonluu/bruces/dashboard?utm_source=github.com&utm_medium=referral&utm_content=keurfonluu/bruces&utm_campaign=Badge_Grade

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

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

.. |Build| image:: https://img.shields.io/github/workflow/status/keurfonluu/bruces/Python%20package
   :target: https://github.com/keurfonluu/bruces

.. |Docs| image:: https://img.shields.io/github/workflow/status/keurfonluu/bruces/Build%20documentation?label=docs
   :target: https://keurfonluu.github.io/bruces/

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: "bruces: A bunch of really useful codes for earthquake stuff"
doi: 10.5281/zenodo.6422572
url: https://github.com/keurfonluu/bruces
license: BSD-3-Clause

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 173
  • Total Committers: 1
  • Avg Commits per committer: 173.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Keurfon Luu k****u@o****m 173

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 11
  • Average time to close issues: N/A
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.64
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • keurfonluu (11)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 86 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
pypi.org: bruces

A bunch of really useful codes for earthquake stuff

  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 86 Last month
Rankings
Dependent packages count: 6.6%
Average: 24.1%
Stargazers count: 25.5%
Downloads: 27.5%
Forks count: 30.5%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 7 months ago

Dependencies

requirements-dev.txt pypi
  • black * development
  • docformatter * development
  • invoke * development
  • isort * development
  • pytest * development
  • pytest-cov * development
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
.github/workflows/doc.yml actions
  • actions/setup-python v4 composite
  • nschloe/action-cached-lfs-checkout v1 composite
  • peaceiris/actions-gh-pages v3 composite
doc/requirements.txt pypi
  • matplotlib *
  • pybtex-apa-style *
  • pycsep *
  • pydata-sphinx-theme *
  • sphinx *
  • sphinx-argparse *
  • sphinx-gallery *
  • sphinxcontrib-bibtex *