Mondaic

salvus.flow.simple_config.source.transformations

salvus.flow.simple_config.source.transformations salvus flow simple_config source transformations

Utils for source coordinate transformations.

Functions

geocentric_to_utm()

def geocentric_to_utm(
    latitude: float, longitude: float, utm_crs: pyproj.crs.crs.CRS
) -> tuple[float, float]: ...

Convert geocentric latitude and longitude coordinates to UTM coordinates.

Parameters
  • latitude float — The geocentric latitude in degrees.
  • longitude float — The geocentric longitude in degrees.
  • utm_crs pyproj.crs.crs.CRS — The UTM coordinate system to convert to.
Returns tuple[float, float]

spherical_source_to_utm()

def spherical_source_to_utm(
    source: seismology.SideSetMomentTensorPoint3D,
    utm_crs: pyproj.crs.crs.CRS,
    side_set_name: str = "z1",
) -> cartesian.SideSetMomentTensorPoint3D: ...

Convert a spherical Salvus moment tensor source to a source in a UTM domain (ENU coordinate system).

Parameters
  • source seismology.SideSetMomentTensorPoint3D — The spherical moment tensor source.
  • utm_crs pyproj.crs.crs.CRS — The UTM coordinate system to convert to.
  • side_set_name str — The name of the side set that the source is attached to.
Returns cartesian.SideSetMomentTensorPoint3D — The converted source.

utm_source_to_spherical()

def utm_source_to_spherical(
    source: seismology.SideSetMomentTensorPoint3D, utm_crs: pyproj.crs.crs.CRS
) -> cartesian.SideSetMomentTensorPoint3D: ...

Convert a UTM Salvus moment tensor source to a source in a spherical domain (ENU coordinate system).

Parameters
  • source seismology.SideSetMomentTensorPoint3D — The UTM moment tensor source.
  • utm_crs pyproj.crs.crs.CRS — The spherical coordinate system to convert to.
Returns cartesian.SideSetMomentTensorPoint3D — The converted source.

utm_to_geocentric()

def utm_to_geocentric(
    easting: float, northing: float, utm_crs: pyproj.crs.crs.CRS
) -> tuple[float, float]: ...

Convert UTM coordinates to geocentric latitude and longitude coordinates.

Parameters
  • easting float — The easting in meters.
  • northing float — The northing in meters.
  • utm_crs pyproj.crs.crs.CRS — The UTM coordinate system to convert from.
Returns tuple[float, float]