Index
subsurfaceio.parameters
Parameter catalog used by application models.
Look up a registered parameter and use it as a pydantic field:
from subsurfaceio.parameters import parameter_registry
depth = parameter_registry['depth'].as_field()
Classes:
| Name | Description |
|---|---|
DataBin |
Half-open interval used to bin a continuous parameter. |
DiscreteData |
Allowed discrete values for a parameter. |
DiscreteDataItem |
One allowed discrete value, with optional secondary value and color. |
Literals |
|
Parameter |
One named quantity in the parameter catalog. |
Parameters |
Catalog of named |
Functions:
| Name | Description |
|---|---|
as_fields |
Build pydantic field specs from parameter registry names. |
Attributes:
| Name | Type | Description |
|---|---|---|
parameter_registry |
Parameters
|
|
parameter_registry
module-attribute
DataBin
pydantic-model
Bases: BaseModel
Half-open interval used to bin a continuous parameter.
Attributes:
| Name | Type | Description |
|---|---|---|
left |
float
|
Inclusive lower edge. |
right |
float | None
|
Exclusive upper edge, or |
value |
float | str
|
Label or numeric value assigned to the interval. |
color |
str | None
|
CSS named color or hex for axis bands, or |
Fields:
DiscreteData
pydantic-model
Bases: BaseModel
Allowed discrete values for a parameter.
Fields:
-
data(list[DiscreteDataItem]) -
is_categorical(bool)
get_key_pair_map
Map one item attribute onto another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key1
|
str
|
Attribute used as dictionary keys (for example |
required |
key2
|
str
|
Attribute used as dictionary values. |
required |
Returns:
| Type | Description |
|---|---|
dict[Any, Any]
|
|
get_secondary_map
Map each discrete value to its value_secondary.
DiscreteDataItem
pydantic-model
Bases: BaseModel
One allowed discrete value, with optional secondary value and color.
Attributes:
| Name | Type | Description |
|---|---|---|
value |
float | str | bool | None
|
Allowed discrete value. |
value_secondary |
float | str | bool | None
|
Optional paired value. |
color |
str | None
|
CSS named color or hex for this category, or |
Fields:
-
value(float | str | bool | None) -
value_secondary(float | str | bool | None) -
color(str | None)
Literals
Attributes:
AASHTOSymbol
class-attribute
instance-attribute
AASHTOSymbol = Literal[
"A-1-a",
"A-1-b",
"A-3",
"A-2-4",
"A-2-5",
"A-2-6",
"A-2-7",
"A-4",
"A-5",
"A-6",
"A-7-5",
"A-7-6",
"A-8",
]
Aggregation
class-attribute
instance-attribute
Aggregation = Literal[
"min",
"mean",
"median",
"gmean",
"characteristic",
"max",
"quantile",
"std",
]
Compactability
class-attribute
instance-attribute
Compactness
class-attribute
instance-attribute
Consistency
class-attribute
instance-attribute
ConsolidationState
class-attribute
instance-attribute
FineType
class-attribute
instance-attribute
FootingShape
class-attribute
instance-attribute
GeologicalEpoch
class-attribute
instance-attribute
IsFineSoilCriteria
class-attribute
instance-attribute
LiquefactionLikelihood
class-attribute
instance-attribute
LiquefactionLikelihood = Literal[
"Almost certain",
"Very likely",
"Equally likely",
"Unlikely",
"Almost certain that not",
]
LiquefactionPotentialIndexLabel
class-attribute
instance-attribute
LiquefactionPotentialIndexMethod
class-attribute
instance-attribute
LiquefactionPotentialIndexSumLabel
class-attribute
instance-attribute
LiquefactionSeverityNumberLabel
class-attribute
instance-attribute
LiquefactionSeverityNumberLabel = Literal[
"Little to non",
"Minor",
"Moderate",
"Moderate to severe",
"Mayor",
"Severe damage",
]
LiquefactionSeverityNumberSumLabel
class-attribute
instance-attribute
LiquefactionSeverityNumberSumLabel = Literal[
"Little to non",
"Minor",
"Moderate",
"Moderate to severe",
"Mayor",
"Severe damage",
]
LiquefactionSusceptibility
class-attribute
instance-attribute
LiquidLimitMethod
class-attribute
instance-attribute
LithologyGraphics
class-attribute
instance-attribute
LithologyGraphics = Literal[
"ASPHALT",
"BASALT",
"BEDROCK",
"BLDRCBBL",
"BRECCIA",
"CH",
"CHALK",
"CL",
"CL-CH",
"CLG",
"CL-ML",
"CLS",
"COAL",
"CONCRETE",
"CORAL",
"FILL",
"GC",
"GM",
"GC-GM",
"GP",
"GP-GC",
"GP-GM",
"GPS",
"GW",
"GW-GC",
"GW-GM",
"GWS",
"GYPSUM",
"LIMESTONE",
"MH",
"ML",
"MLG",
"MLS",
"NO CORE",
"OH",
"OHSH",
"OL",
"OLSH",
"PT",
"SANDSTONE",
"SC",
"SC-SM",
"SHALE",
"SILTSTONE",
"SM",
"SP",
"SPG",
"SP-SC",
"SP-SM",
"SW",
"SWG",
"SW-SC",
"SW-SM",
"TILL",
"TOPSOIL",
"GravelOrConglomerate_1",
"GravelOrConglomerate_2",
"CrossbeddedGravelOrConglomerate",
"Breccia_1",
"Breccia_2",
"MassiveSandOrSandstone",
"BeddedSandOrSandstone",
"CrossbeddedSandOrSandstone_1",
"CrossbeddedSandOrSandstone_2",
"RipplebeddedSandorSandstone",
"ArgillaceousOrShalySandstone",
"CalcareousSandstone",
"DolomiticSandstone",
"Silt,Siltstone,OrShalySilt",
"CalcareousSiltstone",
"DolomiticSiltstone",
"SandyOrSiltyShale",
"ClayOrClayShale",
"ChertyShale",
"DolomiticShale",
"CalcareousShaleOrMarl",
"CarbonaceousShale",
"OilShale",
"Chalk",
"Limestone",
"ClasticLimestone",
"FossiliferousClasticLimestone",
"NodularOrIrregularlyBeddedLimestone",
"LimestoneIrregular_BurrowFillingsSaccharoidalDolomite",
"CrossbeddedLimestone",
"ChertyCrossbeddedLimestone",
"ChertyAndSandyCrossbeddedClasticLimestone",
"OoliticLimestone",
"SandyLimestone",
"SiltyLimestone",
"ArgillaceousOrShalyLimestone",
"ChertyLimestone_1",
"ChertyLimestone_2",
"DolomiticLimestone,LimyDolostone,OrLimyDolomite",
"DolostoneOrDolomite",
"CrossbeddedDolostoneOrDolomite",
"OoliticDolostoneOrDolomite",
"SandyDolostoneOrDolomite",
"SiltyDolostoneOrDolomite",
"ArgillaceousOrShalyDolostoneOrDolomite",
"ChertyDolostoneOrDolomite",
"BeddedChert_1",
"BeddedChert_2",
"FossiliferousBeddedChert",
"FossiliferousRock",
"DiatomaceousRock",
"Subgraywacke",
"CrossbeddedSubgraywacke",
"RipplebeddedSubgraywacke",
"Peat",
"Coal",
"BonyCoalOrImpureCoal",
"Underclay",
"FlintClay",
"Bentonite",
"Glauconite",
"Limonite",
"Siderite",
"Phosphatic",
"Gypsum",
"Salt",
"InterbeddedSandstoneAndSiltstone",
"InterbeddedSandstoneAndShale",
"InterbeddedRipplebeddedSandstoneAndShale",
"InterbeddedShaleAndSiltyLimestone_ShaleDominant",
"InterbeddedShaleAndLimestone_ShaleDominant_1",
"InterbeddedShaleAndLimestone_ShaleDominant_2",
"InterbeddedCalcareousShaleAndLimestone_ShaleDominant",
"InterbeddedSiltyLimestoneAndShale",
"InterbeddedLimestoneAndShale_1",
"InterbeddedLimestoneAndShale_2",
"InterbeddedLimestoneAndShale_LimestoneDominant",
"InterbeddedLimestoneAndCalcareousShale",
"TillOrDiamicton_1",
"TillOrDiamicton_2",
"TillOrDiamicton_3",
"Loess_1",
"Loess_2",
"Loess_3",
"Metamorphism",
"Quartzite",
"Slate",
"SchistoseOrGneissoidGranite",
"Schist",
"ContortedSchist",
"SchistAndGneiss",
"Gneiss",
"ContortedGneiss",
"Soapstone,Talc,OrSerpentinite",
"TuffaceousRock",
"CrystalTuff",
"DevitrifiedTuff",
"VolcanicBrecciaAndTuff",
"VolcanicBrecciaOrAgglomerate",
"ZeoliticRock",
"BasalticFlows",
"Granite_2",
"BandedIgneousRock",
"IgneousRock_1",
"IgneousRock_2",
"IgneousRock_3",
"IgneousRock_4",
"IgneousRock_5",
"IgneousRock_6",
"IgneousRock_7",
"IgneousRock_8",
"PorphyriticRock_1",
"PorphyriticRock_2",
"Vitrophyre",
"Quartz",
"Ore",
]
MaterialDescription
class-attribute
instance-attribute
MaterialDescription = Literal[
"Mud and/or Peat",
"Mud",
"Clay",
"Silty Clay",
"Clayey Silt",
"Silt",
"Sandy Silt",
"Silty Sand",
"Sand",
]
ModifiedSoilBehaviorType
class-attribute
instance-attribute
ModifiedSoilBehaviorTypeLabel
class-attribute
instance-attribute
ModifiedSoilBehaviourTypeIndexLabel
class-attribute
instance-attribute
NatureOfSoil
class-attribute
instance-attribute
NatureOfSoilLabel
class-attribute
instance-attribute
NatureOfSoilLabel = Literal[
"Soft clay and mud",
"Moderately compact clay",
"Silt and loose sand",
"Compact to stiff clay and compact silt",
"Moderately compact sand and gravel",
"Compact to very compact sand and gravel",
]
NonNormalizedSoilBehaviorTypeIndexLabel
class-attribute
instance-attribute
NonNormalizedSoilBehaviorTypeIndexLabel = Literal[
"Gravelly sand",
"Sands",
"Sand mixtures",
"Silt mixtures",
"Clays",
"Organic soils",
]
NormalizedSoilBehaviorType
class-attribute
instance-attribute
NormalizedSoilBehaviorTypeLabel
class-attribute
instance-attribute
NormalizedSoilBehaviorTypeLabel = Literal[
"Sensitive fine grained",
"Organic soil",
"Clay",
"Clay & silty clay",
"Silty sand & sandy silt",
"Sand & silty sand",
"Gravely sand & sand",
"Very stiff sand & clayey sand",
"Very stiff fine grained",
]
PileGroupConfiguration
class-attribute
instance-attribute
PileToeTransition
class-attribute
instance-attribute
PileTypeCategory
class-attribute
instance-attribute
RelativePermeability
class-attribute
instance-attribute
SamplerGraphics
class-attribute
instance-attribute
SamplerType
class-attribute
instance-attribute
ShallowVelocityExtrapolationMethod
class-attribute
instance-attribute
SieveNumber
class-attribute
instance-attribute
SieveNumber = Literal[
'24 "',
'12 "',
'6 "',
'3 "',
'2 ½ "',
'2 "',
'1 ½ "',
'1 "',
'3/4 "',
'1/2 "',
'3/8 "',
"No. 4",
"No. 6",
"No. 8",
"No. 10",
"No. 16",
"No. 20",
"No. 30",
"No. 40",
"No. 50",
"No. 60",
"No. 70",
"No. 80",
"No. 100",
"No. 120",
"No. 140",
"No. 170",
"No. 200",
]
SiteClassLabel
class-attribute
instance-attribute
SiteClassLabel = Literal[
"Soil requiring site-specific evaluations",
"Soft soil",
"Stiff soil",
"Very dense soil and soft rock",
"Rock",
"Hard rock",
]
SiteGroundCondition
class-attribute
instance-attribute
SoilBehaviorType
class-attribute
instance-attribute
SoilBehaviorTypeIndexLabel
class-attribute
instance-attribute
SoilBehaviorTypeIndexLabel = Literal[
"Gravelly sand",
"Sands",
"Sand mixtures",
"Silt mixtures",
"Clays",
"Organic soils",
]
SoilBehaviorTypeLabel
class-attribute
instance-attribute
SoilBehaviorTypeLabel = Literal[
"Sensitive fine grained",
"Organic soil",
"Clay",
"Clay & silty clay",
"Silty sand & sandy silt",
"Sand & silty sand",
"Gravely sand & sand",
"Very stiff sand & clayey sand",
"Very stiff fine grained",
]
SoilBehaviorTypeSchneider
class-attribute
instance-attribute
SoilBehaviorTypeSchneiderLabel
class-attribute
instance-attribute
SoilBehaviorTypeSchneiderLabel = Literal[
"Clay and/or Silt",
"Clay",
"Sensitive clay",
"Sand",
"Transitional",
]
SoilClassificationIndexLabel
class-attribute
instance-attribute
SoilClassificationIndexUSCSSymbol
class-attribute
instance-attribute
SoilClassificationIndexUSCSSymbol = Literal[
"OL,OH,Pt",
"MH,CH",
"ML,CL",
"SM,SC,GM,GC",
"SP-SM,SP-SC",
"SP,SW",
]
SoilFraction
class-attribute
instance-attribute
SoilFraction = Literal[
"Colloids",
"Clay",
"Silt",
"Sand (Fine)",
"Sand (Medium)",
"Sand (Coarse)",
"Gravel (Fine)",
"Gravel (Coarse)",
"Cobble",
]
SoilType
class-attribute
instance-attribute
SoilType = Literal[
"Rock",
"Weathered Rock",
"Residual Soil",
"Fill",
"Artificial",
"Organic",
"Peat",
"Clay",
"Silt",
"Sand",
"Gravel",
]
SoilType2
class-attribute
instance-attribute
SoilType3
class-attribute
instance-attribute
SoilType3 = Literal[
"Clean sand",
"Clean sand/Sand with fines",
"Sand with fines",
"Clean gravel",
"Clean gravel/Gravel with fines",
"Gravel with fines",
]
SoilTypeIndex
class-attribute
instance-attribute
SoilTypeIndexLabel
class-attribute
instance-attribute
SoilTypeIndexLabel = Literal[
"Very soft clays",
"Clay and/or Silt",
"Clayey Silt and/or Silty Clay",
"Sandy Silt",
"Silty Sand",
"Sand to Sandy Gravel",
]
StoneColumnArrangement
class-attribute
instance-attribute
USCSSymbol
class-attribute
instance-attribute
USCSSymbol = Literal[
"Rock",
"Weathered Rock",
"Residual Soil",
"Fill",
"Artificial",
"Peat",
"Pt",
"Organic",
"OL",
"OH",
"Clay",
"CL",
"CL-ML",
"CH",
"Silt",
"ML",
"MH",
"Sand",
"SW",
"SP",
"SP-SW",
"SW-SM",
"SW-SC",
"SP-SM",
"SP-SC",
"SM",
"SC",
"SC-SM",
"Gravel",
"GW",
"GP",
"GP-GW",
"GW-GM",
"GW-GC",
"GP-GM",
"GP-GC",
"GM",
"GC",
"GC-GM",
]
USDASymbol
class-attribute
instance-attribute
USDASymbol = Literal[
"Cl",
"SiCl",
"SaCl",
"ClLo",
"SiClLo",
"SaClLo",
"Lo",
"SiLo",
"SaLo",
"Si",
"LoSa",
"Sa",
]
VibrationMode
class-attribute
instance-attribute
VibrationModeGroup
class-attribute
instance-attribute
VibrationModeGroup = Literal[
"x overall",
"y overall",
"x base spring",
"y base spring",
"z",
"xx",
"yy",
"zz",
]
WellGraphics
class-attribute
instance-attribute
WellGraphics = Literal[
"BENT11",
"BENT21",
"BENT22",
"BENT31",
"BENT32",
"BENT33",
"BENT41",
"BENT42",
"BENT43",
"BENT44",
"BENT51",
"BENT52",
"BENT53",
"BENT54",
"BENT55",
"BENT61",
"BENT62",
"BENT63",
"BENT64",
"BENT65",
"BENT66",
"BENTBOTT",
"BLANK",
"CAPPED RISER 1",
"CAPPED RISER 2",
"CAPPED RISER 3",
"CAPPED RISER 4",
"CAPPED RISER 5",
"CAPPED RISER 6",
"CMNT11",
"CMNT21",
"CMNT22",
"CMNT31",
"CMNT32",
"CMNT33",
"CMNT41",
"CMNT42",
"CMNT43",
"CMNT44",
"CMNT51",
"CMNT52",
"CMNT53",
"CMNT54",
"CMNT55",
"CMNT61",
"CMNT62",
"CMNT63",
"CMNT64",
"CMNT65",
"CMNT66",
"CMNTBOTT",
"FILT11",
"FILT21",
"FILT22",
"FILT31",
"FILT32",
"FILT33",
"FILT41",
"FILT42",
"FILT43",
"FILT44",
"FILT51",
"FILT52",
"FILT53",
"FILT54",
"FILT55",
"FILT61",
"FILT62",
"FILT63",
"FILT64",
"FILT65",
"FILT66",
"FILTBOTT",
"NOBACKFILL11",
"NOBACKFILL22",
"NOBACKFILL33",
"NOBACKFILL44",
"NOBACKFILL55",
"NOBACKFILL66",
"PCAP11",
"PCAP21",
"PCAP22",
"PCAP31",
"PCAP32",
"PCAP33",
"PCAP41",
"PCAP42",
"PCAP43",
"PCAP44",
"PCAP51",
"PCAP52",
"PCAP53",
"PCAP54",
"PCAP55",
"PCAP61",
"PCAP62",
"PCAP63",
"PCAP64",
"PCAP65",
"PCAP66",
"PROTECTIVE CASING",
"SLOT11",
"SLOT21",
"SLOT22",
"SLOT31",
"SLOT32",
"SLOT33",
"SLOT41",
"SLOT42",
"SLOT43",
"SLOT44",
"SLOT51",
"SLOT52",
"SLOT53",
"SLOT54",
"SLOT55",
"SLOT61",
"SLOT62",
"SLOT63",
"SLOT64",
"SLOT65",
"SLOT66",
"SLUF11",
"SLUF21",
"SLUF22",
"SLUF31",
"SLUF32",
"SLUF33",
"SLUF41",
"SLUF42",
"SLUF43",
"SLUF44",
"SLUF51",
"SLUF52",
"SLUF53",
"SLUF54",
"SLUF55",
"SLUF61",
"SLUF62",
"SLUF63",
"SLUF64",
"SLUF65",
"SLUF66",
"SLUFBOTT",
"TCAP11",
"TCAP21",
"TCAP22",
"TCAP31",
"TCAP32",
"TCAP33",
"TCAP41",
"TCAP42",
"TCAP43",
"TCAP44",
"TCAP51",
"TCAP52",
"TCAP53",
"TCAP54",
"TCAP55",
"TCAP61",
"TCAP62",
"TCAP63",
"TCAP64",
"TCAP65",
"TCAP66",
]
Parameter
pydantic-model
Bases: BaseModel
One named quantity in the parameter catalog.
Fields:
-
name(str) -
label(str) -
data_type(Literal['str', 'int', 'float', 'bool', 'date']) -
symbol(str | None) -
unit(str | None) -
description(str | None) -
corresponding_parameter_name(str | None) -
discrete_data(DiscreteData | None) -
data_bins(dict[str, list[DataBin]] | None)
description_with_symbol_plain
property
Description with the plain symbol in parentheses, when both exist.
display_symbol
property
Plain symbol (or label) with unit in parentheses when a unit is set.
symbol_plain
property
symbol with braces and underscores stripped.
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
as_field
Build a pydantic Field using this parameter's display metadata.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
default
|
Any
|
Field default. |
PydanticUndefined
|
**extra
|
Any
|
Extra |
{}
|
Returns:
| Type | Description |
|---|---|
Any
|
A pydantic |
data_ensure_data_type
Coerce data to this parameter's numpy dtype.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Any
|
Scalar or array-like values. |
required |
expected_data_type
|
str | None
|
Override for |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Numpy array (or 0-d array) of the requested dtype. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a categorical string value is not in |
Parameters
Bases: RootModel[dict[str, Parameter]]
Catalog of named Parameter records.
Methods:
| Name | Description |
|---|---|
bin_data |
Bin continuous |
get_corresponding_data_bins |
Return bins that map |
get_pair_discrete_field_mapping |
Zip a field from two discrete parameters, in list order. |
items |
|
keys |
|
values |
|
Attributes:
| Name | Type | Description |
|---|---|---|
display_label_to_name_map |
dict[str, str]
|
Map display labels back to registry names. |
name_to_display_label_map |
dict[str, str]
|
Map registry names to display labels. |
display_label_to_name_map
property
Map display labels back to registry names.
name_to_display_label_map
property
Map registry names to display labels.
bin_data
Bin continuous data using source bins labeled by target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
str
|
Parameter whose |
required |
data
|
Any
|
Continuous scalar or array-like values to bin. |
required |
target
|
str
|
Parameter whose discrete values label the bins. |
required |
right
|
bool
|
Whether intervals include the right edge (numpy
|
True
|
null_label
|
Any
|
Replacement for NaN inputs. Defaults to the string NA
sentinel or |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
Binned labels with the same shape as |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
get_corresponding_data_bins
Return bins that map name onto its corresponding parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Registry name whose |
required |
Returns:
| Type | Description |
|---|---|
list[DataBin]
|
Bin list for the corresponding parameter. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the corresponding name or |
get_pair_discrete_field_mapping
get_pair_discrete_field_mapping(
parameter1: str, parameter2: str, field: str = "value"
) -> dict[Any, Any]
Zip a field from two discrete parameters, in list order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parameter1
|
str
|
First registry name (keys). |
required |
parameter2
|
str
|
Second registry name (values). |
required |
field
|
str
|
|
'value'
|
Returns:
| Type | Description |
|---|---|
dict[Any, Any]
|
Mapping from |
Raises:
| Type | Description |
|---|---|
ValueError
|
If either parameter lacks |
as_fields
Build pydantic field specs from parameter registry names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field_names
|
list[str]
|
Registry keys (or free names) to turn into fields. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, tuple[Any, Any]]
|
Mapping of field name to |