Skip to content

Conventions

These formats apply to all fields of the configuration.

Paths

Paths are absolute or relative to the directory where you start qseek. Start the search in the directory of the configuration file, so that relative paths in the configuration point to the right files. Qseek checks that every given file and directory exists when it reads the configuration.

Units

Distances, depths and elevations are in meters, times in seconds, frequencies in Hz. Depth is positive down.

Date and time

Dates and times follow ISO 8601 and need a time zone, e.g. Z or +00:00 for UTC. A date without a time is midnight UTC. "now", "today" and "yesterday" are also valid.

Dates and times
{
  "start_time": "2023-10-28T01:21:21.003Z",
  "end_time": "2023-10-29"
}

Durations

Durations follow ISO 8601 as well: "PT5M" is 5 minutes, "PT600S" 600 seconds, "PT1H30M" one and a half hours.

Station codes

Stations are identified by their network, station and location code (NSL), written as "<network>.<station>.<location>", e.g. "6A.STA13.00". The location code is often empty: "GE.RUE.". Network and location codes have up to two characters, station codes up to five.

Where a field selects stations, such as the blacklist of the stations, partial codes and wildcards match several stations: "6A." matches the whole network, "6A.STA*" all stations starting with STA.

Phase descriptions

A phase description names a phase of a ray tracer as "<tracer>:<phase>", e.g. "cake:P", "fm:S" or "constant:P". The phase_map of the image function assigns its P and S images to these phase descriptions, and every phase needs a ray tracer that calculates its travel times.

Locations

A location is a geographic reference, lat and lon in degrees, plus a shift to the east and north in meters. The search volume and the velocity models are placed with locations.

Location
{
  "lat": 52.3825,
  "lon": 13.0644,
  "east_shift": 0.0,
  "north_shift": 0.0,
  "elevation": 0.0,
  "depth": 0.0
}

Location pydantic-model

Bases: BaseModel

A geographic location with a relative shift.

The location is the geographic reference lat, lon plus a shift in meters to the east and north. Elevation and depth are in meters.

Fields:

lat pydantic-field

lat: float

Latitude in degrees.

lon pydantic-field

lon: float

Longitude in degrees.

east_shift pydantic-field

east_shift: float = 0.0

East shift towards geographical reference in meters.

north_shift pydantic-field

north_shift: float = 0.0

North shift towards geographical reference in meters.

elevation pydantic-field

elevation: float = 0.0

Elevation in meters.

depth pydantic-field

depth: float = 0.0

Depth in meters, positive is down.

effective_lat_lon property

effective_lat_lon: tuple[float, float]

Shift-corrected lat/lon pair of the location.

surface_distance_to

surface_distance_to(other: Location) -> float

Compute surface distance [m] to other location object.

Parameters:

Name Type Description Default
other Location

The other location.

required

Returns:

Name Type Description
float float

The surface distance in [m].

azimuth_to

azimuth_to(other: Location) -> float

Compute azimuth [°] to other location object.

Parameters:

Name Type Description Default
other Location

The other location.

required

Returns:

Name Type Description
float float

The azimuth in [°].

distance_to

distance_to(other: Location) -> float

Compute 3-dimensional distance [m] to other location object.

Parameters:

Name Type Description Default
other Location

The other location.

required

Returns:

Name Type Description
float float

The distance in [m].

offset_from

offset_from(other: Location) -> tuple[float, float, float]

Return offset vector (east, north, depth) from other location in [m].

Parameters:

Name Type Description Default
other Location

The other location.

required

Returns:

Type Description
tuple[float, float, float]

tuple[float, float, float]: The offset vector.

shifted_origin

shifted_origin() -> Self

Shift the origin of the location to the effective lat/lon.

Returns:

Name Type Description
Self Self

The shifted location.

shift

shift(east: float, north: float, elevation: float) -> Self

Shift the location by the given offsets.

Parameters:

Name Type Description Default
east float

East offset in [m].

required
north float

North offset in [m].

required
elevation float

Elevation offset in [m].

required

Returns:

Name Type Description
Self Self

The shifted location.

origin

origin() -> Location

Get the origin location.

Returns:

Name Type Description
Location Location

The origin location.

as_wkt

as_wkt() -> str

Return the location as WKT string.