Skip to content

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 Parameter records.

Functions:

Name Description
as_fields

Build pydantic field specs from parameter registry names.

Attributes:

Name Type Description
parameter_registry Parameters

parameter_registry module-attribute

parameter_registry: Parameters = Parameters.model_validate(
    parameters
)

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 None for an open-ended bin.

value float | str

Label or numeric value assigned to the interval.

color str | None

CSS named color or hex for axis bands, or None.

Fields:

color pydantic-field

color: str | None = None

left pydantic-field

left: float

right pydantic-field

right: float | None

right_effective property

right_effective: float

Upper edge, or inf when right is open-ended.

value pydantic-field

value: float | str

DiscreteData pydantic-model

Bases: BaseModel

Allowed discrete values for a parameter.

Fields:

data pydantic-field

data: list[DiscreteDataItem]

is_categorical pydantic-field

is_categorical: bool = False

get_color_map

get_color_map() -> dict[Any, Any]

Map each discrete value to its color.

get_key_pair_map

get_key_pair_map(key1: str, key2: str) -> dict[Any, Any]

Map one item attribute onto another.

Parameters:

Name Type Description Default
key1 str

Attribute used as dictionary keys (for example 'value').

required
key2 str

Attribute used as dictionary values.

required

Returns:

Type Description
dict[Any, Any]

{getattr(item, key1): getattr(item, key2)} for each item.

get_secondary_map

get_secondary_map() -> dict[Any, Any]

Map each discrete value to its value_secondary.

model_post_init

model_post_init(__context: Any) -> None

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 None.

Fields:

color pydantic-field

color: str | None = None

value pydantic-field

value: float | str | bool | None

value_secondary pydantic-field

value_secondary: float | str | bool | None = None

Literals

Attributes:

Name Type Description
AASHTOSymbol
Aggregation
Compactability
Compactness
Consistency
ConsolidationState
FineType
FootingShape
GeologicalEpoch
GrainAngularity
HydrometerType
IsFineSoilCriteria
Language
LiquefactionLikelihood
LiquefactionPotentialIndexLabel
LiquefactionPotentialIndexMethod
LiquefactionPotentialIndexSumLabel
LiquefactionSeverityNumberLabel
LiquefactionSeverityNumberSumLabel
LiquefactionSusceptibility
LiquidLimitMethod
LithologyGraphics
MaterialDescription
ModifiedSoilBehaviorType
ModifiedSoilBehaviorTypeLabel
ModifiedSoilBehaviourTypeIndexLabel
NatureOfSoil
NatureOfSoilLabel
NonNormalizedSoilBehaviorTypeIndexLabel
NormalizedSoilBehaviorType
NormalizedSoilBehaviorTypeLabel
PileGroupConfiguration
PileShape
PileToeTransition
PileTypeCategory
RelativePermeability
SamplerGraphics
SamplerType
SandFineness
ShallowVelocityExtrapolationMethod
SieveNumber
SiteClass
SiteClassLabel
SiteGroundCondition
SoilBehaviorType
SoilBehaviorTypeIndexLabel
SoilBehaviorTypeLabel
SoilBehaviorTypeSchneider
SoilBehaviorTypeSchneiderLabel
SoilClassificationIndexLabel
SoilClassificationIndexUSCSSymbol
SoilFraction
SoilOrigin
SoilType
SoilType2
SoilType3
SoilTypeIndex
SoilTypeIndexLabel
StoneColumnArrangement
USCSSymbol
USDASymbol
VibrationMode
VibrationModeGroup
WellGraphics

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

Compactability = Literal[
    "Compactable", "Less compactable", "Already dense"
]

Compactness class-attribute instance-attribute

Compactness = Literal[
    "Very loose", "Loose", "Medium", "Dense", "Very dense"
]

Consistency class-attribute instance-attribute

Consistency = Literal[
    "Very soft",
    "Soft",
    "Medium",
    "Stiff",
    "Very stiff",
    "Hard",
]

ConsolidationState class-attribute instance-attribute

ConsolidationState = Literal[
    "UC", "NC", "LOC", "MOC", "HOC"
]

FineType class-attribute instance-attribute

FineType = Literal[
    "silt", "clay", "dual", "organic_silt", "organic_clay"
]

FootingShape class-attribute instance-attribute

FootingShape = Literal[
    "square", "circular", "rectangular", "continuous"
]

GeologicalEpoch class-attribute instance-attribute

GeologicalEpoch = Literal['Holocene', 'Pleistocene']

GrainAngularity class-attribute instance-attribute

GrainAngularity = Literal['angular', 'round']

HydrometerType class-attribute instance-attribute

HydrometerType = Literal['151H', '152H']

IsFineSoilCriteria class-attribute instance-attribute

IsFineSoilCriteria = Literal['sbtn', 'ic_cutoff']

Language class-attribute instance-attribute

Language = Literal['en', 'es', 'fr']

LiquefactionLikelihood class-attribute instance-attribute

LiquefactionLikelihood = Literal[
    "Almost certain",
    "Very likely",
    "Equally likely",
    "Unlikely",
    "Almost certain that not",
]

LiquefactionPotentialIndexLabel class-attribute instance-attribute

LiquefactionPotentialIndexLabel = Literal[
    "Low", "Moderate", "High"
]

LiquefactionPotentialIndexMethod class-attribute instance-attribute

LiquefactionPotentialIndexMethod = Literal[
    "iwasaki1978", "maurer2015"
]

LiquefactionPotentialIndexSumLabel class-attribute instance-attribute

LiquefactionPotentialIndexSumLabel = Literal[
    "Low", "Moderate", "High"
]

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

LiquefactionSusceptibility = Literal[
    "Susceptible", "Mod. Susceptible", "Not susceptible"
]

LiquidLimitMethod class-attribute instance-attribute

LiquidLimitMethod = Literal['single_point', 'multi_point']

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

ModifiedSoilBehaviorType = Literal[
    "1", "2", "3", "4", "5", "6", "7"
]

ModifiedSoilBehaviorTypeLabel class-attribute instance-attribute

ModifiedSoilBehaviorTypeLabel = Literal[
    "CSS", "CC", "CD", "TC", "TD", "SC", "SD"
]

ModifiedSoilBehaviourTypeIndexLabel class-attribute instance-attribute

ModifiedSoilBehaviourTypeIndexLabel = Literal[
    "Clay like", "Transitional", "Sand like"
]

NatureOfSoil class-attribute instance-attribute

NatureOfSoil = Literal['1', '2', '3', '4', '5', '6']

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

NormalizedSoilBehaviorType = Literal[
    "1", "2", "3", "4", "5", "6", "7", "8", "9"
]

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

PileGroupConfiguration = Literal['2X2', '3X3', '4X4']

PileShape class-attribute instance-attribute

PileShape = Literal['circle', 'square']

PileToeTransition class-attribute instance-attribute

PileToeTransition = Literal[
    "dense_to_weak", "weak_to_dense"
]

PileTypeCategory class-attribute instance-attribute

PileTypeCategory = Literal['IA', 'IB', 'IIA', 'IIB']

RelativePermeability class-attribute instance-attribute

RelativePermeability = Literal[
    "Impermeable", "Very low", "Low", "Medium", "High"
]

SamplerGraphics class-attribute instance-attribute

SamplerGraphics = Literal[
    "AU",
    "GB",
    "MC",
    "NR",
    "RC",
    "SPT",
    "SS",
    "ST",
    "UD",
    "VA",
]

SamplerType class-attribute instance-attribute

SamplerType = Literal[
    "AU",
    "GB",
    "MC",
    "NR",
    "RC",
    "SPT",
    "SS",
    "ST",
    "UD",
    "VA",
]

SandFineness class-attribute instance-attribute

SandFineness = Literal['fine', 'medium', 'coarse']

ShallowVelocityExtrapolationMethod class-attribute instance-attribute

ShallowVelocityExtrapolationMethod = Literal['Boore04']

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",
]

SiteClass class-attribute instance-attribute

SiteClass = Literal['F', 'E', 'D', 'C', 'B', 'A']

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

SiteGroundCondition = Literal[
    "level_ground", "sloping_ground", "free_face"
]

SoilBehaviorType class-attribute instance-attribute

SoilBehaviorType = Literal[
    "1", "2", "3", "4", "5", "6", "7", "8", "9"
]

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

SoilBehaviorTypeSchneider = Literal[
    "1a", "1b", "1c", "2", "3"
]

SoilBehaviorTypeSchneiderLabel class-attribute instance-attribute

SoilBehaviorTypeSchneiderLabel = Literal[
    "Clay and/or Silt",
    "Clay",
    "Sensitive clay",
    "Sand",
    "Transitional",
]

SoilClassificationIndexLabel class-attribute instance-attribute

SoilClassificationIndexLabel = Literal[
    "6", "5", "4", "3", "2", "1"
]

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",
]

SoilOrigin class-attribute instance-attribute

SoilOrigin = Literal['alluvial', 'diluvial']

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

SoilType2 = Literal['Highly organic', 'Fine', 'Coarse']

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

SoilTypeIndex = Literal['1', '2', '3', '4a', '4b', '5']

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

StoneColumnArrangement = Literal[
    "triangular", "rectangular"
]

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

VibrationMode = Literal[
    "x", "y", "z", "xx", "yy", "xx and yy", "zz"
]

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:

corresponding_parameter_name pydantic-field

corresponding_parameter_name: str | None = None

data_bins pydantic-field

data_bins: dict[str, list[DataBin]] | None = None

data_type pydantic-field

data_type: Literal['str', 'int', 'float', 'bool', 'date']

description pydantic-field

description: str | None = None

description_with_symbol_plain property

description_with_symbol_plain: str | None

Description with the plain symbol in parentheses, when both exist.

discrete_data pydantic-field

discrete_data: DiscreteData | None = None

display_label property

display_label: str

Human label with unit in parentheses when a unit is set.

display_symbol property

display_symbol: str

Plain symbol (or label) with unit in parentheses when a unit is set.

label pydantic-field

label: str

name pydantic-field

name: str

symbol pydantic-field

symbol: str | None = None

symbol_plain property

symbol_plain: str

symbol with braces and underscores stripped.

Raises:

Type Description
ValueError

If symbol is not defined.

unit pydantic-field

unit: str | None = None

as_field

as_field(
    default: Any = PydanticUndefined, **extra: Any
) -> Any

Build a pydantic Field using this parameter's display metadata.

Parameters:

Name Type Description Default
default Any

Field default. PydanticUndefined means required.

PydanticUndefined
**extra Any

Extra Field keyword arguments.

{}

Returns:

Type Description
Any

A pydantic Field with title and description filled in.

data_ensure_data_type

data_ensure_data_type(
    data: Any, expected_data_type: str | None = None
) -> Any

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 data_type. Integers are stored as float because numpy has no nullable integer array here.

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 discrete_data.

Parameters

Bases: RootModel[dict[str, Parameter]]

Catalog of named Parameter records.

Methods:

Name Description
bin_data

Bin continuous data using source bins labeled by target.

get_corresponding_data_bins

Return bins that map name onto its corresponding parameter.

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

display_label_to_name_map: dict[str, str]

Map display labels back to registry names.

name_to_display_label_map property

name_to_display_label_map: dict[str, str]

Map registry names to display labels.

bin_data

bin_data(
    source: str,
    data: Any,
    target: str,
    right: bool = True,
    null_label: Any = None,
) -> Any

Bin continuous data using source bins labeled by target.

Parameters:

Name Type Description Default
source str

Parameter whose data_bins[target] define the edges.

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 digitize).

True
null_label Any

Replacement for NaN inputs. Defaults to the string NA sentinel or nan from the target dtype.

None

Returns:

Type Description
Any

Binned labels with the same shape as data, coerced to the target parameter dtype.

Raises:

Type Description
ValueError

If source has no data_bins.

get_corresponding_data_bins

get_corresponding_data_bins(name: str) -> list[DataBin]

Return bins that map name onto its corresponding parameter.

Parameters:

Name Type Description Default
name str

Registry name whose corresponding_parameter_name selects the bin list.

required

Returns:

Type Description
list[DataBin]

Bin list for the corresponding parameter.

Raises:

Type Description
ValueError

If the corresponding name or data_bins is missing.

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

DiscreteDataItem attribute to zip.

'value'

Returns:

Type Description
dict[Any, Any]

Mapping from parameter1 field values to parameter2 field values.

Raises:

Type Description
ValueError

If either parameter lacks discrete_data.

items

items()

keys

keys()

values

values()

as_fields

as_fields(
    field_names: list[str],
) -> dict[str, tuple[Any, Any]]

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 (annotation, Field(...)) pairs for create_model.