Skip to content

Station corrections

Station corrections add a delay to the modeled travel times of a station. They account for what the velocity model misses, e.g. the local geology below a station. Corrected travel times line up the phase arrivals better: the locations get more precise, and the stack detects more events.

Corrections Delay Source
SimpleCorrections Per station and phase You give the delays
StationCorrections Per station and phase (SST) Extracted from a previous run
SourceSpecificStationCorrections Per station, phase and source location (SSST) Extracted from a previous run

station_corrections takes the corrections, or the path to a directory with a corrections.json file.

Extract corrections from a previous run

The extracted corrections are statistics of the travel time residuals, the differences between the picked and the modeled arrival times of a previous search:

  1. Run a search without corrections. Its run directory holds the detections with their picks.
  2. Add the corrections to the configuration, with the run directory of the first search in import_rundirs.
  3. Run the search again. Qseek extracts the corrections when it starts and applies them to the travel times.
Station corrections from a previous run
"station_corrections": {
  "corrections": "StationCorrections",
  "import_rundirs": ["my-search/"]
}

Constant corrections

Constant delays per station and phase, in seconds. Stations and phases without an entry are not corrected.

Constant station corrections
"station_corrections": {
  "corrections": "SimpleCorrections",
  "stations": {
    "GE.RUE.": {"cake:P": 0.12, "cake:S": 0.2}
  }
}

SimpleCorrections pydantic-model

Bases: TravelTimeCorrections

Constant travel time corrections per station and phase.

The station delays are added to the modeled travel times of all source locations.

Fields:

stations pydantic-field

stations: dict[NSL, dict[PhaseDescription, float]] = {}

Travel time delay in seconds per station and phase, e.g. {"GE.RUE.": {"cake:P": 0.12, "cake:S": 0.2}}. Stations and phases without an entry are not corrected.

get_subclasses classmethod

get_subclasses() -> tuple[type[TravelTimeCorrections], ...]

Get the subclasses of this class.

Returns:

Type Description
tuple[type[TravelTimeCorrections], ...]

tuple[type]: The subclasses of this class.

prepare async

prepare(
    stations: StationInventory,
    octree: Octree,
    phases: Iterable[PhaseDescription],
    rundir: Path,
) -> None

Prepare the station for the corrections.

Parameters:

Name Type Description Default
stations Stations

The station to prepare.

required
octree Octree

The octree to use for the preparation.

required
phases Iterable[PhaseDescription]

The phases to prepare the station for.

required
rundir Path

The run directory of the search.

required

Station-specific corrections

Station-specific corrections (SST) are one delay per station and phase, extracted from the travel time residuals of all detections of the previous runs.

Station delay statistics

Statistics of the station delay times.

StationCorrections
{
  "corrections": "StationCorrections",
  "import_rundirs": [
    "."
  ],
  "plot_corrections": false,
  "statistic": "median",
  "weighting": "mul-confidence-semblance",
  "min_num_station_picks": 50,
  "min_distance_border": 500.0,
  "min_num_picks": 3
}

StationCorrections pydantic-model

Bases: TravelTimeCorrections

Static station travel time corrections.

Fields:

import_rundirs pydantic-field

import_rundirs: list[DirectoryPath] = [Path('.')]

Path to rundir, to extract the station corrections from.

plot_corrections pydantic-field

plot_corrections: bool = False

Plot the station corrections statistics.

statistic pydantic-field

statistic: ArrivalStatistic = 'median'

Arithmetic measure for the traveltime delays. Choose from median and average.

weighting pydantic-field

weighting: WeightingMethod = 'mul-confidence-semblance'

Weighting of the traveltime delays. Choose from none, confidence, semblance, add-confidence-semblance and mul-confidence-semblance.

min_num_station_picks pydantic-field

min_num_station_picks: PositiveInt = 50

Minimum number of picks at a station required to calculate station corrections.

min_distance_border pydantic-field

min_distance_border: float = 500.0

Minimum event distance from the border of the octree grid.

min_num_picks pydantic-field

min_num_picks: PositiveInt = 3

Minimum number of picks per event to be included in the statistics.

get_subclasses classmethod

get_subclasses() -> tuple[type[TravelTimeCorrections], ...]

Get the subclasses of this class.

Returns:

Type Description
tuple[type[TravelTimeCorrections], ...]

tuple[type]: The subclasses of this class.

get_delay

get_delay(
    station_nsl: NSL,
    phase: PhaseDescription,
    node: Node | None = None,
) -> float

Get the traveltime delay for a station and phase.

The delay is the difference between the observed and predicted traveltime.

Parameters:

Name Type Description Default
station_nsl NSL

The station NSL.

required
phase PhaseDescription

The phase description.

required
node Node | None

The node to get the delay for. Is ignored for these median and average delays.

None

Returns:

Name Type Description
float float

The traveltime delay in seconds.

get_delays async

get_delays(
    station_nsls: Sequence[NSL],
    phase: PhaseDescription,
    nodes: Sequence[Node] = (),
) -> ndarray

Get the traveltime delays for a set of stations and a phase.

Parameters:

Name Type Description Default
station_nsls Sequence[NSL]

The stations to get the delays for.

required
phase PhaseDescription

The phase to get the delays for.

required
nodes Sequence[Node]

The nodes to get the delays for. Is ignored for these median and average delays.

()

Returns:

Type Description
ndarray

np.ndarray: The traveltime delays for the given stations and phase.

prepare async

prepare(
    stations: Stations,
    octree: Octree,
    phases: Iterable[PhaseDescription],
    rundir: Path,
) -> None

Prepare the station corrections for the console.

Source-specific corrections

Source-specific station corrections (SSST) vary with the source location. The delays are calculated on a grid of octree nodes, at the level set by resolution_octree_level, from the weighted travel time residuals of the events within a Gaussian sphere around each node. Between the nodes the delays are interpolated.

Source specific corrections volume

Delay volume of a single station.

SourceSpecificStationCorrections
{
  "corrections": "SourceSpecificStationCorrections",
  "import_rundirs": [],
  "weighting": "mul-confidence-semblance",
  "min_confidence": 10.0,
  "min_distance_border": 500.0,
  "min_num_picks": 6,
  "max_rms": 0.6,
  "spatial_weighting_exponent": 3.0,
  "resolution_octree_level": 0,
  "delay_statistic": "weighted-median",
  "delay_interpolation_method": "linear",
  "export_stations": []
}

SourceSpecificStationCorrections pydantic-model

Bases: TravelTimeCorrections

Source specific station corrections, spatial travel time corrections.

Fields:

import_rundirs pydantic-field

import_rundirs: list[DirectoryPath]

Path to rundir, to extract the station corrections from.

weighting pydantic-field

weighting: WeightingMethod = 'mul-confidence-semblance'

Weighting of the traveltime delays. Choose from none, confidence, semblance, add-confidence-semblance and mul-confidence-semblance.

min_confidence pydantic-field

min_confidence: PositiveFloat = 10.0

Minimum cumulative pick confidence defining sigma of the Gaussian sphere surrouding the node. Distance sigma will start withresolution_octree_level until min_confidence is reached. Individually for each node-station combination.

min_distance_border pydantic-field

min_distance_border: float = 500.0

Minimum event distance from the border of the octree grid.

min_num_picks pydantic-field

min_num_picks: PositiveInt = 6

Minimum number of picks per event to be included in the statistics. Higher values will result in fewer events.

max_rms pydantic-field

max_rms: float = 0.6

Maximum RMS of the travel time residuals for a station to be included.

spatial_weighting_exponent pydantic-field

spatial_weighting_exponent: float = 3.0

The exponent of the spatial weighting function around the sphere.

resolution_octree_level pydantic-field

resolution_octree_level: int = 0

The octree level (resolution) to use for the station corrections. This is the SSST grid spacing.

delay_statistic pydantic-field

delay_statistic: DelayStatistic = 'weighted-median'

Statistical delay aggregation method.

delay_interpolation_method pydantic-field

delay_interpolation_method: InterpolationMethod = 'linear'

The interpolation method to use for interpolating delays between nodes.

export_stations pydantic-field

export_stations: list[NSL]

List of station NSLs for which debug information will be generated, this includes CSV and VTK files with the station corrections and statistics about the delay

get_subclasses classmethod

get_subclasses() -> tuple[type[TravelTimeCorrections], ...]

Get the subclasses of this class.

Returns:

Type Description
tuple[type[TravelTimeCorrections], ...]

tuple[type]: The subclasses of this class.

load_volumes

load_volumes(path: Path) -> None

Load the station correction volumes (.qssst) from a directory.

Parameters:

Name Type Description Default
path Path

The path to the directory to load the station corrections from.

required

create_volumes

create_volumes(
    stations: list[tuple[Station, PhaseDescription]],
    octree: Octree,
    export_dir: Path,
) -> list[StationCorrectionVolume]

Create a new source specific station correction.

Parameters:

Name Type Description Default
station

The station to prepare.

required
octree Octree

The octree to use for the preparation.

required
phase

The phase to prepare the station for.

required

add_volume

add_volume(volume: StationCorrectionVolume) -> None

Add a volume to the station corrections.

Parameters:

Name Type Description Default
phase

The phase of the volume.

required
station

The station of the volume.

required
volume StationCorrectionVolume

The volume to add.

required

get_volume

get_volume(
    station_nsl: NSL, phase: PhaseDescription
) -> StationCorrectionVolume

Get the volume for a station and phase.

Parameters:

Name Type Description Default
phase PhaseDescription

The phase of the volume.

required
station

The station of the volume.

required

Returns:

Name Type Description
StationCorrectionVolume StationCorrectionVolume

The volume.

has_volume

has_volume(
    station_nsl: NSL | Station, phase: PhaseDescription
) -> bool

Check if the volume for a station and phase exists.

Parameters:

Name Type Description Default
phase PhaseDescription

The phase of the volume.

required
station

The station of the volume.

required

Returns:

Name Type Description
bool bool

True if the volume exists, False otherwise.

get_delay

get_delay(
    station_nsl: NSL, phase: PhaseDescription, node: Node
) -> float

Get the traveltime delay for a station and phase.

The delay is the difference between the observed and predicted traveltime.

Parameters:

Name Type Description Default
station_nsl NSL

The station NSL.

required
phase PhaseDescription

The phase description.

required

Returns:

Name Type Description
float float

The traveltime delay in seconds.

get_delays async

get_delays(
    station_nsls: Sequence[NSL],
    phase: PhaseDescription,
    nodes: Sequence[Node],
) -> ndarray

Get the traveltime delays for a set of stations and a phase.

Parameters:

Name Type Description Default
station_nsls Sequence[NSL]

The stations to get the delays for.

required
phase PhaseDescription

The phase to get the delays for.

required
octree

The octree to use for the delays.

required

Returns:

Type Description
ndarray

np.ndarray: The traveltime delays for the given stations and phase of shape is n_nodes X n_stations