salvus.flow.simple_config.source.transformations
Utils for source coordinate transformations
Functions
geocentric_to_utm()
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
latitudefloat — The geocentric latitude in degrees.longitudefloat — The geocentric longitude in degrees.utm_crspyproj.crs.crs.CRS — The UTM coordinate system to convert to.
Returns Tuple[float, float]
spherical_source_to_utm()
spherical_source_to_utm()def spherical_source_to_utm(
source: salvus.flow.simple_config.source.seismology.SideSetMomentTensorPoint3D,
utm_crs: pyproj.crs.crs.CRS,
) -> salvus.flow.simple_config.source.cartesian.SideSetMomentTensorPoint3D: ...Convert a spherical Salvus moment tensor source to a source in a UTM domain (ENU coordinate system).
Parameters
sourcesalvus.flow.simple_config.source.seismology.SideSetMomentTensorPoint3D — The spherical moment tensor source.utm_crspyproj.crs.crs.CRS — The UTM coordinate system to convert to.
Returns salvus.flow.simple_config.source.cartesian.SideSetMomentTensorPoint3D — The converted source.
utm_source_to_spherical()
utm_source_to_spherical()def utm_source_to_spherical(
source: salvus.flow.simple_config.source.seismology.SideSetMomentTensorPoint3D,
utm_crs: pyproj.crs.crs.CRS,
) -> salvus.flow.simple_config.source.cartesian.SideSetMomentTensorPoint3D: ...Convert a UTM Salvus moment tensor source to a source in a spherical domain (ENU coordinate system).
Parameters
sourcesalvus.flow.simple_config.source.seismology.SideSetMomentTensorPoint3D — The UTM moment tensor source.utm_crspyproj.crs.crs.CRS — The spherical coordinate system to convert to.
Returns salvus.flow.simple_config.source.cartesian.SideSetMomentTensorPoint3D — The converted source.
utm_to_geocentric()
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
eastingfloat — The easting in meters.northingfloat — The northing in meters.utm_crspyproj.crs.crs.CRS — The UTM coordinate system to convert from.
Returns Tuple[float, float]