gwexpy.interop.sdynpy_

Interoperability with SDynPy (Structural Dynamics in Python).

Functions

from_sdynpy_frf(cls, tfa, *[, response_type])

Convert an SDynPy TransferFunctionArray to a FrequencySeriesMatrix.

from_sdynpy_shape(shape_array)

Convert an SDynPy ShapeArray to a pandas.DataFrame.

from_sdynpy_timehistory(cls, tha, *[, ...])

Convert an SDynPy TimeHistoryArray to a TimeSeriesMatrix.

gwexpy.interop.sdynpy_.from_sdynpy_shape(shape_array: Any) Any[source]

Convert an SDynPy ShapeArray to a pandas.DataFrame.

Parameters:

shape_array (sdynpy.core.sdynpy_shape.ShapeArray) – SDynPy shape array. Must expose .frequency, .damping, .shape_matrix, and .coordinate attributes.

Returns:

Columns include DOF labels, optional node coordinates, and mode_1 ... mode_N columns. frequency_Hz and damping_ratio are stored in df.attrs.

Return type:

pandas.DataFrame

gwexpy.interop.sdynpy_.from_sdynpy_frf(cls: type, tfa: Any, *, response_type: str | None = None) Any[source]

Convert an SDynPy TransferFunctionArray to a FrequencySeriesMatrix.

Parameters:
  • cls (type) – FrequencySeriesMatrix.

  • tfa (sdynpy.core.sdynpy_data.TransferFunctionArray) – SDynPy transfer function array.

  • response_type (str, optional) – Response type for unit inference (e.g. "accel").

Return type:

FrequencySeriesMatrix

gwexpy.interop.sdynpy_.from_sdynpy_timehistory(cls: type, tha: Any, *, response_type: str | None = None) Any[source]

Convert an SDynPy TimeHistoryArray to a TimeSeriesMatrix.

Parameters:
  • cls (type) – TimeSeriesMatrix or TimeSeriesDict.

  • tha (sdynpy.core.sdynpy_data.TimeHistoryArray) – SDynPy time-history array.

  • response_type (str, optional) – Response type for unit inference.

Return type:

TimeSeriesMatrix or TimeSeriesDict