Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miili committed Oct 30, 2023
1 parent f5b22b4 commit d384ca9
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/components/image_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

For image functions this version of Lassie relies heavily on machine learning pickers delivered by [SeisBench](https://github.com/seisbench/seisbench).

## PhaseNet
## PhaseNet Image Function

!!! abstract "Citation PhaseNet"
Zhu, Weiqiang, and Gregory C. Beroza. "PhaseNet: A Deep-Neural-Network-Based Seismic Arrival Time Picking Method." arXiv preprint arXiv:1803.03211 (2018).
*Zhu, Weiqiang, and Gregory C. Beroza. "PhaseNet: A Deep-Neural-Network-Based Seismic Arrival Time Picking Method." arXiv preprint arXiv:1803.03211 (2018).*
2 changes: 1 addition & 1 deletion docs/components/octree.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Octree

We search the for energy in a 3D octree structure to simultaneously speed up the search and improve the resolution of the localisations.
A 3D space is searched for sources of seismic energy. Lassie created an octree structure which is iteratively refined when energy is detected, to focus on the source' location. This speeds up the search and improves the resolution of the localisations.
1 change: 1 addition & 0 deletions docs/components/station_corrections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Station Corrections
4 changes: 3 additions & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ Check out the `search.json` config file and add your waveform data and velocity
}
```

For more details and information about the component, head over to [details of the modules](components/seismic_data.md).

## Starting the Search
Once happy, start the search with

Once happy, start the lassie CLI.

```sh title="Start earthquake detection"
lassie search search.json
Expand Down
14 changes: 6 additions & 8 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Lassie is an earthquake detection and localisation framework. It combines modern **machine learning phase detection and robust migration and stacking techniques**.

The detector is leveraging [Pyrocko](https://pyrocko.org) and [SeisBench](https://github.com/seisbench/seisbench), it is highly-performant and can scan massive data sets efficiently.
The detector is leveraging [Pyrocko](https://pyrocko.org) and [SeisBench](https://github.com/seisbench/seisbench), it is highly-performant and can search massive data sets for seismic activity efficiently.

!!! note "Citation"
!!! abstract "Citation"
TDB

![Reykjanes detections](images/reykjanes-demo.webp)
Expand All @@ -13,7 +13,6 @@ The detector is leveraging [Pyrocko](https://pyrocko.org) and [SeisBench](https:

## Features


* [x] Earthquake phase detection using machine-learning pickers from [SeisBench](https://github.com/seisbench/seisbench)
* [x] Octree localisation approach for efficient and accurate search
* [x] Different velocity models:
Expand All @@ -25,14 +24,13 @@ The detector is leveraging [Pyrocko](https://pyrocko.org) and [SeisBench](https:
* [x] Ground motion attributes
* [x] Automatic extraction of modelled and picked travel times
* [x] Calculation and application of station corrections / station delay times


* [ ] Real-time analytics on streaming data (e.g. SeedLink)


[Get Started!](getting_started.md){ .md-button }

## Build with

![Pyrocko](https://pyrocko.org/docs/current/_images/pyrocko_shadow.png){height=150 padding=50}
![GFZ](https://www.gfz-potsdam.de/fileadmin/gfz/GFZ.svg){width=150, padding=50}
![SeisBench](https://seisbench.readthedocs.io/en/stable/_images/seisbench_logo_subtitle_outlined.svg){height=100, padding=50}
![Pyrocko](https://pyrocko.org/docs/current/_images/pyrocko_shadow.png){ width="100" }
![SeisBench](https://seisbench.readthedocs.io/en/stable/_images/seisbench_logo_subtitle_outlined.svg){ width="400" padding-right="40" }
![GFZ](https://www.gfz-potsdam.de/fileadmin/gfz/GFZ.svg){ width="100" }
4 changes: 2 additions & 2 deletions docs/visualizing_results.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ The event detections are exported in Lassie-native JSON, Pyrocko YAML format and

## Pyrocko Sparrow

For large data sets use the [Pyrocko Sparrow](https://pyrocko.org) to visualise seismic event detections in 3D. Also seismic stations and many other features from the Pyrocko ecosystem can be integrated.
For large data sets use the [Pyrocko Sparrow](https://pyrocko.org) to visualise seismic event detections in 3D. Also seismic stations and many other features from the Pyrocko ecosystem can be integrated into the view.

![Pyrocko Squirrel EQ Detections](images/squirrel-reykjanes.webp)

## QGIS

Import the `.csv` file into QGIS and render by e.g. the detection semblance or the calculated magnitude.
[QGIS](https://www.qgis.org/) can be used to import `.csv` and explore the data is an interactive fashion. Detections can be rendered by e.g. the detection semblance or the calculated magnitude.

![QGIS EQ Detections](images/qgis-loaded.webp)
11 changes: 5 additions & 6 deletions lassie/station_corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def from_receiver(cls, receiver: Receiver) -> Self:
class StationCorrections(BaseModel):
rundir: DirectoryPath | None = Field(
default=None,
description="The rundir to load the detections from",
description="Lassie rundir to calculate the corrections from.",
)
measure: Literal["median", "average"] = "median"
weighting: ArrivalWeighting = "mul-PhaseNet-semblance"
Expand Down Expand Up @@ -410,8 +410,7 @@ def get_delay(self, station_nsl: NSL, phase: PhaseDescription) -> float:
Returns:
float: The traveltime delay in seconds.
"""

def get_delay() -> float:
if (station_nsl, phase) not in self._traveltime_delay_cache:
try:
station = self.get_station(station_nsl)
except KeyError:
Expand All @@ -425,8 +424,6 @@ def get_delay() -> float:
return station.get_median_delay(phase, self.weighting)
raise ValueError(f"unknown measure {self.measure!r}")

if (station_nsl, phase) not in self._traveltime_delay_cache:
self._traveltime_delay_cache[station_nsl, phase] = get_delay()
return self._traveltime_delay_cache[station_nsl, phase]

def get_delays(
Expand All @@ -443,7 +440,9 @@ def get_delays(
Returns:
np.ndarray: The traveltime delays for the given stations and phase.
"""
return np.array([self.get_delay(nsl, phase) for nsl in station_nsls])
return np.fromiter(
(self.get_delay(nsl, phase) for nsl in station_nsls), dtype=float
)

def save_plots(self, folder: Path) -> None:
folder.mkdir(exist_ok=True)
Expand Down
12 changes: 9 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
site_name: Lassie - Earthquake Detector
site_description: The friendly earthquake detector
site_author: Marius Paul Isken

repo_url: https://github.com/pyrocko/lassie-v2
repo_name: pyrocko/lassie-v2
edit_uri: edit/main/docs/
Expand Down Expand Up @@ -36,11 +38,12 @@ markdown_extensions:
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- admonition
- pymdownx.details
- pymdownx.arithmatex:
generic: true
- pymdownx.tasklist
- md_in_html
- admonition
- attr_list

extra_javascript:
Expand All @@ -66,12 +69,15 @@ plugins:
merge_init_into_class: true

nav:
- 🐕‍🦺 Earthquake Detector:
- Earthquake Detector:
- Welcome: index.md
- Getting Started: getting_started.md
- Visualising Detections: visualizing_results.md
- Components:
- Usage:
- Seismic Data: components/seismic_data.md
- Ray Tracer: components/ray_tracer.md
- Image Function: components/image_function.md
- Octree: components/octree.md
- Station Corrections: components/station_corrections.md
- CLI:
- Interface: cli.md

0 comments on commit d384ca9

Please sign in to comment.