Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.simple_config.receiver.seismology

Receivers in a seismological context.

Specifically this means:

  • Coordinates are specified in latitude, longitude, and burial beneath the surface.
  • The rotation matrices will be set so that the output of SalvusCompute will be in ZNE (vertical, north, and east) which corresponds to most seismological instruments.

All coordinates here are spherical coordinates. If your coordinates are defined in a geodetic (ellipsoidal) reference system like WGS84, you need to convert them before passing them to this function.

For 2D the latitude will ignored and only the longitude will be assumed. This is the default polar coordinate system with:

  • x = r * cos(phi)
  • y = r * sin(phi)

phi is the longitude here.

Functions

parse()

def parse(
    filename_or_obj: typing.Any,
    dimensions: int,
    fields: list[str],
    side_set_name: str = "r1",
    axes_a_b: tuple[float, float] = (6378137.0, 6356752.314245),
    network_code: str = "",
) -> list[SideSetPoint2D | SideSetPoint3D]: ...

Attempts to parse anything to a list of either :class:.SideSetPoint2D or :class:.SideSetPoint3D objects.

Supports pretty much everything ObsPy supports, ranging from StationXML files, SEED files, SAC files, to ObsPy’s custom objects from filenames, URLs, memory files, …

Coordinates, by default, are assumed to be defined on the WGS84 ellipsoid and will be converted to geocentric coordinates. This can be influenced with the axes_a_b parameter.

Parameters
  • filename_or_obj typing.Any — Filename/URL/Python object
  • dimensions int — Determines if the function returns 2D or 3D receivers.
  • fields list[str] — The fields to output.
  • side_set_name str — Name of the side set the receivers will be attached to. The default is likely good.
  • axes_a_b tuple[float, float] — Assumed ellipticity of the planet used for converting the latitude. Defaults to the values for the WGS84 ellipsoid.
  • network_code str — Network code needed to parse ObsPy station objects. Likely only needed for the recursive part of this method.
Returns list[SideSetPoint2D | SideSetPoint3D] — A list of locatable side set receivers.

Classes

Point2D

class Point2D(
    salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
    salvus.flow.simple_config.receiver._BaseReceiver,
):
    def __init__(
        self,
        longitude: float,
        depth_in_m: float = 0.0,
        radius_of_sphere_in_m: float = 6371000.0,
        network_code: "str" = "XX",
        station_code: "str",
        location_code: "str" = "",
        fields: "list[str]",
    ): ...

2-D seismological receiver.

Parameters
  • longitude float — The longitude in degree.
  • depth_in_m float — The depth in meters of the receiver.
  • radius_of_sphere_in_m float — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.
  • network_code 'str' — Network code.
  • station_code 'str' — Station code.
  • location_code 'str' — Location code.
  • fields 'list[str]' — Fields to record.
Attributes
name str

Full receiver name as NETWORK_CODE.STATION_CODE.LOCATION_CODE.

Point3D

class Point3D(
    salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
    salvus.flow.simple_config.receiver._BaseReceiver,
):
    def __init__(
        self,
        latitude: float,
        longitude: float,
        depth_in_m: float = 0.0,
        radius_of_sphere_in_m: float = 6371000.0,
        network_code: "str" = "XX",
        station_code: "str",
        location_code: "str" = "",
        fields: "list[str]",
    ): ...

3-D seismological receiver.

All coordinates here are spherical coordinates. If your coordinates are defined in a geodetic (ellipsoidal) reference system like WGS84, you need to convert them before passing them to this function.

Parameters
  • latitude float — The latitude in degrees.
  • longitude float — The longitude in degrees.
  • depth_in_m float — The depth in meters of the receiver.
  • radius_of_sphere_in_m float — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.
  • network_code 'str' — Network code.
  • station_code 'str' — Station code.
  • location_code 'str' — Location code.
  • fields 'list[str]' — Fields to record.
Attributes
name str

Full receiver name as NETWORK_CODE.STATION_CODE.LOCATION_CODE.

SideSetPoint2D

class SideSetPoint2D(
    salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
    salvus.flow.simple_config.receiver.cartesian.SideSetPoint2D,
):
    def __init__(
        self,
        longitude: float,
        depth_in_m: float = 0.0,
        radius_of_sphere_in_m: float = 6371000.0,
        side_set_name: str,
        network_code: "'str'" = "XX",
        station_code: "'str'",
        location_code: "'str'" = "",
        fields: "'list[str]'",
    ): ...

2-D seismological side-set receiver.

Parameters
  • longitude float — The longitude in degree.
  • depth_in_m float — The depth in meters of the receiver below the specified side set.
  • radius_of_sphere_in_m float — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.
  • side_set_name str — Name of the side at which to place the receiver.
  • network_code "'str'" — Network code.
  • station_code "'str'" — Station code.
  • location_code "'str'" — Location code.
  • fields "'list[str]'" — Fields to record.
Attributes
name str

Full receiver name as NETWORK_CODE.STATION_CODE.LOCATION_CODE.

SideSetPoint3D

class SideSetPoint3D(
    salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
    salvus.flow.simple_config.receiver.cartesian.SideSetPoint3D,
):
    def __init__(
        self,
        latitude: float,
        longitude: float,
        depth_in_m: float = 0.0,
        radius_of_sphere_in_m: float = 6371000.0,
        side_set_name: str,
        network_code: "'str'" = "XX",
        station_code: "'str'",
        location_code: "'str'" = "",
        fields: "'list[str]'",
    ): ...

3-D seismological side-set receiver.

All coordinates here are spherical coordinates. If your coordinates are defined in a geodetic (ellipsoidal) reference system like WGS84, you need to convert them before passing them to this function.

Parameters
  • latitude float — The latitude in degrees.
  • longitude float — The longitude in degrees.
  • depth_in_m float — The depth in meters of the receiver below the specified side set.
  • radius_of_sphere_in_m float — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.
  • side_set_name str — Name of the side at which to place the receiver.
  • network_code "'str'" — Network code.
  • station_code "'str'" — Station code.
  • location_code "'str'" — Location code.
  • fields "'list[str]'" — Fields to record.
Attributes
name str

Full receiver name as NETWORK_CODE.STATION_CODE.LOCATION_CODE.

Submodules