sdynpy.modal.sdynpy_modal_test.ModalTest
- class ModalTest(geometry=None, time_histories=None, autopower_spectra=None, frfs=None, coherence=None, fit_modes=None, resynthesized_frfs=None, response_unit=None, reference_unit=None, rigid_body_shapes=None, channel_table=None)[source]
Bases:
object
- __init__(geometry=None, time_histories=None, autopower_spectra=None, frfs=None, coherence=None, fit_modes=None, resynthesized_frfs=None, response_unit=None, reference_unit=None, rigid_body_shapes=None, channel_table=None)[source]
Methods
__init__
([geometry, time_histories, ...])create_documentation_latex
([...])edit_mode_comments
([mif])from_rattlesnake_modal_data
(input_file[, ...])plot_cmif
([measured, resynthesized, ...])Plots the complex mode indicator function
plot_drive_point_frfs
([part, plot_kwargs, ...])plot_mac
(*matrix_plot_args, **matrix_plot_kwargs)plot_mmif
([measured, resynthesized, ...])Plots the multi mode indicator function
plot_nmif
([measured, resynthesized, ...])Plots the normal mode indicator function
plot_psmif
([measured, resynthesized, ...])Plots the first singular value of the complex mode indicator function
plot_qmif
([measured, resynthesized, ...])Plots the complex mode indicator function computed from the imaginary part of the FRFs
plot_reciprocal_frfs
([plot_kwargs, ...])plot_reference_autospectra
([plot_kwargs, ...])retrieve_modes_opoly
(fit_modes[, ...])set_autopower_spectra
(autopower_spectra)set_channel_table
(channel_table)set_coherence
(coherence)set_fit_modes
(fit_modes)set_frfs
(frfs)set_geometry
(geometry)set_resynthesized_frfs
(resynthesized_frfs)set_rigid_body_shapes
(rigid_body_shapes)set_time_histories
(time_histories)set_units
(response_unit, reference_unit)Attributes
- compute_spectral_quantities(reference_indices, start_time, end_time, num_samples_per_frame, overlap, window, frf_estimator)[source]
- create_documentation_latex(coordinate_array='local', fit_modes_table=None, resynthesis_comparison='cmif', resynthesis_figure=None, one_file=True, global_animation_style='2d', geometry_animation_frames=200, geometry_animation_frame_rate=20, shape_animation_frames=20, shape_animation_frame_rate=20, animation_style_geometry=None, animation_style_rigid_body=None, animation_style_mode_shape=None, latex_root='', figure_root=None, geometry_figure_save_name=None, coordinate_figure_save_name=None, rigid_body_figure_save_names=None, complex_plane_figure_save_names=None, residual_figure_save_names=None, reference_autospectra_figure_save_names=None, drive_point_frfs_figure_save_names=None, reciprocal_frfs_figure_save_names=None, frf_coherence_figure_save_names=None, coherence_figure_save_names=None, fit_mode_information_save_names=None, mac_plot_save_name=None, resynthesis_plot_save_name=None, mode_shape_save_names=None, plot_geometry_kwargs={}, plot_shape_kwargs={}, plot_coordinate_kwargs={}, rigid_body_check_kwargs={}, resynthesis_plot_kwargs=None, fit_mode_table_kwargs={}, mac_plot_kwargs=None, include_name_geometry=None, include_name_signal_processing=None, include_name_rigid_body=None, include_name_data_quality=None, include_name_mode_fitting=None, include_name_mode_shape=None, include_name_channel_table=None, geometry_figure_label='fig:geometry', geometry_figure_caption='Geometry', geometry_graphics_options='width=0.7\\linewidth', geometry_animate_graphics_options='width=0.7\\linewidth,loop', geometry_figure_placement='[h]', coordinate_figure_label='fig:coordinate', coordinate_figure_caption='Local Coordinate Directions (Red: X+, Green: Y+, Blue: Z+)', coordinate_graphics_options='width=0.7\\linewidth', coordinate_animate_graphics_options='width=0.7\\linewidth,loop', coordinate_figure_placement='[h]', figure_label_rigid_body='fig:rigid_shapes', complex_plane_figure_label='fig:complex_plane', residual_figure_label='fig:rigid_shape_residual', figure_caption_rigid_body='Rigid body shapes extracted from test data.', complex_plane_caption='Complex Plane of the extracted shapes.', residual_caption='Rigid body residual showing non-rigid portions of the shapes.', graphics_options_rigid_body='width=\\linewidth', complex_plane_graphics_options='width=\\linewidth', residual_graphics_options='width=0.7\\linewidth', animate_graphics_options_rigid_body='width=\\linewidth,loop', figure_placement_rigid_body='', complex_plane_figure_placement='', residual_figure_placement='', subfigure_options_rigid_body='[t]{0.45\\linewidth}', subfigure_labels_rigid_body=None, subfigure_captions_rigid_body=None, complex_plane_subfigure_options='[t]{0.45\\linewidth}', complex_plane_subfigure_labels=None, max_subfigures_per_page_rigid_body=None, max_subfigures_first_page_rigid_body=None, reference_autospectra_figure_label='fig:reference_autospectra', reference_autospectra_figure_caption='Autospectra of the reference channels', reference_autospectra_graphics_options='width=0.7\\linewidth', reference_autospectra_figure_placement='', reference_autospectra_subfigure_options='[t]{0.45\\linewidth}', reference_autospectra_subfigure_labels=None, reference_autospectra_subfigure_captions=None, drive_point_frfs_figure_label='fig:drive_point_frf', drive_point_frfs_figure_caption='Drive point frequency response functions', drive_point_frfs_graphics_options='width=\\linewidth', drive_point_frfs_figure_placement='', drive_point_frfs_subfigure_options='[t]{0.45\\linewidth}', drive_point_frfs_subfigure_labels=None, drive_point_frfs_subfigure_captions=None, reciprocal_frfs_figure_label='fig:reciprocal_frfs', reciprocal_frfs_figure_caption='Reciprocal frequency response functions.', reciprocal_frfs_graphics_options='width=0.7\\linewidth', reciprocal_frfs_figure_placement='', reciprocal_frfs_subfigure_options='[t]{0.45\\linewidth}', reciprocal_frfs_subfigure_labels=None, reciprocal_frfs_subfigure_captions=None, frf_coherence_figure_label='fig:frf_coherence', frf_coherence_figure_caption='Drive point frequency response functions with coherence overlaid', frf_coherence_graphics_options='width=\\linewidth', frf_coherence_figure_placement='', frf_coherence_subfigure_options='[t]{0.45\\linewidth}', frf_coherence_subfigure_labels=None, frf_coherence_subfigure_captions=None, coherence_figure_label='fig:coherence', coherence_figure_caption='Coherence of all channels in the test.', coherence_graphics_options='width=0.7\\linewidth', coherence_figure_placement='', coherence_subfigure_options='[t]{0.45\\linewidth}', coherence_subfigure_labels=None, coherence_subfigure_captions=None, max_subfigures_per_page=None, max_subfigures_first_page=None, fit_modes_information_table_justification_string=None, fit_modes_information_table_longtable=True, fit_modes_information_table_header=True, fit_modes_information_table_horizontal_lines=False, fit_modes_information_table_placement='', fit_modes_information_figure_graphics_options='width=0.7\\linewidth', fit_modes_information_figure_placement='', fit_modes_table_justification_string=None, fit_modes_table_label='tab:mode_fits', fit_modes_table_caption='Modal parameters fit to the test data.', fit_modes_table_longtable=True, fit_modes_table_header=True, fit_modes_table_horizontal_lines=False, fit_modes_table_placement='', fit_modes_table_header_override=None, mac_plot_figure_label='fig:mac', mac_plot_figure_caption='Modal Assurance Criterion Matrix from Fit Modes', mac_plot_graphics_options='width=0.7\\linewidth', mac_plot_figure_placement='', resynthesis_plot_figure_label='fig:resynthesis', resynthesis_plot_figure_caption='Test data compared to equivalent data computed from modal fits.', resynthesis_plot_graphics_options='width=0.7\\linewidth', resynthesis_plot_figure_placement='', figure_label_mode_shape='fig:modeshapes', figure_caption_mode_shape='Mode shapes extracted from test data.', graphics_options_mode_shape='width=\\linewidth', animate_graphics_options_mode_shape='width=\\linewidth,loop', figure_placement_mode_shape='', subfigure_options_mode_shape='[t]{0.45\\linewidth}', subfigure_labels_mode_shape=None, subfigure_captions_mode_shape=None, max_subfigures_per_page_mode_shape=None, max_subfigures_first_page_mode_shape=None)[source]
- define_spectral_processing_parameters(reference_indices, num_samples_per_frame, num_averages, start_time, end_time, trigger, trigger_channel_index, trigger_slope, trigger_level, pretrigger, overlap, window, frf_estimator, sample_rate)[source]
- classmethod from_rattlesnake_modal_data(input_file, geometry=None, fit_modes=None, resynthesized_frfs=None, rigid_body_shapes=None)[source]
- plot_cmif(measured=True, resynthesized=False, mark_modes=False, measured_plot_kwargs={}, resynthesized_plot_kwargs={}, subplots_kwargs={})[source]
Plots the complex mode indicator function
- Parameters
measured (bool, optional) – If True, plots the measured MIF. The default is True.
resynthesized (bool, optional) – If True, plots resynthesized MIF. The default is False.
mark_modes (bool, optional) – If True, plots a vertical line at the frequency of each mode. The default is False.
measured_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the measured data is plotted. The default is {}.
resynthesized_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the resynthesized data is plotted. The default is {}.
subplots_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the figure and axes are created. This is passed to the plt.subplots function. The default is {}.
- Raises
ValueError – Raised if a required data has not been computed or assigned yet.
- Returns
fig (matplotlib.figure.Figure) – A reference to the figure on which the plot is plotted.
ax (matplotlib.axes.Axes) – A reference to the axes on which the plot is plotted.
- plot_figures_for_documentation(plot_geometry=True, geometry_kwargs={}, plot_coordinate=True, coordinate_kwargs={}, plot_rigid_body_checks=True, rigid_body_checks_kwargs={}, plot_reference_autospectra=True, reference_autospectra_kwargs={}, plot_drive_point_frfs=True, drive_point_frfs_kwargs={}, plot_reciprocal_frfs=True, reciprocal_frfs_kwargs={}, plot_frf_coherence=True, frf_coherence_kwargs={}, plot_coherence_image=True, coherence_image_kwargs={}, plot_cmif=True, cmif_kwargs={}, plot_qmif=False, qmif_kwargs={}, plot_nmif=False, nmif_kwargs={}, plot_mmif=False, mmif_kwargs={}, plot_modeshapes=True, modeshape_kwargs={}, plot_mac=True, mac_kwargs={})[source]
- plot_mmif(measured=True, resynthesized=False, mark_modes=False, measured_plot_kwargs={}, resynthesized_plot_kwargs={}, subplots_kwargs={})[source]
Plots the multi mode indicator function
- Parameters
measured (bool, optional) – If True, plots the measured MIF. The default is True.
resynthesized (bool, optional) – If True, plots resynthesized MIF. The default is False.
mark_modes (bool, optional) – If True, plots a vertical line at the frequency of each mode. The default is False.
measured_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the measured data is plotted. The default is {}.
resynthesized_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the resynthesized data is plotted. The default is {}.
subplots_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the figure and axes are created. This is passed to the plt.subplots function. The default is {}.
- Raises
ValueError – Raised if a required data has not been computed or assigned yet.
- Returns
fig (matplotlib.figure.Figure) – A reference to the figure on which the plot is plotted.
ax (matplotlib.axes.Axes) – A reference to the axes on which the plot is plotted.
- plot_nmif(measured=True, resynthesized=False, mark_modes=False, measured_plot_kwargs={}, resynthesized_plot_kwargs={}, subplots_kwargs={})[source]
Plots the normal mode indicator function
- Parameters
measured (bool, optional) – If True, plots the measured MIF. The default is True.
resynthesized (bool, optional) – If True, plots resynthesized MIF. The default is False.
mark_modes (bool, optional) – If True, plots a vertical line at the frequency of each mode. The default is False.
measured_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the measured data is plotted. The default is {}.
resynthesized_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the resynthesized data is plotted. The default is {}.
subplots_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the figure and axes are created. This is passed to the plt.subplots function. The default is {}.
- Raises
ValueError – Raised if a required data has not been computed or assigned yet.
- Returns
fig (matplotlib.figure.Figure) – A reference to the figure on which the plot is plotted.
ax (matplotlib.axes.Axes) – A reference to the axes on which the plot is plotted.
- plot_psmif(measured=True, resynthesized=False, mark_modes=False, measured_plot_kwargs={}, resynthesized_plot_kwargs={}, subplots_kwargs={})[source]
Plots the first singular value of the complex mode indicator function
- Parameters
measured (bool, optional) – If True, plots the measured MIF. The default is True.
resynthesized (bool, optional) – If True, plots resynthesized MIF. The default is False.
mark_modes (bool, optional) – If True, plots a vertical line at the frequency of each mode. The default is False.
measured_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the measured data is plotted. The default is {}.
resynthesized_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the resynthesized data is plotted. The default is {}.
subplots_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the figure and axes are created. This is passed to the plt.subplots function. The default is {}.
- Raises
ValueError – Raised if a required data has not been computed or assigned yet.
- Returns
fig (matplotlib.figure.Figure) – A reference to the figure on which the plot is plotted.
ax (matplotlib.axes.Axes) – A reference to the axes on which the plot is plotted.
- plot_qmif(measured=True, resynthesized=False, mark_modes=False, measured_plot_kwargs={}, resynthesized_plot_kwargs={}, subplots_kwargs={})[source]
Plots the complex mode indicator function computed from the imaginary part of the FRFs
- Parameters
measured (bool, optional) – If True, plots the measured MIF. The default is True.
resynthesized (bool, optional) – If True, plots resynthesized MIF. The default is False.
mark_modes (bool, optional) – If True, plots a vertical line at the frequency of each mode. The default is False.
measured_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the measured data is plotted. The default is {}.
resynthesized_plot_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the resynthesized data is plotted. The default is {}.
subplots_kwargs (dict, optional) – Dictionary containing keyword arguments to specify how the figure and axes are created. This is passed to the plt.subplots function. The default is {}.
- Raises
ValueError – Raised if a required data has not been computed or assigned yet.
- Returns
fig (matplotlib.figure.Figure) – A reference to the figure on which the plot is plotted.
ax (matplotlib.axes.Axes) – A reference to the axes on which the plot is plotted.
- property response_indices