Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anowacki/beamforming.jl
Global seismic array analysis in Julia
https://github.com/anowacki/beamforming.jl
array-seismology beamforming julia seis-jl seismology vespagram
Last synced: 29 days ago
JSON representation
Global seismic array analysis in Julia
- Host: GitHub
- URL: https://github.com/anowacki/beamforming.jl
- Owner: anowacki
- License: other
- Created: 2020-03-20T21:36:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-26T12:19:54.000Z (about 1 month ago)
- Last Synced: 2024-11-26T13:26:08.664Z (about 1 month ago)
- Topics: array-seismology, beamforming, julia, seis-jl, seismology, vespagram
- Language: Julia
- Homepage:
- Size: 1.26 MB
- Stars: 11
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Beamforming
Beamforming is a Julia module for the array analysis of seismic
data, using [Seis.jl](https://github.com/anowacki/Seis.jl).## Build status
[![Build Status](https://github.com/anowacki/Beamforming.jl/workflows/CI/badge.svg)](https://github.com/anowacki/Beamforming.jl/actions)
[![codecov](https://codecov.io/gh/anowacki/Beamforming.jl/branch/master/graph/badge.svg?token=d0ePcA1m54)](https://codecov.io/gh/anowacki/Beamforming.jl)## Installation
```julia
julia> ] # press ']' to enter pkg mode(v1.7) pkg> add https://github.com/anowacki/Geodesics.jl https://github.com/anowacki/Seis.jl https://github.com/anowacki/Beamforming.jl
```Beamforming.jl requires Julia v1.6 or above.
## Usage overview
The main functions exported are:
- For traditional beamforming:
- `array_response`: Compute the array response function for a set
of stations
- `beamform`: Compute the beam power across a grid of slowness points
(as in f–k analysis)
- `vespagram`: Compute a slowness vespagram
- For cross-correlation beamforming:
- `crosscorrelation_array_response`
- `crosscorrelation_beamform`Docstrings are exhaustive, and can be consulted for usage of these
functions. To bring up docstrings in the REPL, type `?` followed
by the name of the function and press return.### Array response
The array response for a set of stations can be computed like so:
```julia
using Beamforming, Seis
t = sample_data(:array); # 60 UK stations
# Array response parameters
arf = array_response(t,
5, # Maximum slowness in s/°
0.1, # Slowness grid spacing
0.1, # Minimum frequency in Hz
1, # Maximum frequency
0.1, # Frequency spacing
true # `true` for s/° slowness; `false` for s/km
)
plot(arf, powscale=:dB) # If Plots is installed
```
![](doc/images/array_response.svg)### Beamforming
Beamforming can be performed like so:
```julia
bf = beamform(t,
1100, # Start time in s
1160, # End time in s
-1, # Minimum east slowness in s/°
0.5, # Maximum east slowness
0, # Minimum north slowness
4, # Maximum north slowness
0.01 # Slowness spacing
)
plot(bf, phases=["PKiKP", "PKIKP"])
```
![](doc/images/beamforming.svg)### Vespagrams
Compute a vespagram like so:
```julia
vesp = vespagram(t,
1110, # Start time in s
1150, # End time
0, # Minimum slowness in s/°
4, # Maximum slowness
0.01, # Slowness spacing
)
plot(vesp, phases=["PKiKP", "PKIKP"], clim=(-1,1))
```
![](doc/images/vespagram.svg)## Optional extras
### Plotting
If you have installed Plots to your environment, then you can easily
create plots as shown above.For more help on plotting commands provided in this package, call up
the online help for `Beamforming.plot`:```julia
help?> Beamforming.plot
```### Travel times
To plot the predicted location in slowness and time of arrivals,
you can install [SeisTau.jl](https://github.com/anowacki/SeisTau.jl).
(See the [installation notes](https://github.com/anowacki/SeisTau.jl#installation) for more.)Simply do `using SeisTau`, then the `phases` option to `plot` will
enable easy predicted phase arrival plotting for `BeamformGrid`s
and `VespaGrid`s, produced respectively by `beamform` and
`vespagram`.