bruces
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])
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.
Metadata
Release files for bruces 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bruces-0.5.0.tar.gz | 29.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bruces-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 66.1 kB
Release files / bruces-0.5.0.tar.gz
| Download URL | bruces-0.5.0.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4b868cbdfe032ed597c84c3e9c47e280d1123ad79e3fbcfb4e22de8aa61d393
|
|
BLAKE2b-256 checksum How to use checksums |
a81064c5cfc1aa07d134e58517ac460f652db7ef13eac6e7c740387374247b4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / bruces-0.5.0-py3-none-any.whl
| Download URL | bruces-0.5.0-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
521ff7fb9371d8b5a452fb31d18694a25c779f005735bbbc964c8136142559ad
|
|
BLAKE2b-256 checksum How to use checksums |
51f7f502b9032660b58cd4070c01d594e18c2a63b16c6534e15e7d7c58df52ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for bruces 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.