Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Package Layout

This document will describe the layout of SDynPy to help users find the functions they are looking for.

SDynPy Subpackages

SDynPy is split up into several subpackages to help organize its content. While these subpackages are convenient to organize the content, they are not convenient to use, as typical function calls might require descending multiple package levels, resulting in inconveniently long code. Therefore, SDynPy heavily relies on aliases to commonly used functions and classes.

The following sections describe the major subpackages that exist in SDynPy.

SDynPy Core Objects

The sdynpy.core subpackage contains Python modules that define the core SDynPy objects and other core functionality. These are designed to represent common data used in structural dynamics, including degrees of freedom, geometry, data, or dynamic systems. Because of their ubiquitous nature, almost all of the modules, classes, and their corresponding helper functions are aliased to the top-level SDynPy namespace. The core modules are:

SDynPy Core ModulesAliasDescription
sdynpy.core.sdynpy_arraysdynpy.arrayDefinition of the parent SdynpyArray class.
sdynpy.core.sdynpy_colorssdynpy.colorsDefinition of the color map scheme used by SDynPy.
sdynpy.core.sdynpy_coordinatesdynpy.coordinateDefinition of the CoordinateArray class used to represent degrees of freedom.
sdynpy.core.sdynpy_datasdynpy.dataDefinition of the NDDataArray class and it’s subclasses. (TimeHistoryArray, SpectrumArray, etc.) used to represent data.
sdynpy.core.sdynpy_geometrysdynpy.geometryDefinition of the Geometry class and its component classes (NodeArray, ElementArray, TracelineArray, CoordinateSystemArray) used to represent the locations and orientations of measurements.
sdynpy.core.sdynpy_matrixsdynpy.matrix_modDefinition of the Matrix class used to map degrees of freedom to rows and columns of a matrix.
sdynpy.core.sdynpy_shapesdynpy.shapeDefinition of the parent ShapeArray class used to represent mode or deflection shapes.
sdynpy.core.sdynpy_systemsdynpy.systemDefinition of the parent System class used to represent dynamic systems (mass, stiffness, and damping).

In addition to the modules being aliased to the SDynPy namespace, many of the classes and functions from the core subpackage are also aliased to the top-level namespace, as these are the most often called functions and classes in SDynPy.

SDynPy Array ClassAliasDescription
sdynpy.core.sdynpy_array.SdynpyArraysdynpy.SdynpyArrayParent class of all SDynPy Arrays.
Coordinate Classes and FunctionsAliasDescription
sdynpy.core.sdynpy_coordinate.CoordinateArraysdynpy.CoordinateArrayClass to represent degrees of freedom.
sdynpy.core.sdynpy_coordinate.coordinate_arraysdynpy.coordinate_arrayHelper function to create CoordinateArray objects.
Data Classes and FunctionsAliasDescription
sdynpy.core.sdynpy_data.NDDataArraysdynpy.NDDataArrayParent class of all SDynPy Data Arrays.
sdynpy.core.sdynpy_data.TimeHistoryArraysdynpy.TimeHistoryArrayData class representing time histories.
sdynpy.core.sdynpy_data.TransferFunctionArraysdynpy.TransferFunctionArrayData class representing transfer functions or frequency response functions.
sdynpy.core.sdynpy_data.CoherenceArraysdynpy.CoherenceArrayData class representing coherence functions.
sdynpy.core.sdynpy_data.MultipleCoherenceArraysdynpy.MultipleCoherenceArrayData class representing multiple coherence functions.
sdynpy.core.sdynpy_data.PowerSpectralDensityArraysdynpy.PowerSpectralDensityArrayData class representing power spectral density functions.
sdynpy.core.sdynpy_data.SpectrumArraysdynpy.SpectrumArrayData class representing spectra (e.g. FFTs).
sdynpy.core.sdynpy_data.GUIPlotsdynpy.GUIPlotAn interactive data plotter.
sdynpy.core.sdynpy_data.CPSDPlotsdynpy.CPSDPlotAn interactive data plotter specifically for cross-power spectral density data.
sdynpy.core.sdynpy_data.data_arraysdynpy.data_arrayHelper function to create NDDataArray (and subclasses) objects.
sdynpy.core.sdynpy_data.time_history_arraysdynpy.time_history_arrayHelper function to create TimeHistoryArray objects.
sdynpy.core.sdynpy_data.transfer_function_arraysdynpy.transfer_function_arrayHelper function to create TransferFunctionArray objects.
sdynpy.core.sdynpy_data.coherence_arraysdynpy.coherence_arrayHelper function to create CoherenceArray objects.
sdynpy.core.sdynpy_data.multiple_coherence_arraysdynpy.multiple_coherence_arrayHelper function to create MultipleCoherenceArray objects.
sdynpy.core.sdynpy_data.power_spectral_density_arraysdynpy.power_spectral_density_arrayHelper function to create PowerSpectralDensityArray objects.
sdynpy.core.sdynpy_data.spectrum_arraysdynpy.spectrum_arrayHelper function to create SpectrumArray objects.
Geometry Classes and FunctionsAliasDescription
sdynpy.core.sdynpy_geometry.Geometrysdynpy.GeometryClass to represent a test or analysis geometry.
sdynpy.core.sdynpy_geometry.NodeArraysdynpy.NodeArrayClass to represent node locations in a geometry.
sdynpy.core.sdynpy_geometry.CoordinateSystemArraysdynpy.CoordinateSystemArrayClass to represent global and local coordinate systems in a geometry.
sdynpy.core.sdynpy_geometry.TracelineArraysdynpy.TracelineArrayClass to represent lines connecting nodes for visualization.
sdynpy.core.sdynpy_geometry.ElementArraysdynpy.ElementArrayClass to represent elements connecting nodes for visualization.
sdynpy.core.sdynpy_geometry.node_arraysdynpy.node_arrayHelper function to create NodeArray objects.
sdynpy.core.sdynpy_geometry.coordinate_system_arraysdynpy.coordinate_system_arrayHelper function to create CoordinateSystemArray objects.
sdynpy.core.sdynpy_geometry.traceline_arraysdynpy.traceline_arrayHelper function to create TracelineArray objects.
sdynpy.core.sdynpy_geometry.element_arraysdynpy.element_arrayHelper function to create ElementArray objects.
sdynpy.core.sdynpy_geometry.id_mapsdynpy.id_mapClass to represent identification number maps between two geometries.
Matrix Classes and FunctionsAliasDescription
sdynpy.core.sdynpy_matrix.Matrixsdynpy.MatrixClass used to map degrees of freedom to rows and columns of a matrix.
sdynpy.core.sdynpy_matrix.matrixsdynpy.matrixHelper function to create Matrix objects.
Shape Classes and FunctionsAliasDescription
sdynpy.core.sdynpy_shape.ShapeArraysdynpy.ShapeArrayClass used to represent mode or deflection shapes.
sdynpy.core.sdynpy_shape.shape_arraysdynpy.shape_arrayHelper function to create ShapeArray objects.
System ClassesAliasDescription
sdynpy.core.sdynpy_system.Systemsdynpy.SystemClass used to represent dynamic systems with mass, stiffness, and damping matrices.

File Input and Output

Structural dynamics data often comes from external sources, whether it is a modal, vibration, or shock test or an equivalent finite element simulation. Therefore, being able to quickly and easily bring external data into SDynPy is a priority. While users could strip data from their external files and manually construct SDynPy objects from that data, this risks bookkeeping and other translation errors. Therefore if a file type is commonly read into or written from SDynPy, it is useful to add a dedicated reader or writer into SDynPy to handle this translation correctly. The sdynpy.fileio subpackage contains much of the code to handle these conversions. For convenience, the modules are aliased to the top-level namespace. The fileio modules are:

File Input/Output ModulesAliasDescription
sdynpy.fileio.sdynpy_uffsdynpy.uff or sdynpy.unvFunctionality for reading and writing the Universal File Format, a text-based file format common in structural dynamics.
sdynpy.fileio.sdynpy_rattlesnakesdynpy.rattlesnakeFunctionality for reading output from the open-source vibration controller and modal testing software Rattlesnake
sdynpy.fileio.sdynpy_vicsdynpy.vicFunctionality for reading output from Correlated Solution’s VIC3D .mat file output.
sdynpy.fileio.sdynpy_pdf3Dsdynpy.pdf3DFunctionality for writing geometry and shape data to a format that can be embedded into an interactive PDF for test or analysis documentation.
sdynpy.fileio.sdynpy_tshakersdynpy.tshakerFunctionality for reading output data from T-Shaker, a vibration shaker controller.
sdynpy.fileio.sdynpy_escdfsdynpy.escdfFunctionality for reading and writing the Engineering Sciences Common Data Format.

Finite Elements and Similar Numerical Functionality

SDynPy has a limited set of finite element and other numerical functionality in the sdynpy.fem subpackage. This includes simple beam finite elements, electrodynamic shaker models, and sensor optimization routines to select optimal sensors for a test from finite element results. For convenience, the modules are aliased to the top-level namespace. The fem modules are:

FEM ModulesAliasDescription
sdynpy.fem.sdynpy_beamsdynpy.beamFunctionality for defining beam finite elements.
sdynpy.fem.sdynpy_shakersdynpy.shakerFunctionality for definining shaker electromechanical models per Lang and Snyder.
sdynpy.fem.sdynpy_dofsdynpy.dofTechniques such as effective independence used to select sensors for a test given finite element data
sdynpy.fem.sdynpy_exodusSee BelowFunctionality for reading and writing the Exodus finite element model format.

Because the Exodus file format is used often at Sandia National Laboratories where SDynPy was originally developed, key classes from the sdynpy_exodus module are also aliased to the top-level namespace.

Exodus ClassesAliasDescription
sdynpy.fem.sdynpy_exodus.Exodussdynpy.ExodusClass to represent an Exodus file as stored on the filesystem
sdynpy.fem.sdynpy_exodus.ExodusInMemorysdynpy.ExodusInMemoryClass that represents an Exodus file in memory in a format similar to a Matlab Structure

SDynPy has capabilities for performing experimental modal analysis which entails fitting modes to frequency response functions measured on the test article. These and similar capabilities exist in the sdynpy.modal subpackage. Many of the modules in this subpackage provide both code-based and GUI-based tools to fit modes to data. In the case of the modal subpackage, much of the useful content boils down to a handful of classes. Therefore, instead of aliasing the modules in the subpackage to the top-level namespace, SDynPy aliases these classes to the top-level namespace.

Modal ClassesAliasDescription
sdynpy.modal.sdynpy_polypy.PolyPysdynpy.PolyPyCode-based implementation of the PolyMax mode fitter.
sdynpy.modal.sdynpy_polypy.PolyPy_GUIsdynpy.PolyPy_GUIGUI-based implementation of the PolyMax mode fitter.
sdynpy.modal.sdynpy_smac.SMACsdynpy.SMACCode-based implemenation of the Synthesize Modes and Correlate mode fitter.
sdynpy.modal.sdynpy_smac.SMAC_GUIsdynpy.SMAC_GUIGUI-based implemenation of the Synthesize Modes and Correlate mode fitter.
sdynpy.modal.sdynpy_ccmif.ColoredCMIFsdynpy.ColoredCMIFGUI-based tool to interactively select and combine modes fit to multiple single-reference measurements.
sdynpy.modal.sdynpy_signal_processing_gui.SignalProcessingGUIsdynpy.SignalProcessingGUIGUI-based tool to compute spectral quantities from time histories.
sdynpy.modal.sdynpy_modal_test.ModalTestsdynpy.ModalTestA class to represent a typical modal test, intended to aid modal test practitioners in the data processing and documentation workflow.

Signal Processing

The sdynpy.signal_processing subpackage includes a wide variety of tools that are related to structural dynamics. Often, the code in this package is at a “lower level” than the rest of the SDynPy code, operating on raw data rather than SDynPy objects. Many times, SDynPy objects will often call these lower-level functions as part of their own operations. signal_processing functions can be faster in that they remove the bookkeeping overhead that a lot of SDynPy objects implement, but the user must then be aware that their data must be correctly sorted prior to using the techniques. Additionally, some of the content in signal_processing does not fit well within the existing SDynPy core objects, so the subpackage serves as a kind of catch-all for tools that can be used in structural dynamics, but perhaps are not commonly used. The modules of signal_processing are generally aliased to the top-level namespace.

Signal Processing ModulesAliasDescription
sdynpy.signal_processing.sdynpy_camerasdynpy.cameraVarious functions for dealing with data from cameras, including camera calibration.
sdynpy.signal_processing.sdynpy_complexsdynpy.complexUtility functions for working with complex numbers.
sdynpy.signal_processing.sdynpy_correlationsdynpy.correlationFunctions like the modal assurance cirterion for comparing data.
sdynpy.signal_processing.sdynpy_cpsdsdynpy.cpsdVarious functions for dealing with cross-power spectral density matrices.
sdynpy.signal_processing.sdynpy_frfsdynpy.frfVarious functions computing frequency response functions.
sdynpy.signal_processing.sdynpy_frf_inversesdynpy.frf_inverseVarious functions for inverting frequency response functions, including regularization.
sdynpy.signal_processing.sdynpy_generatorsdynpy.generatorVarious functions for generating common time signals, like pseudorandom or sine sweeps.
sdynpy.signal_processing.sdynpy_geometry_fittingsdynpy.geometry_fittingVarious functions for dealing with geometry; for example, fitting a shape to a point cloud, or finding intersection points of lines.
sdynpy.signal_processing.sdynpy_harmonicsdynpy.harmonicFunctions for fitting sine waves to data.
sdynpy.signal_processing.sdynpy_integrationsdynpy.integrationVarious functions for generating and integrating state space systems.
sdynpy.signal_processing.sdynpy_lrmsdynpy.lrmAdvanced FRF computation technique using local rational modeling.
sdynpy.signal_processing.sdynpy_rotationsdynpy.rotationVarious functions for dealing with rotations; rotation matrices, Rodrigues parameters, rigid body transformations.
sdynpy.signal_processing.sdynpy_srssdynpy.srsVarious functions for working with shock response spectra.

Documentation

SDynPy has limited functionality to create documentation for test or analysis results. This functionality is currently a work-in-progress, but capability exists to dump common formats into PowerPoint or LaTeX documents.

Documentation ModulesAliasDescription
sdynpy.doc.sdynpy_pptsdynpy.doc.pptVarious functions to document SDynPy results in a PowerPoint document.
sdynpy.doc.sdynpy_latexsdynpy.doc.latexVarious functions to document SDynPy results in a LaTeX document.

Demonstration Objects

Sometimes when a user has a new idea that they would like to try out, they simply want to quickly create a somewhat “interesting” system (e.g. something more than a simple beam or spring-mass-damper system), and generate data to explore. The sdynpy.demo subpackage provides two demonstration objects: a flat plate and a simple airplane-like model made out of beam elements. Note that there is some overhead in creating these demonstration objects, therefore the sdynpy.demo subpackage is not imported automatically with SDynPy, it must be imported separately using import sdynpy.demo. Because these are imported separately, there is no aliasing of the modules to the top-level namespace.

Demonstration ModulesAliasDescription
sdynpy.demo.beam_airplaneNoneCreates a system and geometry for a structure that looks like a V-tailed airplane.
sdynpy.demo.beam_plateNoneCreates a system and geometry for a structure that looks like a flat plate.