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
BuiltInclass 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
namestr — The name of the model.
Methods
from_json()
from_json()def from_json(d: builtins.dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dbuiltins.dict — Dictionary containing its init parameters and a few other things.
Returns Any
prem_iso_one_crust()
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()
name()def name(self) -> str | typing.Callable: ...Name of the model.
Returns str | typing.Callable
to_json()
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_hashtypes — 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.timertypes — Execution timer.log_to_loggerbool — Log timings to the logger.commtypes — MPI communicator, if any.
Returns builtins.dict
FromBm
FromBmclass 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
filenamePath | str — BM file.reference_datumfloat | 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()
from_json()def from_json(d: builtins.dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dbuiltins.dict — Dictionary containing its init parameters and a few other things.
Returns Any
name()
name()def name(self) -> str | typing.Callable: ...Name of the model.
Returns str | typing.Callable
to_json()
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_hashtypes — 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.timertypes — Execution timer.log_to_loggerbool — Log timings to the logger.commtypes — MPI communicator, if any.
Returns builtins.dict