Mondaic

salvus.project.configuration.model.background.one_dimensional

salvus.project.configuration.model.background.one_dimensional salvus project configuration model background one_dimensional

One dimensional background models.

Classes

BuiltIn

class BuiltIn(salvus.project.configuration.model.background._BackgroundBase):
    def __init__(self, name: str): ...

Base class for background models.

Use a built-in model as the background model.

Parameters
  • name str — The name of the model.
Methods
from_json()
def from_json(d: builtins.dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d builtins.dict — Dictionary containing its init parameters and a few other things.
Returns Any
prem_iso_one_crust()
def prem_iso_one_crust() -> BuiltIn: ...

A modified, isotropic version of PREM.

Upper crustal layer replaced by lower crustal material.

Returns BuiltIn
name()
def name(self) -> str | typing.Callable: ...

Name of the model.

Returns str | typing.Callable
to_json()
def to_json(
    self,
    external_file_hash: types = None,
    timer: types = None,
    log_to_logger: bool = False,
    comm: types = None,
) -> builtins.dict: ...

Serialize the object to a dictionary that can be written to JSON.

Parameters
  • external_file_hash types — 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.
  • timer types — Execution timer.
  • log_to_logger bool — Log timings to the logger.
  • comm types — MPI communicator, if any.
Returns builtins.dict

FromBm

class FromBm(salvus.project.configuration.model.background._BackgroundBase):
    def __init__(
        self, filename: Path | str, reference_datum: float | None = 0.0
    ): ...

Base class for background models.

Background model from a BM file.

Parameters
  • filename Path | str — BM file.
  • reference_datum float | None — Absolute coordinate value in the vertical direction (y in 2-D, z in 3-D) to which the depth is referenced. Model values at coordinates above will be extrapolated using a constant value.
Methods
from_json()
def from_json(d: builtins.dict) -> Any: ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d builtins.dict — Dictionary containing its init parameters and a few other things.
Returns Any
name()
def name(self) -> str | typing.Callable: ...

Name of the model.

Returns str | typing.Callable
to_json()
def to_json(
    self,
    external_file_hash: types = None,
    timer: types = None,
    log_to_logger: bool = False,
    comm: types = None,
) -> builtins.dict: ...

Serialize the object to a dictionary that can be written to JSON.

Parameters
  • external_file_hash types — 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.
  • timer types — Execution timer.
  • log_to_logger bool — Log timings to the logger.
  • comm types — MPI communicator, if any.
Returns builtins.dict

Used in tutorials