sdynpy.fem.sdynpy_dof.by_condition_number

by_condition_number(sensors_to_keep, shape_matrix, return_condition_numbers=False)[source]

Get the best set of degrees of freedom by mode shape condition number

This function accepts a shape matrix and returns the set of degrees of freedom that corresponds to the lowest condition number.

Parameters
  • sensors_to_keep (int) – The number of sensors to keep.

  • shape_matrix (np.ndarray) – A 2D or 3D numpy array. If it is a 2D array, the row indices should correspond to the degree of freedom and the column indices should correspond to the mode. For a 3D array, the first index corresponds to a “bundle” of channels (e.g. a triaxial accelerometer) that must be kept or removed as one unit.

  • return_condition_numbers (bool (default False)) – If True, return a second value that is the condition number at each iteration of the technique.

Returns

  • indices (np.array) – A 1d array corresponding to the indices to keep in the first dimension of the shape_matrix array (e.g. new_shape_matrix = shape_matrix[incies,…])

  • returned_condition_numbers (list) – The condition number at each iteration. Returned only if return_condition_numbers is True.