Required
name| Type: | str |
| Description: | Name of the model. |
class CrustalModel(
salvus.project.configuration.model.volume.seismology._SeismologyBase
):
def __init__(
self,
name: str,
data: Path | str | xr.Dataset,
parameters: list[str] | None = None,
taper_in_degrees: float | None = None,
use_nan_mask_for_taper: str | None = None,
use_symlink: bool = False,
): ...| Type: | str |
| Description: | Name of the model. |
| Type: | Path | str | xr.Dataset |
| Description: | The actual data values. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Only interpolate these parameters from the model. |
| Type: | float | None |
| Default value: | None |
| Description: | How many degrees to use to taper into the background model. |
| Type: | str | None |
| Default value: | None |
| Description: | Use a NaN mask for the taper. |
| Type: | bool |
| Default value: | False |
| Description: | Don't copy the data to the project but only use a symlink. Only works if the data is passed as a filename or path. |
int)-Dimensions of the model.xr.Dataset)-The actual dataset representing the model.str)-Interpolation mode.str)-Model name.int | list[int] | str | None)-Layers to restrict to.def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...| Type: | pathlib.Path |
| Description: | Path to which the serialized model is relative to. |
| Type: | dict |
| Description: | Dictionary containing its init parameters and a few other things. |
UtmDomain object (see the documentation for points below).extrapolate to False, and
only the masked version of the parameter arrays will be present in
the returned Cartesian model.def to_generic_model_cartesian(
self,
utm: pyproj.CRS | str,
ellipsoid: pyproj.CRS | str,
radius_in_meters: float = 6371000.0,
points: (
tuple[int, int, int] | tuple[UtmDomain, int, int, tuple[float, int]]
),
method: str = "nearest",
extrapolate: bool = True,
) -> CartesianGenericModel: ...| Type: | pyproj.CRS | str |
| Description: | A pyproj CRS object describing the UTM domain to cast to. |
| Type: | pyproj.CRS | str |
| Description: | A pyproj CRS object describing the ellipsoid that the model is currently parameterized with respect to. |
| Type: | float |
| Default value: | 6371000.0 |
| Description: | The vertical units of the model are re-parameterized to depth. This radius is treated as depth 0. |
| Type: | tuple[int, int, int] | tuple[UtmDomain, int, int, tuple[float, int]] |
| Description: | A tuple of either: - A 3-tuple containing the number of grid point to use for the resampling in each dimension (nx, ny, nz). In this case the model extent will be the same as that defined by the spherical model. This may not be very appropriate if the model is, for instance, a global model. - A 4-tuple with the first entry being a UtmDomain object within which you would like to restrict the interpolation, and the next 2 entries being nx, ny as described above. The last entry should be another tuple itself with entries (max_depth, nz). This is because most global models go much deeper than the domain you'd like to simulate in a UTM setting. |
| Type: | str |
| Default value: | 'nearest' |
| Description: | Which method to use for the scipy interpolation. Can be either "nearest" or "linear". Note that "linear" may take a long time, depending on the size of the model. |
| Type: | bool |
| Default value: | True |
| Description: | Set the extrapolate flag on the resulting Cartesian model, which controls how the model is eventually interpolated onto a mesh which exceeds the model bounds. |
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...| Type: | pathlib.Path | str |
| Description: | Parent folder where the JSON + NetCDF files should be stored. |
class GenericModel(
salvus.project.configuration.model.volume.seismology._SeismologyBase
):
def __init__(
self,
name: str,
data: Path | str | xr.Dataset,
parameters: list[str] | None = None,
taper_in_degrees: float | None = None,
use_nan_mask_for_taper: str | None = None,
restrict_to_layers: int | list[int] | str | None = None,
ignore_element_flags: tuple[str, int] | None = None,
use_symlink: bool = False,
): ...| Type: | str |
| Description: | Name of the model. |
| Type: | Path | str | xr.Dataset |
| Description: | The actual data values. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Only interpolate these parameters from the model. |
| Type: | float | None |
| Default value: | None |
| Description: | How many degrees to use to taper into the background model. |
| Type: | str | None |
| Default value: | None |
| Description: | Use a NaN mask for the taper. |
| Type: | int | list[int] | str | None |
| Default value: | None |
| Description: | Restrict to a few layers. |
| Type: | tuple[str, int] | None |
| Default value: | None |
| Description: | Don't do interpolation in elements which have a specific flag. For example, passing ("fluid", 1) will ignore all elements where the elemental field "fluid" is set to 1. |
| Type: | bool |
| Default value: | False |
| Description: | Don't copy the data to the project but only use a symlink. Only works if the data is passed as a filename or path. |
int)-Dimensions of the model.xr.Dataset)-The actual dataset representing the model.str)-Interpolation mode.str)-Model name.int | list[int] | str | None)-Layers to restrict to.def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...| Type: | pathlib.Path |
| Description: | Path to which the serialized model is relative to. |
| Type: | dict |
| Description: | Dictionary containing its init parameters and a few other things. |
UtmDomain object (see the documentation for points below).extrapolate to False, and
only the masked version of the parameter arrays will be present in
the returned Cartesian model.def to_generic_model_cartesian(
self,
utm: pyproj.CRS | str,
ellipsoid: pyproj.CRS | str,
radius_in_meters: float = 6371000.0,
points: (
tuple[int, int, int] | tuple[UtmDomain, int, int, tuple[float, int]]
),
method: str = "nearest",
extrapolate: bool = True,
) -> CartesianGenericModel: ...| Type: | pyproj.CRS | str |
| Description: | A pyproj CRS object describing the UTM domain to cast to. |
| Type: | pyproj.CRS | str |
| Description: | A pyproj CRS object describing the ellipsoid that the model is currently parameterized with respect to. |
| Type: | float |
| Default value: | 6371000.0 |
| Description: | The vertical units of the model are re-parameterized to depth. This radius is treated as depth 0. |
| Type: | tuple[int, int, int] | tuple[UtmDomain, int, int, tuple[float, int]] |
| Description: | A tuple of either: - A 3-tuple containing the number of grid point to use for the resampling in each dimension (nx, ny, nz). In this case the model extent will be the same as that defined by the spherical model. This may not be very appropriate if the model is, for instance, a global model. - A 4-tuple with the first entry being a UtmDomain object within which you would like to restrict the interpolation, and the next 2 entries being nx, ny as described above. The last entry should be another tuple itself with entries (max_depth, nz). This is because most global models go much deeper than the domain you'd like to simulate in a UTM setting. |
| Type: | str |
| Default value: | 'nearest' |
| Description: | Which method to use for the scipy interpolation. Can be either "nearest" or "linear". Note that "linear" may take a long time, depending on the size of the model. |
| Type: | bool |
| Default value: | True |
| Description: | Set the extrapolate flag on the resulting Cartesian model, which controls how the model is eventually interpolated onto a mesh which exceeds the model bounds. |
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...| Type: | pathlib.Path | str |
| Description: | Parent folder where the JSON + NetCDF files should be stored. |
class MantleModel(
salvus.project.configuration.model.volume.seismology._SeismologyBase
):
def __init__(
self,
name: str,
data: Path | str | xr.Dataset,
parameters: list[str] | None = None,
taper_in_degrees: float | None = None,
use_nan_mask_for_taper: str | None = None,
use_symlink: bool = False,
): ...| Type: | str |
| Description: | Name of the model. |
| Type: | Path | str | xr.Dataset |
| Description: | The actual data values. |
| Type: | list[str] | None |
| Default value: | None |
| Description: | Only interpolate these parameters from the model. |
| Type: | float | None |
| Default value: | None |
| Description: | How many degrees to use to taper into the background model. |
| Type: | str | None |
| Default value: | None |
| Description: | Use a NaN mask for the taper. |
| Type: | bool |
| Default value: | False |
| Description: | Don't copy the data to the project but only use a symlink. Only works if the data is passed as a filename or path. |
int)-Dimensions of the model.xr.Dataset)-The actual dataset representing the model.str)-Interpolation mode.str)-Model name.int | list[int] | str | None)-Layers to restrict to.def from_json(parent_folder: pathlib.Path, d: dict) -> _ModelBase: ...| Type: | pathlib.Path |
| Description: | Path to which the serialized model is relative to. |
| Type: | dict |
| Description: | Dictionary containing its init parameters and a few other things. |
UtmDomain object (see the documentation for points below).extrapolate to False, and
only the masked version of the parameter arrays will be present in
the returned Cartesian model.def to_generic_model_cartesian(
self,
utm: pyproj.CRS | str,
ellipsoid: pyproj.CRS | str,
radius_in_meters: float = 6371000.0,
points: (
tuple[int, int, int] | tuple[UtmDomain, int, int, tuple[float, int]]
),
method: str = "nearest",
extrapolate: bool = True,
) -> CartesianGenericModel: ...| Type: | pyproj.CRS | str |
| Description: | A pyproj CRS object describing the UTM domain to cast to. |
| Type: | pyproj.CRS | str |
| Description: | A pyproj CRS object describing the ellipsoid that the model is currently parameterized with respect to. |
| Type: | float |
| Default value: | 6371000.0 |
| Description: | The vertical units of the model are re-parameterized to depth. This radius is treated as depth 0. |
| Type: | tuple[int, int, int] | tuple[UtmDomain, int, int, tuple[float, int]] |
| Description: | A tuple of either: - A 3-tuple containing the number of grid point to use for the resampling in each dimension (nx, ny, nz). In this case the model extent will be the same as that defined by the spherical model. This may not be very appropriate if the model is, for instance, a global model. - A 4-tuple with the first entry being a UtmDomain object within which you would like to restrict the interpolation, and the next 2 entries being nx, ny as described above. The last entry should be another tuple itself with entries (max_depth, nz). This is because most global models go much deeper than the domain you'd like to simulate in a UTM setting. |
| Type: | str |
| Default value: | 'nearest' |
| Description: | Which method to use for the scipy interpolation. Can be either "nearest" or "linear". Note that "linear" may take a long time, depending on the size of the model. |
| Type: | bool |
| Default value: | True |
| Description: | Set the extrapolate flag on the resulting Cartesian model, which controls how the model is eventually interpolated onto a mesh which exceeds the model bounds. |
def to_json(self, parent_folder: pathlib.Path | str) -> dict: ...| Type: | pathlib.Path | str |
| Description: | Parent folder where the JSON + NetCDF files should be stored. |