Required
x0| Type: | salvus._core.types.float_ |
| Description: | Minimum x-coordinate. |
class BoxDomain(salvus.project.domain.Domain):
def __init__(
self,
x0: salvus._core.types.float_,
x1: salvus._core.types.float_,
y0: salvus._core.types.float_,
y1: salvus._core.types.float_,
) -> None: ...| Type: | salvus._core.types.float_ |
| Description: | Minimum x-coordinate. |
| Type: | salvus._core.types.float_ |
| Description: | Maximum x-coordinate. |
| Type: | salvus._core.types.float_ |
| Description: | Minimum y-coordinate. |
| Type: | salvus._core.types.float_ |
| Description: | Maximum y-coordinate. |
np.ndarray)-Domain bounding box.DomainBounds)-Get the 2-D domain bounds.CoordinateSystem)-Coordinate system of the domain.int)-Get the dimension of this domain.
Returns:
2.def from_2d_line(
topo: SurfaceTopography,
depth_in_meters: salvus._core.types.float_,
shrink_domain_x: salvus._core.types.float_ = 0.0,
) -> BoxDomain: ...| Type: | SurfaceTopography |
| Description: | 2-D surface topography. |
| Type: | salvus._core.types.float_ |
| Description: | Depth in the domain - measured from the maximum value of the given topography. |
| Type: | salvus._core.types.float_ |
| Default value: | 0.0 |
| Description: | Shrink the domain along the x-axis. |
# Create a box domain with a width of 1.0 and a height of 2.0. d = sn.domain.dim2.BoxDomain.from_bounds(1.0, 2.0) # Create a box domain from -1 to 2 in x and 3 to 4 in y. d = sn.domain.dim2.BoxDomain.from_bounds(x=(-1.0, 2.0), y=(3.0, 4.0))
def from_bounds() -> BoxDomain: ...def from_json_data(d: dict) -> Domain: ...| Type: | dict |
| Description: | Dictionary with the JSON data. |
def from_material(m: typing.Any) -> Domain: ...| Type: | typing.Any |
| Description: | The material model. |
xarray.Dataset object, or in a
NetCDF file on disk conforming to the Salvus XY file format.def from_salvus_xy(
model: Path | str | xr.Dataset,
shrink_domain: salvus._core.types.float_ = 0.0,
) -> BoxDomain: ...| Type: | Path | str | xr.Dataset |
| Description: | Model file, either stored in memory (as an xarray.Dataset) or on disk (as a NetCDF file). |
| Type: | salvus._core.types.float_ |
| Default value: | 0.0 |
| Description: | Reduce the size of the domain w.r.t. the size as defined in the Salvus model. |
def from_volume_model(model: volume._VolumeBase) -> Domain: ...| Type: | volume._VolumeBase |
| Description: | The volumetric model from which to create the domain. |
def from_xarray(
d: xr.Dataset | xr.DataArray,
) -> dim2.BoxDomain | dim3.BoxDomain: ...| Type: | xr.Dataset | xr.DataArray |
| Description: | The xarray Dataset or DataArray. |
def load(filename: pathlib.Path) -> Domain: ...| Type: | pathlib.Path |
| Description: | File from which to load. |
def unit() -> BoxDomain: ...def dim_enum(self) -> Dim: ...def estimate_max_travel_distance_in_m(self) -> float: ...def is_point_inside_domain(
self,
x: salvus._core.types.float_,
y: salvus._core.types.float_ | None = None,
) -> bool: ...| Type: | salvus._core.types.float_ |
| Description: | x-coordinate to test. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | y-coordinate to test. If None test will only be done for the x-coordinate. Defaults to None. |
def plot(
self,
events: Event | list[Event] | None = None,
return_figure: bool = False,
) -> Figure | None: ...def write(self, filename: pathlib.Path) -> None: ...| Type: | pathlib.Path |
| Description: | Filename to write it to. |
class CircularDomain(salvus.project.domain.Domain):
def __init__(
self,
radius_in_meter: salvus._core.types.float_,
maximum_colatitude: salvus._core.types.float_ = 180.0,
minimum_radius_in_meter: salvus._core.types.float_ | None = None,
): ...| Type: | salvus._core.types.float_ |
| Description: | Outer radius of the circle. |
| Type: | salvus._core.types.float_ |
| Default value: | 180.0 |
| Description: | Maximum colatitude of the domain, counted both sides from the top. Thus a value of 180 degrees will be the full circle. |
| Type: | salvus._core.types.float_ | None |
| Default value: | None |
| Description: | The minimum radius of the domain. If not set, defaults to 0 (representing a full circle). |
np.ndarray)-Domain bounding box.DomainBounds)-Get the 2-D domain bounds.CoordinateSystem)-Coordinate system of the domain.int)-Get the dimension of this domain.
Returns:
2.# Full disk with a radius of 6371 km. d = sn.domain.dim2.CircularDomain.from_bounds(180.0, 6371e3) # Same using keyword arguments. d = sn.domain.dim2.CircularDomain.from_bounds( longitude=180.0, radius=6371e3 ) # Annulus limited to +/-45 degrees. d = sn.domain.dim2.CircularDomain.from_bounds(45.0, (3000e3, 6371e3))
def from_bounds() -> CircularDomain: ...def from_json_data(d: dict) -> Domain: ...| Type: | dict |
| Description: | Dictionary with the JSON data. |
def from_material(m: typing.Any) -> Domain: ...| Type: | typing.Any |
| Description: | The material model. |
def from_volume_model(model: volume._VolumeBase) -> Domain: ...| Type: | volume._VolumeBase |
| Description: | The volumetric model from which to create the domain. |
def from_xarray(
d: xr.Dataset | xr.DataArray,
) -> dim2.BoxDomain | dim3.BoxDomain: ...| Type: | xr.Dataset | xr.DataArray |
| Description: | The xarray Dataset or DataArray. |
def like_earth() -> CircularDomain: ...def load(filename: pathlib.Path) -> Domain: ...| Type: | pathlib.Path |
| Description: | File from which to load. |
def unit_circle() -> CircularDomain: ...def dim_enum(self) -> Dim: ...def estimate_max_travel_distance_in_m(self) -> float: ...def is_point_inside_domain(
self, longitude: salvus._core.types.float_
) -> bool: ...| Type: | salvus._core.types.float_ |
| Description: | The longitude to test. |
def plot(
self,
events: Event | list[Event] | None = None,
return_figure: bool = False,
) -> Figure | None: ...def write(self, filename: pathlib.Path) -> None: ...| Type: | pathlib.Path |
| Description: | Filename to write it to. |