Required
bot| Type: | interface.Interface |
| Description: | The bottom layer (smaller vertical coordinate). |
class Layer(salvus.utils.dataclass_utils.MappableDataclass):
def __init__(
self,
bot: interface.Interface,
mod: material.PhysicalMaterial,
top: interface.Interface,
linear_solids: (
LinearSolids
| typing.Literal["skip_validation_linear_solids"]
| None
) = None,
_index: int | None = None,
) -> None: ...| Type: | interface.Interface |
| Description: | The bottom layer (smaller vertical coordinate). |
| Type: | material.PhysicalMaterial |
| Description: | The bounded model. |
| Type: | interface.Interface |
| Description: | The top layer (larger vertical coordinate). |
| Type: | LinearSolids | typing.Literal['skip_validation_linear_solids'] | None |
| Default value: | None |
| Description: | Any linear solids associated with the layer. |
| Type: | int | None |
| Default value: | None |
| Description: | An optional index specifying the position of this layer with respect to its neighbors. Required for some reduction algorithms. |
ConcreteInterface)-Return the bottom interface as a curve or a surface.LayerBounds)-Get this layer's bounding interfaces.int | None)-Get the optional index of this layer.tuple[interface.Interface, interface.Interface])-Get a tuple of the (bottom, top) interface.material.PhysicalMaterial)-Get the model.list[interface.Interface | material.PhysicalMaterial])-Get this layer's ordered strata.ConcreteInterface)-Return the top interface as a curve or a surface.tuple[float, float])-Get the reference elevations of the (bottom, top) layers.def bounds_da(self, d: DomainBounds) -> xr.DataArray: ...| Type: | DomainBounds |
| Description: | The domain bounds. |
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 replace_bounds(
self,
new_top: interface.Interface | None = None,
new_bot: interface.Interface | None = None,
) -> Layer: ...| Type: | interface.Interface | None |
| Default value: | None |
| Description: | The new top interface, or None to keep the current interface. |
| Type: | interface.Interface | None |
| Default value: | None |
| Description: | The new bottom interface, or None to keep the current interface. |
class LayerBounds(builtins.object):
def __init__(
self, top: interface.Interface, bot: interface.Interface
) -> None: ...| Type: | interface.Interface |
| Description: | The top interface. |
| Type: | interface.Interface |
| Description: | The bottom interface. |
Hyperplanes.def from_coords(
top: float | interface.Height | interface.Depth,
bot: float | interface.Height | interface.Depth,
) -> LayerBounds: ...| Type: | float | interface.Height | interface.Depth |
| Description: | The top interface. |
| Type: | float | interface.Height | interface.Depth |
| Description: | The bottom interface. |
DataArray's coordinates.extend method to ensure that it spans the
coordinates spanned by other with the desired expansion behavior.def interp_like(self, like: xr.DataArray) -> typing.Self: ...| Type: | xr.DataArray |
| Description: | The DataArray on which to interpolate this interface. |
def replace_bounds(
self,
top: interface.Interface | None = None,
bot: interface.Interface | None = None,
) -> typing.Self: ...| Type: | interface.Interface | None |
| Default value: | None |
| Description: | The new top bound, or None if the current bound is to be kept. |
| Type: | interface.Interface | None |
| Default value: | None |
| Description: | The new bottom bound, or None if the current bound is to be kept. |