pyOMA.core.ModalBase.ModalBase#

class pyOMA.core.ModalBase.ModalBase(prep_signals=None)[source]#

Bases: object

Base Class from which all other modal analysis classes should be inherited
  • provides commonly used functions s.t. these don’t have to be copied to each class

  • object type checks in post-processing functions can check for modal base instead of each possible modal analysis class

__init__(prep_signals=None)[source]#

Methods

__init__([prep_signals])

init_from_config(conf_file, prep_signals)

A method for initializing a modal object from configuration data bypassing common operations in explicit code for semi-automated analyses

integrate_quantities(vector, accel_channels, ...)

Rescales mode shapes from modal accelerations / velocities to modal displacements, by multiplication of the relevant modal coordinates (where accelerometers, or velocimeters were used, with $-1 omega^2$ or $i omega$, respectively,

load_state(fname, prep_signals)

Loads the state of the object from a compressed numpy archive file and returns the object This is only a stub for reimplementing the method in a derived class

remove_conjugates(eigval[, eigvec_r, ...])

This method finds complex conjugate modes, and removes unstable and overdamped poles.

rescale_mode_shape(modeshape[, rotate_only])

Rescales and rotates modeshapes in the complex plane.

save_state(fname)

Saves the state of the object to a compressed numpy archive file This is only a stub for reimplementing the method in a derived class

classmethod init_from_config(conf_file, prep_signals)[source]#

A method for initializing a modal object from configuration data bypassing common operations in explicit code for semi-automated analyses

This is a stub of the method that must be reimplemented by every derived class

static integrate_quantities(vector, accel_channels, velo_channels, omega)[source]#

Rescales mode shapes from modal accelerations / velocities to modal displacements, by multiplication of the relevant modal coordinates (where accelerometers, or velocimeters were used, with $-1 omega^2$ or $i omega$, respectively,

Parameters:
  • vector ((n_channels,) numpy.ndarray) – Complex modeshape for all n_channels

  • accel_channels (list) – A list containing the channel numbers of all acceleration channels

  • velo_channels (list) – A list containing the channel numbers of all velocity channels

  • omega (float) – The circular frequency of the corresponding mode ($omega = 2 pi f$)

Returns:

vector – Rescaled complex modeshape for all n_channels

Return type:

(n_channels,) numpy.ndarray

classmethod load_state(fname, prep_signals)[source]#

Loads the state of the object from a compressed numpy archive file and returns the object This is only a stub for reimplementing the method in a derived class

static remove_conjugates(eigval, eigvec_r=None, eigvec_l=None, inds_only=False)[source]#

This method finds complex conjugate modes, and removes unstable and overdamped poles.

A complex conjugate is defined as: \(\lambda_i = \overline{\lambda_j} \text{ for } i \neq j\)

Unstable poles, i.e. negatively damped poles, are defined by: \([\ln(|\lambda|)<0]: |\lambda_i|> 1\)

Overdamped poles, are purely real poles: \([\operatorname{atan}(\Im/\Re)=0]: \Im(\lambda_i)=0\)

The method keeps the second occurance of a conjugate pair (usually the one with the negative imaginary part) and either returns a truncated set of eigenvalues and eigenvectors or a list of (physical) poles that can be iterated.

Parameters:
  • eigval ((order,) numpy.ndarray) – Complex array of all eigenvalues

  • eigvec_r ((order, n_channels) numpy.ndarray, optional) – Complex array(s) of all right (left) eigenvectors

  • eigvec_l ((order, n_channels) numpy.ndarray, optional) – Complex array(s) of all right (left) eigenvectors

  • inds_only (bool, optional) – Whether to return a list of pole indices, or a reduced set of eigenvalues and eigenvectors

Returns:

  • conj_indices (list) – list of (physical) pole indices

  • eigval ((order,) numpy.ndarray) – Complex array of reduced (physical) eigenvalues

  • eigvec_l, eigvec_r ((order, n_channels) numpy.ndarray, optional) – Complex array(s) of reduced (physical) left (right) eigenvectors

static rescale_mode_shape(modeshape, rotate_only=False)[source]#

Rescales and rotates modeshapes in the complex plane. Default behaviour is to scale the larges component to unit modal displacement. If argument rotate_only is provided, the method given in Appendix C2 of Doehler 2013 (doi:0.1016/j.ymssp.2012.11.011) is used to rotate but not rescale the mode shape. Note: The scale of identified mode shapes is arbitrary in most OMA methods.

Parameters:
  • modeshape ((n_channels,) numpy.ndarray) – Complex modeshape for all n_channels

  • rotate_only (bool, optional) – Whether to rotate, but not rescale, the mode shape.

Returns:

modeshape – Rescaled complex modeshape for all n_channels

Return type:

(n_channels,) numpy.ndarray

save_state(fname)[source]#

Saves the state of the object to a compressed numpy archive file This is only a stub for reimplementing the method in a derived class