GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - keurfonluu/bruces: A bunch of really useful codes for earthquake stuff

BranchesTags
Open more actions menu

Latest commit

 

History

184 Commits
184 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bruces
bruces
 
 
doc
doc
 
 
examples
examples
 
 
tests
tests
 
 
.bandit
.bandit
 
 
.codacy.yml
.codacy.yml
 
 
.coveragerc
.coveragerc
 
 
.gitignore
.gitignore
 
 
.isort.cfg
.isort.cfg
 
 
.prospector.yml
.prospector.yml
 
 
CITATION.cff
CITATION.cff
 
 
CODE_OF_CONDUCT.rst
CODE_OF_CONDUCT.rst
 
 
CONTRIBUTING.rst
CONTRIBUTING.rst
 
 
LICENSE
LICENSE
 
 
README.rst
README.rst
 
 
pyproject.toml
pyproject.toml
 
 
requirements-dev.txt
requirements-dev.txt
 
 
setup.cfg
setup.cfg
 
 
tasks.py
tasks.py
 
 

Repository files navigation

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:

pip install bruces[full] --user

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

pip install .[full] --user

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

pytest

Documentation

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

Alternatively, the documentation can be built using Sphinx:

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:

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])
sample

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 [email protected].

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.

About

A bunch of really useful codes for earthquake stuff

Topics

declusteringetaspythonseismology

Resources

Readme
License

Contributing

Contributing
Activity

Stars

15 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.