Required
M0| Type: | _pd.types.ParameterOrConstantT |
| Description: | The density in kg / m^3. |
class TensorComponents(
salvus.material.acoustic.hexagonal._Hexagonal,
salvus.material.acoustic.AcousticTensorComponents,
):
def __init__(
self,
M0: _pd.types.ParameterOrConstantT,
D11: _pd.types.ParameterOrConstantT,
D33: _pd.types.ParameterOrConstantT,
D13: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | The density in kg / m^3. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The d_11 component of the acoustic tensor. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The d_33 component of the acoustic tensor. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The d_13 component of the acoustic tensor. |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.Material | None)-Get the optional attenuation.def all_components() -> list[str]: ...def equal_components() -> dict[str, str]: ...def from_dataset(ds: xr.Dataset) -> Material[_pd.types.ParameterFlavorT]: ...| Type: | xr.Dataset |
| Description: | The dataset to construct the material from. |
def from_json(d: builtins.dict) -> Any: ...| Type: | builtins.dict |
| Description: | Dictionary containing its init parameters and a few other things. |
def from_material(
m: Material[_pd.types.ParameterFlavorT],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> PhysicalMaterial[_pd.types.ParameterFlavorT]: ...| Type: | Material[_pd.types.ParameterFlavorT] |
| Description: | Material to transform. |
| Type: | typing.Literal['remove-components', 'force'] | None |
| Default value: | None |
| Description: | Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will drop components that are found to match the new material's constraints as necessary, and thus leading to loss of free parameters but not of information. The option "force" will take all information necessary to construct the new parameter set without verification, leading to loss of information. |
def from_params(
m0: _pd.types.ParameterInput,
d11: _pd.types.ParameterInput,
d33: _pd.types.ParameterInput,
d13: _pd.types.ParameterInput,
) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | The density in kg / m^3. |
| Type: | _pd.types.ParameterInput |
| Description: | The d_11 component of the acoustic tensor. |
| Type: | _pd.types.ParameterInput |
| Description: | The d_33 component of the acoustic tensor. |
| Type: | _pd.types.ParameterInput |
| Description: | The d_13 component of the acoustic tensor. |
def from_tensor_components(
m: GenericTensorComponents[_pd.types.ParameterFlavorT],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> Self: ...| Type: | GenericTensorComponents[_pd.types.ParameterFlavorT] |
| Description: | The material in tensor components parametrization to be used to construct the new material. |
| Type: | typing.Literal['remove-components', 'force'] | None |
| Default value: | None |
| Description: | Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will drop components that are found to match the new material's constraints as necessary, and thus leading to loss of free parameters but not of information. The option "force" will take all information necessary to construct the new parameter set without verification, leading to loss of information. |
def material_system() -> type[PhysicalMaterial]: ...def nonzero_components() -> list[str]: ...def zero_components() -> list[str]: ...f should be a function taking two parameters: the name of the
dataclass member and its value, and it should return a tuple containing
the same quantities. If a member is not to be transformed, f should
just return a tuple of the input member name and value, unchanged. Both
names and values can be transformed, with the semantics following those
of dataclasses.replace.@dataclass class A: member: int # Before my_a = A(member=1) my_a_new = dataclasses.replace(my_a, member=2 * my_a.member) # After my_a_new = A(val=1).map(lambda key, val: (key, 2 * val))
def map(
self, f: typing.Callable[[str, typing.Any], tuple[str, typing.Any]]
) -> typing.Self: ...| Type: | typing.Callable[[str, typing.Any], tuple[str, typing.Any]] |
| Description: | The function to map over the dataclass. |
def map_realized_parameters(
self,
f_constant: typing.Callable[
[str, _pd.realized.constant.Parameter], _pd.realized.constant.Parameter
] = salvus.material.base_materials._map_realized_default,
f_discrete: typing.Callable[
[str, _pd.realized.discrete.Parameter], _pd.realized.discrete.Parameter
] = salvus.material.base_materials._map_realized_default,
f_analytic: typing.Callable[
[str, _pd.realized.analytic.Parameter], _pd.realized.analytic.Parameter
] = salvus.material.base_materials._map_realized_default,
) -> Self: ...| Type: | typing.Callable[[str, _pd.realized.constant.Parameter], _pd.realized.constant.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to constant parameters. Defaults to returning the parameter as-is. |
| Type: | typing.Callable[[str, _pd.realized.discrete.Parameter], _pd.realized.discrete.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to discrete parameters. Defaults to returning the parameter as-is. |
| Type: | typing.Callable[[str, _pd.realized.analytic.Parameter], _pd.realized.analytic.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to analytic parameters. Defaults to returning the parameter as-is. |
def qc_test(
self,
level: validation.QCLevel | str = QCLevel.strict,
display_issues: bool = True,
) -> dict[str, MaterialQCIssue]: ...| Type: | validation.QCLevel | str |
| Default value: | QCLevel.strict |
| Description: | The level of quality control to perform. The BASIC level performs minimal checks, while the STRICT level performs more thorough checks that are potentially slow. One can pass an enumeration value or a string representation of the level. |
| Type: | bool |
| Default value: | True |
| Description: | If True, prints the issues found during the quality control checks. If False, issues are collected but not printed. |
def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...| Type: | types |
| Default value: | None |
| Description: | 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. |
| Type: | types |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | types |
| Default value: | None |
| Description: | MPI communicator, if any. |
def to_tensor_components(
self, expand_symmetries: bool = False
) -> MaterialDict | GenericTensorComponents: ...| Type: | bool |
| Default value: | False |
| Description: | boolean determining if to return a expanded canonical parameters instead of the TensorComponents object in the relevant symmetry system. Defaults to False. |
def to_wavelength_oracle(
self, n_dim: typing.Literal[2, 3] | None = None
) -> _pd.types.ParameterOrConstantT: ...| Type: | typing.Literal[2, 3] | None |
| Default value: | None |
| Description: | Dimension to return the oracle for, deprecated. |
def with_attenuation(self, attenuation: Material | None) -> Self: ...| Type: | Material | None |
| Description: | The attenuation material. |
def with_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |
D_ij (so the squared phase speed is the quadratic form n̂·D·n̂/ρ).
Slowness surfaces of that operator are always ellipsoids, while real
transversely-isotropic media generally have non-ellipsoidal qP wavefronts.
The two coincide exactly only for Thomsen's elliptical case ε = δ.ε ≠ δ the simulation produces the closest ellipsoidal fit: an
ellipse rotated relative to the symmetry axis (the off-diagonal DHV entry
D_13 ∝ δ - ε is what tilts the principal axes), not the true qP
wavefront. The same limitation applies in 2D and 3D. Use the elastic
anisotropic solver if accurate non-elliptical TI is required.class Thomsen(salvus.material.acoustic.hexagonal._Hexagonal):
def __init__(
self,
RHO: _pd.types.ParameterOrConstantT,
VP: _pd.types.ParameterOrConstantT,
DELTA: _pd.types.ParameterOrConstantT,
EPSILON: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | Density in kg / m^3. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | P-wave velocity in m / s. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Thomsen's delta parameter (dimensionless). |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Thomsen's epsilon parameter (dimensionless). |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.Material | None)-Get the optional attenuation.def from_dataset(ds: xr.Dataset) -> Material[_pd.types.ParameterFlavorT]: ...| Type: | xr.Dataset |
| Description: | The dataset to construct the material from. |
def from_json(d: builtins.dict) -> Any: ...| Type: | builtins.dict |
| Description: | Dictionary containing its init parameters and a few other things. |
def from_material(
m: Material[_pd.types.ParameterFlavorT],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> PhysicalMaterial[_pd.types.ParameterFlavorT]: ...| Type: | Material[_pd.types.ParameterFlavorT] |
| Description: | Material to transform. |
| Type: | typing.Literal['remove-components', 'force'] | None |
| Default value: | None |
| Description: | Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will drop components that are found to match the new material's constraints as necessary, and thus leading to loss of free parameters but not of information. The option "force" will take all information necessary to construct the new parameter set without verification, leading to loss of information. |
def from_params(
rho: _pd.types.ParameterInput,
vp: _pd.types.ParameterInput,
delta: _pd.types.ParameterInput,
epsilon: _pd.types.ParameterInput,
) -> Thomsen: ...| Type: | _pd.types.ParameterInput |
| Description: | Density in kg / m^3. |
| Type: | _pd.types.ParameterInput |
| Description: | P-wave velocity in m / s. |
| Type: | _pd.types.ParameterInput |
| Description: | Thomsen's delta parameter (dimensionless). |
| Type: | _pd.types.ParameterInput |
| Description: | Thomsen's epsilon parameter (dimensionless). |
def from_tensor_components(
m: GenericTensorComponents[_pd.types.ParameterFlavorT],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> Thomsen: ...| Type: | GenericTensorComponents[_pd.types.ParameterFlavorT] |
| Description: | The material in tensor components parametrization to be used to construct the new material. |
| Type: | typing.Literal['remove-components', 'force'] | None |
| Default value: | None |
| Description: | Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will drop components that are found to match the new material's constraints as necessary, and thus leading to loss of free parameters but not of information. The option "force" will take all information necessary to construct the new parameter set without verification, leading to loss of information. |
def material_system() -> type[PhysicalMaterial]: ...f should be a function taking two parameters: the name of the
dataclass member and its value, and it should return a tuple containing
the same quantities. If a member is not to be transformed, f should
just return a tuple of the input member name and value, unchanged. Both
names and values can be transformed, with the semantics following those
of dataclasses.replace.@dataclass class A: member: int # Before my_a = A(member=1) my_a_new = dataclasses.replace(my_a, member=2 * my_a.member) # After my_a_new = A(val=1).map(lambda key, val: (key, 2 * val))
def map(
self, f: typing.Callable[[str, typing.Any], tuple[str, typing.Any]]
) -> typing.Self: ...| Type: | typing.Callable[[str, typing.Any], tuple[str, typing.Any]] |
| Description: | The function to map over the dataclass. |
def map_realized_parameters(
self,
f_constant: typing.Callable[
[str, _pd.realized.constant.Parameter], _pd.realized.constant.Parameter
] = salvus.material.base_materials._map_realized_default,
f_discrete: typing.Callable[
[str, _pd.realized.discrete.Parameter], _pd.realized.discrete.Parameter
] = salvus.material.base_materials._map_realized_default,
f_analytic: typing.Callable[
[str, _pd.realized.analytic.Parameter], _pd.realized.analytic.Parameter
] = salvus.material.base_materials._map_realized_default,
) -> Self: ...| Type: | typing.Callable[[str, _pd.realized.constant.Parameter], _pd.realized.constant.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to constant parameters. Defaults to returning the parameter as-is. |
| Type: | typing.Callable[[str, _pd.realized.discrete.Parameter], _pd.realized.discrete.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to discrete parameters. Defaults to returning the parameter as-is. |
| Type: | typing.Callable[[str, _pd.realized.analytic.Parameter], _pd.realized.analytic.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to analytic parameters. Defaults to returning the parameter as-is. |
def qc_test(
self,
level: validation.QCLevel | str = QCLevel.strict,
display_issues: bool = True,
) -> dict[str, MaterialQCIssue]: ...| Type: | validation.QCLevel | str |
| Default value: | QCLevel.strict |
| Description: | The level of quality control to perform. The BASIC level performs minimal checks, while the STRICT level performs more thorough checks that are potentially slow. One can pass an enumeration value or a string representation of the level. |
| Type: | bool |
| Default value: | True |
| Description: | If True, prints the issues found during the quality control checks. If False, issues are collected but not printed. |
def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...| Type: | types |
| Default value: | None |
| Description: | 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. |
| Type: | types |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | types |
| Default value: | None |
| Description: | MPI communicator, if any. |
def to_tensor_components(
self, expand_symmetries: bool = False
) -> MaterialDict | GenericTensorComponents: ...| Type: | bool |
| Default value: | False |
| Description: | boolean determining if to return a expanded canonical parameters instead of the TensorComponents object in the relevant symmetry system. Defaults to False. |
def to_wavelength_oracle(
self, n_dim: typing.Literal[2, 3] | None = None
) -> _pd.types.ParameterOrConstantT: ...| Type: | typing.Literal[2, 3] | None |
| Default value: | None |
| Description: | Dimension to return the oracle for, deprecated. |
def with_attenuation(self, attenuation: Material | None) -> Self: ...| Type: | Material | None |
| Description: | The attenuation material. |
def with_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |
Thomsen — the
implicit Thomsen ε = ½((VPH/VPV)² - 1) enters the same rank-2 D tensor.
The simulation is exact when ε = δ and otherwise gives the
closest-elliptical fit. See class Thomsen for details.class Velocity(salvus.material.acoustic.hexagonal._Hexagonal):
def __init__(
self,
RHO: _pd.types.ParameterOrConstantT,
VPV: _pd.types.ParameterOrConstantT,
VPH: _pd.types.ParameterOrConstantT,
DELTA: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | Density in kg / m^3. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Vertical P-wave velocity in m / s. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Horizontal P-wave velocity in m / s. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Thomsen's delta parameter (dimensionless). |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.Material | None)-Get the optional attenuation.def from_dataset(ds: xr.Dataset) -> Material[_pd.types.ParameterFlavorT]: ...| Type: | xr.Dataset |
| Description: | The dataset to construct the material from. |
def from_json(d: builtins.dict) -> Any: ...| Type: | builtins.dict |
| Description: | Dictionary containing its init parameters and a few other things. |
def from_material(
m: Material[_pd.types.ParameterFlavorT],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> PhysicalMaterial[_pd.types.ParameterFlavorT]: ...| Type: | Material[_pd.types.ParameterFlavorT] |
| Description: | Material to transform. |
| Type: | typing.Literal['remove-components', 'force'] | None |
| Default value: | None |
| Description: | Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will drop components that are found to match the new material's constraints as necessary, and thus leading to loss of free parameters but not of information. The option "force" will take all information necessary to construct the new parameter set without verification, leading to loss of information. |
def from_params(
rho: _pd.types.ParameterInput,
vpv: _pd.types.ParameterInput,
vph: _pd.types.ParameterInput,
delta: _pd.types.ParameterInput,
) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | Density in kg / m^3. |
| Type: | _pd.types.ParameterInput |
| Description: | Vertical P-wave velocity in m / s. |
| Type: | _pd.types.ParameterInput |
| Description: | Horizontal P-wave velocity in m / s. |
| Type: | _pd.types.ParameterInput |
| Description: | Thomsen's delta parameter. |
def from_tensor_components(
m: GenericTensorComponents[_pd.types.ParameterFlavorT],
reduction_method: (
typing.Literal["remove-components", "force"] | None
) = None,
) -> typing.Self: ...| Type: | GenericTensorComponents[_pd.types.ParameterFlavorT] |
| Description: | The material in tensor components parametrization to be used to construct the new material. |
| Type: | typing.Literal['remove-components', 'force'] | None |
| Default value: | None |
| Description: | Method to move between incompatible symmetry classes. None will only move to symmetries that are equal or more permissive, while remove-components will drop components that are found to match the new material's constraints as necessary, and thus leading to loss of free parameters but not of information. The option "force" will take all information necessary to construct the new parameter set without verification, leading to loss of information. |
def material_system() -> type[PhysicalMaterial]: ...f should be a function taking two parameters: the name of the
dataclass member and its value, and it should return a tuple containing
the same quantities. If a member is not to be transformed, f should
just return a tuple of the input member name and value, unchanged. Both
names and values can be transformed, with the semantics following those
of dataclasses.replace.@dataclass class A: member: int # Before my_a = A(member=1) my_a_new = dataclasses.replace(my_a, member=2 * my_a.member) # After my_a_new = A(val=1).map(lambda key, val: (key, 2 * val))
def map(
self, f: typing.Callable[[str, typing.Any], tuple[str, typing.Any]]
) -> typing.Self: ...| Type: | typing.Callable[[str, typing.Any], tuple[str, typing.Any]] |
| Description: | The function to map over the dataclass. |
def map_realized_parameters(
self,
f_constant: typing.Callable[
[str, _pd.realized.constant.Parameter], _pd.realized.constant.Parameter
] = salvus.material.base_materials._map_realized_default,
f_discrete: typing.Callable[
[str, _pd.realized.discrete.Parameter], _pd.realized.discrete.Parameter
] = salvus.material.base_materials._map_realized_default,
f_analytic: typing.Callable[
[str, _pd.realized.analytic.Parameter], _pd.realized.analytic.Parameter
] = salvus.material.base_materials._map_realized_default,
) -> Self: ...| Type: | typing.Callable[[str, _pd.realized.constant.Parameter], _pd.realized.constant.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to constant parameters. Defaults to returning the parameter as-is. |
| Type: | typing.Callable[[str, _pd.realized.discrete.Parameter], _pd.realized.discrete.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to discrete parameters. Defaults to returning the parameter as-is. |
| Type: | typing.Callable[[str, _pd.realized.analytic.Parameter], _pd.realized.analytic.Parameter] |
| Default value: | salvus.material.base_materials._map_realized_default |
| Description: | The function to apply to analytic parameters. Defaults to returning the parameter as-is. |
def qc_test(
self,
level: validation.QCLevel | str = QCLevel.strict,
display_issues: bool = True,
) -> dict[str, MaterialQCIssue]: ...| Type: | validation.QCLevel | str |
| Default value: | QCLevel.strict |
| Description: | The level of quality control to perform. The BASIC level performs minimal checks, while the STRICT level performs more thorough checks that are potentially slow. One can pass an enumeration value or a string representation of the level. |
| Type: | bool |
| Default value: | True |
| Description: | If True, prints the issues found during the quality control checks. If False, issues are collected but not printed. |
def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...| Type: | types |
| Default value: | None |
| Description: | 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. |
| Type: | types |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | types |
| Default value: | None |
| Description: | MPI communicator, if any. |
def to_tensor_components(
self, expand_symmetries: bool = False
) -> MaterialDict | GenericTensorComponents: ...| Type: | bool |
| Default value: | False |
| Description: | boolean determining if to return a expanded canonical parameters instead of the TensorComponents object in the relevant symmetry system. Defaults to False. |
def to_wavelength_oracle(
self, n_dim: typing.Literal[2, 3] | None = None
) -> _pd.types.ParameterOrConstantT: ...| Type: | typing.Literal[2, 3] | None |
| Default value: | None |
| Description: | Dimension to return the oracle for, deprecated. |
def with_attenuation(self, attenuation: Material | None) -> Self: ...| Type: | Material | None |
| Description: | The attenuation material. |
def with_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |