salvus.flow.simple_config.source.seismology
Sources in a seismological context.
Specifically this means:
- Coordinates are specified in latitude, longitude, and burrial beneath the local subsurface.
- Moment tensors and vector sources are specified in spherical r, theta, and phi coordinates. This corresponds to radial, colatitudinal, and longitudinal directions. This is also know has the Harvard convention for moment tensors.
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()
parse()def parse(
filename_or_obj: Any,
dimensions: int,
side_set_name: str = "r1",
source_time_function: Optional[salvus.flow.simple_config.stf._Base] = None,
axes_a_b: Tuple[float, float] = (6378137.0, 6356752.314245),
) -> List[
Union[
salvus.flow.simple_config.source.seismology.SideSetMomentTensorPoint2D,
salvus.flow.simple_config.source.seismology.SideSetMomentTensorPoint3D,
]
]:
...Attempts to parse anything to a list of either
:class:.SideSetMomentTensorPoint2D or
:class:.SideSetMomentTensorPoint3D objects.
Supports pretty much everything ObsPy supports, ranging from QuakeML data, over CMTSOLUTION and ndk 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.
filename_or_objAny — Filename/URL/Python objectdimensionsint — Determines if the function returns 2D or 3D moment tensor sources.side_set_namestr — Name of the side set the sources will be attached to. The default is likely good.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — A source in Salvus always requires a source time function and the information in the files is never enough to reconstruct it. It can already be specified here - if not it still must be set before a simulation is run.axes_a_bTuple[float, float] — Assumed ellipticity of the planet used for converting the latitude. Defaults to the values for the WGS84 ellipsoid.
Classes
MomentTensorPoint2D
MomentTensorPoint2Dclass MomentTensorPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
mrr: float,
mpp: float,
mrp: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D moment tensor source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.mrrfloat — RR component of the moment in Nm.mppfloat — PP component of the moment in Nm.mrpfloat — RP component of the moment in Nm.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
MomentTensorPoint3D
MomentTensorPoint3Dclass MomentTensorPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
mrr: float,
mtt: float,
mpp: float,
mtp: float,
mrp: float,
mrt: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D moment tensor source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.mrrfloat — RR component of the moment in Nm.mttfloat — TT component of the moment in Nm.mppfloat — PP component of the moment in Nm.mtpfloat — TP component of the moment in Nm.mrpfloat — RP component of the moment in Nm.mrtfloat — RT component of the moment in Nm.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
ScalarPoint2D
ScalarPoint2Dclass ScalarPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
f: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological scalar 2-D source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.ffloat — Force of the source in Nm.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
ScalarPoint3D
ScalarPoint3Dclass ScalarPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
f: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D scalar source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.ffloat — Force of the source in Nm.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
SideSetMomentTensorPoint2D
SideSetMomentTensorPoint2Dclass SideSetMomentTensorPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetMomentTensorPoint2D,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
mrr: float,
mpp: float,
mrp: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D moment tensor side-set source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.mrrfloat — RR component of the moment in Nm.mppfloat — PP component of the moment in Nm.mrpfloat — RP component of the moment in Nm.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetMomentTensorPoint3D
SideSetMomentTensorPoint3Dclass SideSetMomentTensorPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetMomentTensorPoint3D,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
mrr: float,
mtt: float,
mpp: float,
mtp: float,
mrp: float,
mrt: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D moment tensor side-set source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.mrrfloat — RR component of the moment in Nm.mttfloat — TT component of the moment in Nm.mppfloat — PP component of the moment in Nm.mtpfloat — TP component of the moment in Nm.mrpfloat — RP component of the moment in Nm.mrtfloat — RT component of the moment in Nm.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetScalarPoint2D
SideSetScalarPoint2Dclass SideSetScalarPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetScalarPoint2D,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
side_set_name: str,
f: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D scalar side-set source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.side_set_namestr — Name of the side at which to place the receiver.ffloat — Force of the source in Nm.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetScalarPoint3D
SideSetScalarPoint3Dclass SideSetScalarPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetScalarPoint3D,
):
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,
f: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D scalar side-set source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.side_set_namestr — Name of the side at which to place the receiver.ffloat — Force of the source in Nm.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetVectorGradientPoint2D
SideSetVectorGradientPoint2Dclass SideSetVectorGradientPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetVectorGradientPoint2D,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
grr: float,
grp: float,
gpr: float,
gpp: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D vector gradient side-set source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.grrfloat — RR component of the gradient.grpfloat — RP component of the gradient.gprfloat — PR component of the gradient.gppfloat — PP component of the gradient.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetVectorGradientPoint3D
SideSetVectorGradientPoint3Dclass SideSetVectorGradientPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetVectorGradientPoint3D,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
grr: float,
grt: float,
grp: float,
gtr: float,
gtt: float,
gtp: float,
gpr: float,
gpt: float,
gpp: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D vector gradient side-set source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.grrfloat — RR component of the gradient.grtfloat — RT component of the gradient.grpfloat — RP component of the gradient.gtrfloat — TR component of the gradient.gttfloat — TT component of the gradient.gtpfloat — TP component of the gradient.gprfloat — PR component of the gradient.gptfloat — PT component of the gradient.gppfloat — PP component of the gradient.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetVectorPoint2D
SideSetVectorPoint2Dclass SideSetVectorPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetVectorPoint2D,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
fr: float,
fp: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D vector side-set source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.frfloat — R component of the force in N.fpfloat — P component of the force in N.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetVectorPoint3D
SideSetVectorPoint3Dclass SideSetVectorPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetVectorPoint3D,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
fr: float,
ft: float,
fp: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D vector side-set source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.frfloat — R component of the force in N.ftfloat — T component of the force in N.fpfloat — P component of the force in N.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
SideSetVectorPoint3DZNE
SideSetVectorPoint3DZNEclass SideSetVectorPoint3DZNE(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source.cartesian.SideSetVectorPoint3D,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
fz: float,
fn: float,
fe: float,
side_set_name: str,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D vector side-set source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver below the specified side set.radius_of_sphere_in_mfloat — Planet radius used for the initial guess of the receiver. Can be a really rough estimate.fzfloat — Z component of the force in N.fnfloat — N component of the force in N.fefloat — E component of the force in N.side_set_namestr — Name of the side at which to place the receiver.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
VectorGradientPoint2D
VectorGradientPoint2Dclass VectorGradientPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
grr: float,
grp: float,
gpr: float,
gpp: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D vector gradient source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.grrfloat — RR component of the gradient.grpfloat — RP component of the gradient.gprfloat — PR component of the gradient.gppfloat — PP component of the gradient.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
VectorGradientPoint3D
VectorGradientPoint3Dclass VectorGradientPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
grr: float,
grt: float,
grp: float,
gtr: float,
gtt: float,
gtp: float,
gpr: float,
gpt: float,
gpp: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D vector gradient source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.grrfloat — RR component of the gradient.grtfloat — RT component of the gradient.grpfloat — RP component of the gradient.gtrfloat — TR component of the gradient.gttfloat — TT component of the gradient.gtpfloat — TP component of the gradient.gprfloat — PR component of the gradient.gptfloat — PT component of the gradient.gppfloat — PP component of the gradient.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
VectorPoint2D
VectorPoint2Dclass VectorPoint2D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
fr: float,
fp: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 2-D vector source.
longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.frfloat — R component of the force in N.fpfloat — P component of the force in N.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
VectorPoint3D
VectorPoint3Dclass VectorPoint3D(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
fr: float,
ft: float,
fp: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D vector source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.frfloat — R component of the force in N.ftfloat — T component of the force in N.fpfloat — P component of the force in N.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
VectorPoint3DZNE
VectorPoint3DZNEclass VectorPoint3DZNE(
salvus.flow.simple_config.coordinate_system_utils._SeismologyBase,
salvus.flow.simple_config.source._BaseSource,
):
def __init__(
self,
latitude: float,
longitude: float,
depth_in_m: float = 0.0,
radius_of_sphere_in_m: float = 6371000.0,
fz: float,
fn: float,
fe: float,
source_time_function: Optional[
salvus.flow.simple_config.stf._Base
] = None,
rotation_on_input: Optional[Dict] = None,
reference_time_utc_string: Optional[str] = None,
):
...Seismological 3-D vector source.
latitudefloat — The latitude in degree.longitudefloat — The longitude in degree.depth_in_mfloat — The depth in meters of the receiver.radius_of_sphere_in_mfloat — This class assumes a perfect sphere to derive the cartesian coordinates of the receiver. This is the radius of that sphere.fzfloat — R component of the force in N.fnfloat — T component of the force in N.fefloat — P component of the force in N.source_time_functionOptional[salvus.flow.simple_config.stf._Base] — Source time function.rotation_on_inputOptional[Dict] — Transform the input STF according to this matrix.reference_time_utc_stringOptional[str] — Reference time for the source. Usually equal to the origin time. If it is set, the reference time for whole simulation will be set to this time.
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
dDict — Dictionary containing its init parameters and a few other things.
apply()
apply()def apply(self, d: Union[Dict, _DeepSetter]) -> None:
...Set the contents with a dictionary.
dUnion[Dict, _DeepSetter] — The dictionary to set.
copy()
copy()def copy(self) -> _DeepSetter:
...Return a deep copy of the object.
get_dictionary()
get_dictionary()def get_dictionary(self) -> Dict:
...Get the contents of this object as a dictionary.
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
validate()
validate()def validate(self) -> None:
...Validates the current state of the configuration against its schema.
Exceptions
SalvusFlowSourceParseError
SalvusFlowSourceParseErrorRaised if a source file could not be parsed.