Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev v2 #125

Merged
merged 116 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
ee84900
WIP: init BEM module with BEM engine
hvasbath Jun 19, 2023
d4b0067
bem: added test for BEM engine, now running
hvasbath Jun 20, 2023
aa2981c
WIP allow for mixed source type setups
hvasbath Jun 21, 2023
dff2e7d
bem: refactored parameter bounds into separate module, bem init working
hvasbath Jun 22, 2023
52c5008
added defaults module
hvasbath Jun 22, 2023
7ca4c4a
bem.sources: refactor node points into dataclass
hvasbath Jun 27, 2023
82ef053
bem.sources: use only Origin dataclass and bottom origin
hvasbath Jun 27, 2023
2e66ed0
test: update bem source test
hvasbath Jun 27, 2023
e88f862
config: point2source mapping, added test
hvasbath Jun 28, 2023
d0e5698
utility.split_point: refactored for mixed source type setups
hvasbath Jun 29, 2023
93f9721
bem: WIP on the road to plot geodetic synthetics
hvasbath Jun 29, 2023
62edae3
geodetic: fix latitude longitude ratio plots, weighting, bem source o…
hvasbath Jun 30, 2023
d2d633d
config: mixed source type mapping as object instead of dict
hvasbath Jun 30, 2023
e84203d
bem: convert traction [Pa] to [MPa] to avoid proposal covariance non …
hvasbath Jun 30, 2023
95e814f
bem.sources: DiskBEMSource added outline method for plotting
hvasbath Jun 30, 2023
889761e
plotting.marginals: enable correlation_hist plot for bem mode
hvasbath Jun 30, 2023
623b6d4
beat.clone: working again with bem
hvasbath Jul 1, 2023
4bd73e5
plotting.common: refactored into save_figs and plot_exists functions
hvasbath Jul 3, 2023
e9e2bce
plotting.bem: added slip_distribution_3d for triangular sources
hvasbath Jul 5, 2023
8f2afe6
bem: major fixes to strain to stress conversion
hvasbath Jul 6, 2023
a41e7cc
defaults: use MPa as traction units
hvasbath Jul 10, 2023
8796778
parallel: use multiprocessing context for parallel GPU processes
hvasbath Jul 10, 2023
289f077
plotting.bem: slip_distributino_3d polishing
hvasbath Jul 12, 2023
c4e28bd
parallel: mp context usage
hvasbath Jul 12, 2023
0edbe67
plotting.bem: do not rasterize PatchCollection
hvasbath Jul 12, 2023
046f9d0
bem.sources: refactor ellipse outline, implement ringfault outline
hvasbath Jul 13, 2023
3673b50
bem.sources: flip Disk outline
hvasbath Jul 13, 2023
9e4a663
plotting.common: scale_axes allow for precision argument of axes tick…
hvasbath Jul 13, 2023
5caa57e
beat: introduce environment variable NUM_THREADS
hvasbath Jul 19, 2023
a6e8b61
sampler.pt: delay import of MPI
hvasbath Jul 19, 2023
eb08b96
beat: string conversion nthreads
hvasbath Jul 19, 2023
255194f
pyproject.toml: remove mpi4py dependeny - now optional
hvasbath Jul 19, 2023
066081e
ffi.fault: export_rupture_geometry keep last line for outlines of sub…
hvasbath Sep 11, 2023
afe0037
corrections: enable StrainRateTensor estimation for SARdata
hvasbath Sep 14, 2023
22862a5
bem.sources: refactor to check mesh intersections, return Nan if inte…
hvasbath Oct 4, 2023
5c76116
bem.sources.RingFaultBEMSource make bottom_depth relative to surface …
hvasbath Oct 5, 2023
bb38051
sampler.base: remove CUDA_DEVICE definition in process spawning
hvasbath Oct 5, 2023
6eeb816
bem.sources: check_intersection silence gmsh warnings
hvasbath Oct 5, 2023
946f0d1
bem.sources: add loggin messages to check_intersection
hvasbath Oct 5, 2023
e034d2c
bem.sources: fix logging message
hvasbath Oct 5, 2023
a66ea76
config: fix logging message
hvasbath Oct 5, 2023
24a7d5a
utility: correct deoth_bottom in kmtypes, logging messages
hvasbath Oct 5, 2023
0029b8b
bem.sources: add QuadrangleBEMSource, refactor traction handling
hvasbath Oct 6, 2023
1745fe9
bem.sources: added Rectangular and Curved BEM sources
hvasbath Oct 9, 2023
2332460
bem.sources: RectangularSource fix fault orientation to common Okada …
hvasbath Oct 16, 2023
ffaeb70
plotting.ffi: 3d_slip_distribution added perspective to plot name
hvasbath Oct 16, 2023
8c8c227
README.md: Remove reference to v1.0 docs
hvasbath Nov 21, 2023
96a875e
README.md restructured based on importance
hvasbath Nov 21, 2023
7668944
bem.sources: add outline method RectangularSource
hvasbath Nov 21, 2023
cf01527
bem.base: fixed stress interaction matrix calculation
hvasbath Nov 22, 2023
9aeae9b
ruff formatting and linting
hvasbath Nov 23, 2023
ed4988c
reformatted codebase with ruff
hvasbath Nov 23, 2023
7ca9b13
further cleanup
hvasbath Nov 23, 2023
833ce8a
WIP: adapting new namespace
hvasbath Nov 24, 2023
57783c8
WIP
hvasbath Nov 25, 2023
a00579b
WIP: adapted to Bijection
hvasbath Nov 27, 2023
0af84f7
adjusted to numpy float and bool deprecation, removed old functions
hvasbath Nov 28, 2023
cdf6154
WIP: use cloudpickle to pickle step method, initialize workers global…
hvasbath Nov 29, 2023
bb476d1
WIP metropolis with hypers model sampling
hvasbath Nov 30, 2023
d8f163b
WIP summarizing works ...
hvasbath Dec 2, 2023
98f910e
plotting Adjusted plots to new numpy.atleast_2d format
hvasbath Dec 7, 2023
206a535
bem.sources: Rename major and minor axes to a and b_half_axis
hvasbath Dec 7, 2023
297849b
tests: fixing tests following ruff
hvasbath Dec 7, 2023
27f91e8
bem.sources: refactor Disk to use rake and traction, add normal compo…
hvasbath Dec 8, 2023
cb92e17
gmsh: set multithreading
hvasbath Dec 13, 2023
2d5e8cf
bem: add logging verbosity, str conversion
hvasbath Dec 13, 2023
230c20e
bem: typing and threading def
hvasbath Dec 13, 2023
301ea1f
bem.sources: improve check_source intersction through boolean_union i…
hvasbath Dec 14, 2023
7adc46e
geodetic, bem mode sampling after refactoring
hvasbath Dec 15, 2023
3f59b4a
beat.summarize: remove stray prints
hvasbath Dec 15, 2023
12ebd3b
plotting: add bem mode to plots catalog
hvasbath Dec 15, 2023
9282919
backend.multitrace_to_inference_data remove stray prints
hvasbath Dec 18, 2023
8a0be42
utility: remove stray prints
hvasbath Dec 19, 2023
673d2e1
models.base: refactor to function init_uniform_random
hvasbath Dec 19, 2023
9390222
config, models: refactor init of random_variables
hvasbath Dec 19, 2023
4a30672
heart.get_slowness_taper: raise error if no ray arrivals exist, incre…
hvasbath Dec 21, 2023
f7a0b71
backend: fix multitrace to inference data, requires chains, draws, va…
hvasbath Jan 16, 2024
67d4956
Merge branch 'dev_v2' of github.com:hvasbath/beat into dev_v2
hvasbath Jan 16, 2024
eccf2b3
beat.summarize add clac_derived magnitudes for BEMSources
hvasbath Jan 17, 2024
83937a3
bem.sources: correct area of triangles calculation
hvasbath Jan 17, 2024
efc3065
plotting: enable fuzzy beachball for geodetic data
hvasbath Jan 23, 2024
b07f18f
beat: set nensemble default to 0
hvasbath Jan 23, 2024
7aa73ad
seismic.extract_mt_components: fix multi source compatibility
hvasbath Jan 24, 2024
a22b2dd
models: problem.get_random_point use new pymc draw for rng
hvasbath Jan 24, 2024
2309248
plotting: draw_velocity_models: fix function argument
hvasbath Jan 24, 2024
94ab075
plotting.geodetic.scene_fits fixing plot
hvasbath Jan 25, 2024
d109ec4
heart.init_geodetic_targets: use only local coordinates in targets wi…
hvasbath Jan 25, 2024
7c754d1
cleanup
hvasbath Jan 25, 2024
da2dba4
WIP: debugging ffi mode
hvasbath Jan 26, 2024
e30789b
ffi: running again, tested static
hvasbath Mar 6, 2024
1135a22
github actions: update to node-20 version
hvasbath Mar 6, 2024
2e0d71c
adjust pre-commit action
hvasbath Mar 6, 2024
9d0db2e
workflow: revert to v3 artifact; ruff formatting; setup.py version bump
hvasbath Mar 7, 2024
bb42f2c
WIP fixing tests, getting PT to run
hvasbath Mar 7, 2024
680a7d3
pt: working again in new version
hvasbath Mar 11, 2024
222ae71
tests: fixing tests tbc ...
hvasbath Mar 11, 2024
053c4f5
remove interseismic module and test, fix test_heart
hvasbath Mar 11, 2024
7c57c56
models.geodetic: remove deprecated InterseismicComposite, fix test_la…
hvasbath Mar 11, 2024
e1ee51a
tests: fix test_sampler, refactor resolution based subsampling test
hvasbath Mar 11, 2024
53bcd09
tests/test_models fixed to work with pytensor
hvasbath Mar 12, 2024
9bbf712
WIP tests/test_ffi_gfstacking reformatting needs fix batched_dot chan…
hvasbath Mar 12, 2024
85991f4
tests: test_ffi_gfstacking cleanup and working
hvasbath Mar 13, 2024
5095907
tests: ruffing and cleanup fastsweep, sources, backend, distributed, …
hvasbath Mar 13, 2024
edea915
voronoi: ruffing
hvasbath Mar 13, 2024
3df4de5
docs: updated all installation instructions
hvasbath Mar 14, 2024
c90d43a
backend: update extract_bounds_from_summary to new summary format
hvasbath Mar 14, 2024
043a208
models.geodetic: move get_pyrocko_events to source composite
hvasbath Mar 14, 2024
d4a9ff1
beat: set default of stage_number to -1
hvasbath Mar 15, 2024
450ec08
MixedSourceType, MultiEvent setup compat, utilitíes not fully functional
hvasbath Mar 19, 2024
ecf1404
defaults: fix erroneous Lune Co-latitude defaults
hvasbath Mar 21, 2024
f449bb0
plotting.seismic: extract_mt_components fix for multi-source plotting
hvasbath Mar 22, 2024
9d2d62b
Update CHANGELOG.md
hvasbath Mar 22, 2024
1780058
pyproject.toml: update python version requirements
hvasbath Mar 22, 2024
c9bda18
CHANGELOG.md: remove trailing white-space
hvasbath Mar 22, 2024
85db0bc
plotting.seismic: fix station_var_red_plot for empty multi-event
hvasbath Mar 24, 2024
539972f
beat.summarize: allow summarize --calc_dervied for duplicate varnames
hvasbath Mar 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# Exclude windows-2019

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4


- name: Build wheels
Expand All @@ -30,7 +30,7 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: pre-commit/[email protected].0
python-version: 3.9
- uses: pre-commit/[email protected].1
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ repos:
args: [--unsafe]
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.6
hooks:
- id: codespell
args: [--write-changes, "-L ure,nd,ue,parms,Ue,statics,indexs"]
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to BEAT will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [2.0.0] 24 March 2024
Major new release! Previous project setups are not back-compatible. Supports python3.9+.

Contributors: Hannes Vasyura-Bathke @hvasbath

### Added
- new inference mode: "bem" for Boundary Element Modeling
- allow for multi-source type inference: e.g. MTSource, RectangularSource
- added parameter defaults module and config functionality

### Changed
- using pymc v5 and pytensor instead of pymc v3 and theano --> makes old setups incompatible
- n_sources in config is now list of integers, previous: integer
- source_type to: list of source_types, variable changed to source_types
- adopted ruff linting
- replace nose with pytest testing

## [1.2.5] 24 Mai 2023
Contributors: Hannes Vasyura-Bathke @hvasbath

Expand Down
61 changes: 31 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,38 @@

# Bayesian Earthquake Analysis Tool

If you came looking for the beat package calculating internet time you can find it [here](https://github.com/tonyskapunk/beat).
Documentation of the current version moved to the pyrocko server can be found here:
https://pyrocko.org/beat/

Based on pyrocko, pytensor and pymc

## Tutorials
Step by step points on how to use the tool for several scenarios can be found here:
[Examples](https://pyrocko.org/beat/docs/current/examples/index.html#)

## Citation
If your work results in an publication where you used BEAT we kindly ask you to consider citing the BEAT software package and the related article.:

> Vasyura-Bathke, Hannes; Dettmer, Jan; Steinberg, Andreas; Heimann, Sebastian; Isken, Marius; Zielke, Olaf; Mai, Paul Martin; Sudhaus, Henriette; Jónsson, Sigurjón: The Bayesian Earthquake Analysis Tool. Seismological Research Letters. https://doi.org/10.1785/0220190075

> Vasyura-Bathke, Hannes; Dettmer, Jan; Steinberg, Andreas; Heimann, Sebastian; Isken, Marius; Zielke, Olaf; Mai, Paul Martin; Sudhaus, Henriette; Jónsson, Sigurjón (2019): BEAT - Bayesian Earthquake Analysis Tool. V. 1.0. GFZ Data Services. http://doi.org/10.5880/fidgeo.2019.024


## Support
For substantial issues please use and check the "issues" tab here in the repository.
For common issues please check out the BEAT [FAQ](https://pyrocko.org/beat/docs/current/faq.html).
For smaller issues or short clarifications there is a support [chat](https://hive.pyrocko.org/pyrocko-support/channels/beat). This is provided by the pyrocko project and is accessible after a short account creation.

Finally, there is the option to write an email to:

Hannes Vasyura-Bathke
[email protected]

Andreas Steinberg
[email protected]

Based on pyrocko, theano and pymc3

## Changelog
14 February 2023
Version 1.2.4 is released. Details in the [changelog](https://github.com/hvasbath/beat/blob/master/CHANGELOG.md).

Expand Down Expand Up @@ -34,8 +62,6 @@ New [tutorial](https://pyrocko.org/beat/docs/current/examples/FFI_static_resolut
A new version 1.1.0 is released adding support for multi-segmented fault setups and tensile dislocations.
Checkout the [changelog](https://github.com/hvasbath/beat/blob/master/CHANGELOG.md) for all the details.

Documentation of the current version moved to the pyrocko server can be found here:
https://pyrocko.org/beat/

New [tutorial](https://pyrocko.org/beat/docs/current/examples/Rectangular_tensile.html) on tensile dislocation modeling.

Expand All @@ -49,8 +75,6 @@ current academic system, I had to decide for a delayed release of the documentat
be available provided by someone. Thus, in case you are willing to contribute I would be more than happy to guide/ support
you in writing parts of the documentation for a particular feature-if you want to try it out.

The legacy documentation of beat v1.0. can be found under: https://hvasbath.github.io/beat/

## License
GNU General Public License, Version 3, 29 June 2007

Expand All @@ -61,18 +85,6 @@ BEAT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


## Citation
If your work results in an publication where you used BEAT we kindly ask you to consider citing the BEAT software package and the related article.:

> Vasyura-Bathke, Hannes; Dettmer, Jan; Steinberg, Andreas; Heimann, Sebastian; Isken, Marius; Zielke, Olaf; Mai, Paul Martin; Sudhaus, Henriette; Jónsson, Sigurjón: The Bayesian Earthquake Analysis Tool. Seismological Research Letters. https://doi.org/10.1785/0220190075

> Vasyura-Bathke, Hannes; Dettmer, Jan; Steinberg, Andreas; Heimann, Sebastian; Isken, Marius; Zielke, Olaf; Mai, Paul Martin; Sudhaus, Henriette; Jónsson, Sigurjón (2019): BEAT - Bayesian Earthquake Analysis Tool. V. 1.0. GFZ Data Services. http://doi.org/10.5880/fidgeo.2019.024


## Tutorials
Step by step points on how to use the tool for several scenarios can be found here:
[Examples](https://hvasbath.github.io/beat/examples/index.html)

## Data import
### Geodetic
We recommend to prepare the SAR data (subsampling, data covariance estimation) using KITE (www.pyrocko.org).
Expand Down Expand Up @@ -107,18 +119,7 @@ containing a list of 2 lists:
We invite the users to propose data formats or outputs of specific programs that they would
like to see implemented.

## Support
For substantial issues please use and check the "issues" tab here in the repository.
For common issues please check out the BEAT [FAQ](https://hvasbath.github.io/beat/faq.html).
For smaller issues or short clarifications there is a support [chat](https://hive.pyrocko.org/pyrocko-support/channels/beat). This is provided by the pyrocko project and is accessible after a short account creation.

Finally, there is the option to write an email to:

Hannes Vasyura-Bathke
[email protected]

Andreas Steinberg
[email protected]
P.S.: If you came looking for the beat package calculating internet time you can find it [here](https://github.com/tonyskapunk/beat).

## Contributions
This is an open source project and contributions to the repository are welcome!
Loading
Loading