Required
material| Type: | _OrientedMaterial |
| Description: | An orientation material. |
def visualize_local_bases(
material: _OrientedMaterial,
vector_scale: float = 10.0,
allow_many: bool = False,
) -> Figure: ...| Type: | _OrientedMaterial |
| Description: | An orientation material. |
| Type: | float |
| Default value: | 10.0 |
| Description: | Optional scaling passed on to Matplotlib's quiver. |
| Type: | bool |
| Default value: | False |
| Description: | If True, disables the check on the maximum number of rotations. |
Figureclass AxesDips(salvus.material.orientation._OrientedMaterial):
def __init__(
self,
DIP_X: _pd.types.ParameterOrConstantT,
DIP_Y: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | Dip away from vertical in the XZ plane, in degrees. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Dip away from vertical in the YZ plane, in degrees. |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.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,
) -> typing.Self: ...| 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(
dip_x: _pd.types.ParameterInput, dip_y: _pd.types.ParameterInput
) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | Dip away from vertical in the XZ plane, in degrees. |
| Type: | _pd.types.ParameterInput |
| Description: | Dip away from vertical in the YZ plane, in degrees. |
def material_system() -> type[Material]: ...def generate_rotation_matrix(self) -> npt.NDArray: ...def get_basis_vector(
self, axis: typing.Literal["local_X", "local_Y", "local_Z"]
) -> npt.NDArray: ...| Type: | typing.Literal['local_X', 'local_Y', 'local_Z'] |
| Description: | The local basis vector to get. |
def get_basis_vectors(
self,
) -> tuple[npt.NDArray, npt.NDArray, npt.NDArray]: ...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_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_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |
class AzimuthDip(salvus.material.orientation._OrientedMaterial):
def __init__(
self,
AZIMUTH: _pd.types.ParameterOrConstantT,
DIP: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | Azimuth away from X (towards Y) in degrees. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Dip away from vertical in degrees, |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.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,
) -> typing.Self: ...| 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(
azimuth: _pd.types.ParameterInput, dip: _pd.types.ParameterInput
) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | Azimuth away from X (towards Y) in degrees. |
| Type: | _pd.types.ParameterInput |
| Description: | Dip away from vertical in degrees. |
def material_system() -> type[Material]: ...def generate_rotation_matrix(self) -> npt.NDArray: ...def get_basis_vector(
self, axis: typing.Literal["local_X", "local_Y", "local_Z"]
) -> npt.NDArray: ...| Type: | typing.Literal['local_X', 'local_Y', 'local_Z'] |
| Description: | The local basis vector to get. |
def get_basis_vectors(
self,
) -> tuple[npt.NDArray, npt.NDArray, npt.NDArray]: ...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_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_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |
class AzimuthDipRake(salvus.material.orientation._OrientedMaterial):
def __init__(
self,
AZIMUTH: _pd.types.ParameterOrConstantT,
DIP: _pd.types.ParameterOrConstantT,
RAKE: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | Azimuth away from X (towards Y) in degrees. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Dip away from vertical in degrees. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | Rake that local X makes away from straight down the dipplane in degrees. 0 is straight down the dip plane, 90 is horizontal to the left (anticlockwise) of the dip plane, when looking down the dip plane. This is an intrinsic angle, and the direction of local X and Y will be determined by the combination of azimuth and rake. |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.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,
) -> typing.Self: ...| 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(
azimuth: _pd.types.ParameterInput,
dip: _pd.types.ParameterInput,
rake: _pd.types.ParameterInput,
) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | Azimuth away from global X (towards Y) in degrees. |
| Type: | _pd.types.ParameterInput |
| Description: | Dip away from vertical in degrees. |
| Type: | _pd.types.ParameterInput |
| Description: | Rake that local X makes away from straight down the dipplane in degrees. 0 is straight down the dip plane, 90 is horizontal to the left (anticlockwise) of the dip plane, when looking down the dip plane. |
def material_system() -> type[Material]: ...def generate_rotation_matrix(self) -> npt.NDArray: ...def get_basis_vector(
self, axis: typing.Literal["local_X", "local_Y", "local_Z"]
) -> npt.NDArray: ...| Type: | typing.Literal['local_X', 'local_Y', 'local_Z'] |
| Description: | The local basis vector to get. |
def get_basis_vectors(
self,
) -> tuple[npt.NDArray, npt.NDArray, npt.NDArray]: ...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_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_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |
class ClockwiseAngle(salvus.material.orientation._OrientedMaterial):
def __init__(
self, ANGLE_IN_DEGREES: _pd.types.ParameterOrConstantT
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | The clockwise rotation angle in degree. |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.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,
) -> typing.Self: ...| 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(angle_in_degrees: _pd.types.ParameterInput) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | The clockwise rotation angle in degree. |
def material_system() -> type[Material]: ...def generate_rotation_matrix(self) -> npt.NDArray: ...def get_basis_vector(
self, axis: typing.Literal["local_X", "local_Y", "local_Z"]
) -> npt.NDArray: ...| Type: | typing.Literal['local_X', 'local_Y', 'local_Z'] |
| Description: | The local basis vector to get. |
def get_basis_vectors(
self,
) -> tuple[npt.NDArray, npt.NDArray, npt.NDArray]: ...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_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_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |
skip_orthonormalization=True on various constructors for improved
performance and to preserve the original vectors exactly.class DirectOrthonormalBasis(salvus.material.orientation._OrientedMaterial):
def __init__(
self,
M00: _pd.types.ParameterOrConstantT,
M01: _pd.types.ParameterOrConstantT,
M02: _pd.types.ParameterOrConstantT,
M10: _pd.types.ParameterOrConstantT,
M11: _pd.types.ParameterOrConstantT,
M12: _pd.types.ParameterOrConstantT,
M20: _pd.types.ParameterOrConstantT,
M21: _pd.types.ParameterOrConstantT,
M22: _pd.types.ParameterOrConstantT,
) -> None: ...| Type: | _pd.types.ParameterOrConstantT |
| Description: | The first component of the first basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The second component of the first basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The third component of the first basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The first component of the second basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The second component of the second basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The third component of the second basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The first component of the third basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The second component of the third basis vector. |
| Type: | _pd.types.ParameterOrConstantT |
| Description: | The third component of the third basis vector. |
typing.Mapping)-Material's xarray representation.dict)-Get all parameters as a dict.def from_array(
matrix: npt.NDArray, skip_orthonormalization: bool = False
) -> typing.Self: ...| Type: | npt.NDArray |
| Description: | A 3x3 matrix or array of matrices that represent the local basis vectors. |
| Type: | bool |
| Default value: | False |
| Description: | If True, the Gram-Schmidt orthonormalization procedure is skipped. This is useful if one is sure that the input vectors are already orthonormal. If False, the Gram-Schmidt orthonormalization procedure is applied to the input vectors. Gram-Schmidt orthonormalization applied in m0, m1, m2 order. |
def from_basis_vectors(
local_x: npt.NDArray,
local_y: npt.NDArray,
local_z: npt.NDArray,
skip_orthonormalization: bool = False,
) -> typing.Self: ...| Type: | npt.NDArray |
| Description: | The first basis vector. |
| Type: | npt.NDArray |
| Description: | The second basis vector. |
| Type: | npt.NDArray |
| Description: | The third basis vector. |
| Type: | bool |
| Default value: | False |
| Description: | If True, the Gram-Schmidt orthonormalization procedure is skipped. This is useful if one is sure that the input vectors are already orthonormal. If False, the Gram-Schmidt orthonormalization procedure is applied to the input vectors. Gram-Schmidt orthonormalization applied in m0, m1, m2 order. |
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,
) -> typing.Self: ...| 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(
m00: _pd.types.ParameterInput,
m01: _pd.types.ParameterInput,
m02: _pd.types.ParameterInput,
m10: _pd.types.ParameterInput,
m11: _pd.types.ParameterInput,
m12: _pd.types.ParameterInput,
m20: _pd.types.ParameterInput,
m21: _pd.types.ParameterInput,
m22: _pd.types.ParameterInput,
skip_orthonormalization: bool = False,
) -> typing.Self: ...| Type: | _pd.types.ParameterInput |
| Description: | The first component of the first basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The second component of the first basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The third component of the first basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The first component of the second basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The second component of the second basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The third component of the second basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The first component of the third basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The second component of the third basis vector. |
| Type: | _pd.types.ParameterInput |
| Description: | The third component of the third basis vector. |
| Type: | bool |
| Default value: | False |
| Description: | If True, the Gram-Schmidt orthonormalization procedure is skipped. This is useful if one is sure that the input vectors are already orthonormal. If False, the Gram-Schmidt orthonormalization procedure is applied to the input vectors. Gram-Schmidt orthonormalization applied in m0, m1, m2 order. |
def material_system() -> type[Material]: ...def generate_rotation_matrix(self) -> npt.NDArray: ...def get_basis_vector(
self, axis: typing.Literal["local_X", "local_Y", "local_Z"]
) -> npt.NDArray: ...| Type: | typing.Literal['local_X', 'local_Y', 'local_Z'] |
| Description: | The local basis vector to get. |
def get_basis_vectors(
self,
) -> tuple[npt.NDArray, npt.NDArray, npt.NDArray]: ...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_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_orientation(self, orientation: Material | None) -> Material: ...| Type: | Material | None |
| Description: | The orientation. |