Skip to content

Index

subsurfaceio.site_investigation.analysis

Site investigation analysis (aggregation, parametric grids).

Classes:

Name Description
DepthArrange

Evenly spaced depth vector for aggregation.

DepthDiscrete

Explicit list of depths for aggregation.

DepthDiscreteItem

Single discrete depth for aggregation.

InSituTestFootingCapacityParametricAnalysis

Parametric CPT footing capacity over width and embedment.

InSituTestFootingCapacityParametricResults

Footing-capacity parametric results, one row per grid case.

InSituTestFootingCapacityParametricResultsData

One footing-capacity case on a width–embedment grid.

InSituTestFootingSettlementsParametricAnalysis

Parametric footing settlement over width and embedment.

InSituTestFootingSettlementsParametricResults

Footing-settlement parametric results, one row per grid case.

InSituTestFootingSettlementsParametricResultsData

One footing-settlement case on a width–embedment grid.

InSituTestLiquefactionParametricAnalysis

Parametric liquefaction analysis over PGA and magnitude grids.

InSituTestLiquefactionParametricResults

Liquefaction parametric results, one row per grid case.

InSituTestLiquefactionParametricResultsData

One liquefaction case on a PGA–magnitude grid.

InSituTestsAggregation

Aggregate in-situ test profiles onto a common depth vector.

DepthArrange pydantic-model

Bases: BaseModel

Evenly spaced depth vector for aggregation.

Fields:

depth_from pydantic-field

depth_from: float = 0.0

depth_step pydantic-field

depth_step: float = 0.2

depth_to pydantic-field

depth_to: float = 50.0

depth_vector property

depth_vector: list[float]

Evenly spaced depths from depth_from to depth_to.

type pydantic-field

type: Literal['arrange']

DepthDiscrete pydantic-model

Bases: BaseModel

Explicit list of depths for aggregation.

Fields:

depth pydantic-field

depth: list[DepthDiscreteItem]

depth_vector property

depth_vector: list[float]

Explicit depths in depth order.

type pydantic-field

type: Literal['discrete']

DepthDiscreteItem pydantic-model

Bases: BaseModel

Single discrete depth for aggregation.

Fields:

depth pydantic-field

depth: float = None

InSituTestFootingCapacityParametricAnalysis pydantic-model

Bases: InSituTestParametricGrid

Parametric CPT footing capacity over width and embedment.

Bind a CPT (InSituTestWithFootingCapacity). The sweep runs CPTFootingCapacityRobertson. One sample on either axis draws a line. A full grid draws a surface of ultimate bearing capacity, mean corrected cone resistance, or influence depth.

Fields:

results pydantic-field

results: (
    InSituTestFootingCapacityParametricResults | None
) = None

Calculation results

x_field pydantic-field

x_field: Literal['footing_width'] = 'footing_width'

x_range pydantic-field

x_range: RangeParameters

y_field pydantic-field

y_field: Literal['footing_embedment'] = 'footing_embedment'

y_range pydantic-field

y_range: RangeParameters

get_results_figure

get_results_figure(
    field: Literal[
        "ultimate_bearing_capacity",
        "mean_corrected_cone_tip_resistance",
        "footing_influence_depth",
    ] = "ultimate_bearing_capacity",
) -> go.Figure

Plot a footing-capacity scalar over the width–embedment grid.

One sample on either axis draws a line. A full grid draws a surface.

Parameters:

Name Type Description Default
field Literal['ultimate_bearing_capacity', 'mean_corrected_cone_tip_resistance', 'footing_influence_depth']

Result field to plot on the value axis.

'ultimate_bearing_capacity'

Returns:

Type Description
Figure

Plotly figure.

Raises:

Type Description
ValueError

When results is missing or does not cover the grid.

set_parent

set_parent(test: InSituTestWithFootingCapacity) -> Self

Bind this analysis to a CPT with footing capacity.

Parameters:

Name Type Description Default
test InSituTestWithFootingCapacity

Parent sounding whose footing settings and data are used.

required

Returns:

Type Description
Self

This analysis.

InSituTestFootingCapacityParametricResults pydantic-model

Bases: BaseModel

Footing-capacity parametric results, one row per grid case.

Fields:

data pydantic-field

data: list[InSituTestFootingCapacityParametricResultsData]

InSituTestFootingCapacityParametricResultsData pydantic-model

Bases: BaseModel

One footing-capacity case on a width–embedment grid.

Fields:

footing_embedment pydantic-field

footing_embedment: float | None

footing_influence_depth pydantic-field

footing_influence_depth: float | None

footing_width pydantic-field

footing_width: float | None

mean_corrected_cone_tip_resistance pydantic-field

mean_corrected_cone_tip_resistance: float | None

ultimate_bearing_capacity pydantic-field

ultimate_bearing_capacity: float | None

InSituTestFootingSettlementsParametricAnalysis pydantic-model

Bases: InSituTestParametricGrid

Parametric footing settlement over width and embedment.

Bind a CPT or DMT (InSituTestWithFootingSettlements). The sounding selects CPTFootingSettlementsRobertson or DMTFootingSettlementsRobertson. One sample on either axis draws a line. A full grid draws a surface of footing settlement.

Fields:

results pydantic-field

results: (
    InSituTestFootingSettlementsParametricResults | None
) = None

Calculation results

x_field pydantic-field

x_field: Literal['footing_width'] = 'footing_width'

x_range pydantic-field

x_range: RangeParameters

y_field pydantic-field

y_field: Literal['footing_embedment'] = 'footing_embedment'

y_range pydantic-field

y_range: RangeParameters

get_results_figure

get_results_figure(
    field: Literal[
        "footing_settlement_sum"
    ] = "footing_settlement_sum",
) -> go.Figure

Plot footing settlement over the width–embedment grid.

One sample on either axis draws a line. A full grid draws a surface.

Parameters:

Name Type Description Default
field Literal['footing_settlement_sum']

Result field to plot on the value axis.

'footing_settlement_sum'

Returns:

Type Description
Figure

Plotly figure.

Raises:

Type Description
ValueError

When results is missing or does not cover the grid.

set_parent

set_parent(test: InSituTestWithFootingSettlements) -> Self

Bind this analysis to a CPT or DMT with footing settlement.

Parameters:

Name Type Description Default
test InSituTestWithFootingSettlements

Parent sounding whose footing settings and data are used.

required

Returns:

Type Description
Self

This analysis.

InSituTestFootingSettlementsParametricResults pydantic-model

Bases: BaseModel

Footing-settlement parametric results, one row per grid case.

Fields:

data pydantic-field

data: list[
    InSituTestFootingSettlementsParametricResultsData
]

InSituTestFootingSettlementsParametricResultsData pydantic-model

Bases: BaseModel

One footing-settlement case on a width–embedment grid.

Fields:

footing_embedment pydantic-field

footing_embedment: float | None

footing_settlement_sum pydantic-field

footing_settlement_sum: float | None

footing_width pydantic-field

footing_width: float | None

InSituTestLiquefactionParametricAnalysis pydantic-model

Bases: InSituTestParametricGrid

Parametric liquefaction analysis over PGA and magnitude grids.

Bind a test that supports liquefaction (InSituTestWithLiquefaction). One sample on either axis draws a line. A full grid draws a surface, with contours for liquefaction potential index and severity number.

Fields:

results pydantic-field

results: InSituTestLiquefactionParametricResults | None = (
    None
)

Calculation results

x_field pydantic-field

x_field: Literal["peak_ground_acceleration"] = (
    "peak_ground_acceleration"
)

x_range pydantic-field

x_range: RangeParameters

y_field pydantic-field

y_field: Literal['moment_magnitude'] = 'moment_magnitude'

y_range pydantic-field

y_range: RangeParameters

get_results_figure

get_results_figure(
    field: Literal[
        "lateral_displacement_index_sum",
        "lateral_spread_displacement_sum",
        "liquefaction_settlement_sum",
        "liquefaction_potential_index_sum",
        "liquefaction_severity_number_sum",
        "thickness_non_liquefiable_layer",
        "thickness_liquefiable_layer",
    ] = "liquefaction_potential_index_sum",
) -> go.Figure

Plot a liquefaction scalar over the PGA–magnitude grid.

One sample on either axis draws a line. A full grid draws a surface. Liquefaction potential index and severity number surfaces include contour lines and bin labels.

Parameters:

Name Type Description Default
field Literal['lateral_displacement_index_sum', 'lateral_spread_displacement_sum', 'liquefaction_settlement_sum', 'liquefaction_potential_index_sum', 'liquefaction_severity_number_sum', 'thickness_non_liquefiable_layer', 'thickness_liquefiable_layer']

Result field to plot on the value axis.

'liquefaction_potential_index_sum'

Returns:

Type Description
Figure

Plotly figure.

Raises:

Type Description
ValueError

When results is missing or does not cover the grid.

set_parent

set_parent(test: InSituTestWithLiquefaction) -> Self

Bind this analysis to an in-situ test that supports liquefaction.

Parameters:

Name Type Description Default
test InSituTestWithLiquefaction

Parent test whose liquefaction settings and data are used.

required

Returns:

Type Description
Self

This analysis.

InSituTestLiquefactionParametricResults pydantic-model

Bases: BaseModel

Liquefaction parametric results, one row per grid case.

Fields:

data pydantic-field

data: list[InSituTestLiquefactionParametricResultsData]

InSituTestLiquefactionParametricResultsData pydantic-model

Bases: BaseModel

One liquefaction case on a PGA–magnitude grid.

Fields:

lateral_displacement_index_sum pydantic-field

lateral_displacement_index_sum: float | None

lateral_spread_displacement_sum pydantic-field

lateral_spread_displacement_sum: float | None

liquefaction_potential_index_sum pydantic-field

liquefaction_potential_index_sum: float | None

liquefaction_settlement_sum pydantic-field

liquefaction_settlement_sum: float | None

liquefaction_severity_number_sum pydantic-field

liquefaction_severity_number_sum: float | None

moment_magnitude pydantic-field

moment_magnitude: float | None

peak_ground_acceleration pydantic-field

peak_ground_acceleration: float | None

thickness_liquefiable_layer pydantic-field

thickness_liquefiable_layer: float | None

thickness_non_liquefiable_layer pydantic-field

thickness_non_liquefiable_layer: float | None

InSituTestsAggregation pydantic-model

Bases: Model

Aggregate in-situ test profiles onto a common depth vector.

Fields:

aggregated_test pydantic-field

aggregated_test: InSituTest | None = None

aggregation pydantic-field

aggregation: Aggregation = 'mean'

depth_vector property

depth_vector: list[float]

Depth breaks from depths.

depths pydantic-field

depths: DepthArrange | DepthDiscrete = DepthArrange(
    type="arrange"
)

quantile pydantic-field

quantile: NullableFloat = 0.5

site property

site: SiteInvestigation

Site bound by attach_site.

test_type pydantic-field

test_type: Literal['BORH', 'CPT', 'DMT', 'IST'] = 'CPT'

test_type_site_investigation property

test_type_site_investigation: SiteInvestigation

Copy of the bound site containing only tests of test_type.

aggregate

aggregate(**kwargs: Any) -> Self

Bin and aggregate source traces onto depth_vector.

Parameters:

Name Type Description Default
**kwargs Any

Forwarded to the bin-aggregation helper.

{}

Returns:

Type Description
Self

This spec, with aggregated_test populated.

attach_site

attach_site(site: SiteInvestigation) -> Self

Bind this aggregation spec to a site investigation.

Parameters:

Name Type Description Default
site SiteInvestigation

Site whose tests of test_type are aggregated.

required

Returns:

Type Description
Self

This aggregation spec.

plot

plot(
    plot_module: Literal["plotly", "mpl"] = "plotly",
) -> Any

Plot source tests in gray with the aggregated test overlaid in black.

Builds a temporary site copy so the attached site is not mutated.

Parameters:

Name Type Description Default
plot_module Literal['plotly', 'mpl']

Figure backend.

'plotly'

Returns:

Type Description
Any

Plotly or matplotlib figure from

Any

Raises:

Type Description
ValueError

When aggregated_test has not been calculated.