Terrestrial profile API
quantas.api.profiles exposes passive pressure–temperature–depth
profiles independently of Thermoelasticity. Profiles can be built from a
scientific preset, a mapping, or an Earth-profile YAML specification and then
passed to a workflow that consumes depth paths.
from quantas.api import profiles
print(profiles.preset_names())
profile = profiles.build_preset("continental-reference")
print(profile.depth, profile.pressure, profile.temperature)
Profile contracts
- quantas.api.profiles.DepthProfile
alias of
EarthDepthProfile
- quantas.api.profiles.Model
alias of
EarthProfileModel
- quantas.api.profiles.Preset
alias of
EarthProfilePreset
Preset discovery and construction
- quantas.api.profiles.preset_names()
Return available depth-profile preset names.
- Returns:
- tuple of str
Stable identifiers accepted by
build_preset().
- Return type:
tuple[str, …]
- quantas.api.profiles.presets()
Return available depth-profile preset contracts.
- Returns:
- tuple of Preset
Immutable preset metadata in stable display order.
- Return type:
tuple[EarthProfilePreset, …]
- quantas.api.profiles.build_preset(name)
Build one named depth-profile preset.
- Parameters:
- namestr
Stable identifier returned by
preset_names().
- Returns:
- DepthProfile
Evaluated pressure-temperature-depth path.
- Parameters:
name (str)
- Return type:
EarthDepthProfile
Custom specifications
- quantas.api.profiles.from_mapping(specification)
Build a depth profile from a normalized mapping.
- Parameters:
- specificationmapping of str to Any
Normalized pressure-temperature-depth model specification.
- Returns:
- DepthProfile
Evaluated terrestrial depth path.
- Raises:
- ValueError
If the specification is incomplete or scientifically invalid.
- Parameters:
specification (Mapping[str, Any])
- Return type:
EarthDepthProfile
- quantas.api.profiles.read_spec(source)
Read a depth-profile specification.
- Parameters:
- sourcestr or Path
YAML profile specification.
- Returns:
- DepthProfile
Evaluated pressure-temperature-depth path.
- Raises:
- ValueError
If the specification cannot be parsed or validated.
- Parameters:
source (str | Path)
- Return type:
EarthDepthProfile