Skip to content

Commit

Permalink
moment magnitude
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Isken committed Jan 5, 2024
1 parent 03c5026 commit 9e5fdb1
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 83 deletions.
16 changes: 6 additions & 10 deletions src/qseek/magnitudes/moment_magnitude.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
PeakAmplitudesBase,
PeakAmplitudesStore,
)
from qseek.utils import CACHE_DIR, MeasurementUnit
from qseek.utils import CACHE_DIR

if TYPE_CHECKING:
from pyrocko.squirrel import Squirrel
Expand Down Expand Up @@ -52,23 +52,19 @@ def from_store(
raise NotImplementedError


"""
Problems:
* Set the measurement unit for the traces in the selector.
* Set the distance range for the selector.
"""


class MomentMagnitudeExtractor(EventMagnitudeCalculator):
magnitude: Literal["MomentMagnitude"] = "MomentMagnitude"

seconds_before: PositiveFloat = 10.0
seconds_after: PositiveFloat = 10.0
padding_seconds: PositiveFloat = 10.0
quantity: MeasurementUnit = "displacement"

gf_store_dirs: list[DirectoryPath] = [Path(".")]
models: list[PeakAmplitudesBase] = [PeakAmplitudesBase()]

models: list[PeakAmplitudesBase] = Field(
default_factory=list,
description="The peak amplitude models to use.",
)

_stores: list[PeakAmplitudesStore] = PrivateAttr(default_factory=list)

Expand Down
Loading

0 comments on commit 9e5fdb1

Please sign in to comment.