salvus.project.configuration.model.background.one_dimensional
Classes
BuiltIn
BuiltInclass BuiltIn(salvus.project.configuration.model.background._BackgroundBase):
def __init__(self, name: str): ...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: Dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dDict — 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) -> Union[str, Callable]: ...Name of the model.
Returns Union[str, Callable]
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...Serialize the object to dictionary that can be written to JSON.
Parameters
external_file_hashOptional[str] — 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.
Returns Dict
FromBm
FromBmclass FromBm(salvus.project.configuration.model.background._BackgroundBase):
def __init__(
self,
filename: Union[pathlib.Path, str],
reference_datum: Optional[float] = 0.0,
): ...Background model from a BM file.
Parameters
filenameUnion[pathlib.Path, str] — BM file.reference_datumOptional[float] — 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: Dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dDict — Dictionary containing its init parameters and a few other things.
Returns Any
name()
name()def name(self) -> Union[str, Callable]: ...Name of the model.
Returns Union[str, Callable]
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict: ...Serialize the object to dictionary that can be written to JSON.
Parameters
external_file_hashOptional[str] — 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.
Returns Dict