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.

sdynpy.fileio.sdynpy_rattlesnake.RattlesnakeRandomEnvironmentData

Signature

class sdynpy.fileio.sdynpy_rattlesnake.RattlesnakeRandomEnvironmentData(channel_coordinates: 'CoordinateArray', sysid_averages: 'int', samples_per_frame: 'int', cpsd_overlap: 'int', cpsd_window: 'str', specification_frequency_lines: 'np.ndarray', specification_cpsd_matrix: 'np.ndarray', specification_warning_matrix: 'np.ndarray', specification_abort_matrix: 'np.ndarray', control_channel_indices: 'np.ndarray', fft_lines: 'int', sysid_frame_size: 'int' = None, sysid_averaging_type: 'str' = None, sysid_noise_averages: 'int' = None, sysid_exponential_averaging_coefficient: 'float' = None, sysid_estimator: 'str' = None, sysid_level: 'float' = None, sysid_level_ramp_time: 'float' = None, sysid_signal_type: 'str' = None, sysid_window: 'str' = None, sysid_overlap: 'float' = None, sysid_burst_on: 'float' = None, sysid_pretrigger: 'float' = None, sysid_burst_ramp_fraction: 'float' = None, sysid_low_frequency_cutoff: 'float' = None, sysid_high_frequency_cutoff: 'float' = None, test_level_ramp_time: 'float' = None, update_tf_during_control: 'int' = None, cola_window: 'str' = None, cola_overlap: 'float' = None, cola_window_exponent: 'float' = None, frames_in_cpsd: 'int' = None, control_python_script: 'os.pathlike' = None, control_python_function: 'str' = None, control_python_function_type: 'int' = None, control_python_function_parameters: 'str' = None, allow_automatic_aborts: 'int' = None, specification_channels: 'int' = None, control_channels: 'int' = None, **kwargs)

Data for a Rattlesnake Random vibration environment.

Parses variables, dimensions, and attributes from the environment group of a Rattlesnake nc4 file and provides convenience properties that return sdynpy array objects.

Parameters

Attributes

NameSummary
control_coordinateCoordinate array for the control channels of this environment.
specification_abort_psdUpper and lower abort-band PSDs for this random environment.
specification_cpsdTarget CPSD specification for this random environment.
specification_warning_psdUpper and lower warning-band PSDs for this random environment.

control_coordinate

Coordinate array for the control channels of this environment.

When a response_transformation_matrix is present the coordinates are synthetic sequential nodes (1-based, direction 0) whose count equals the number of transformed virtual channels. Otherwise channel_coordinates is indexed by control_channel_indices to return the physical control-channel coordinates.

Returns

specification_abort_psd

Upper and lower abort-band PSDs for this random environment.

Assembles two PowerSpectralDensityArray objects from the lower (index 0) and upper (index -1) slices of specification_abort_matrix along the first axis and concatenates them into a two-element array. Returns None when any required attribute is absent.

Returns

specification_cpsd

Target CPSD specification for this random environment.

Assembles a square PowerSpectralDensityArray from the specification_cpsd_matrix and specification_frequency_lines attributes loaded from the nc4 file. Returns None when any of those attributes are absent.

Returns

specification_warning_psd

Upper and lower warning-band PSDs for this random environment.

Assembles two PowerSpectralDensityArray objects from the lower (index 0) and upper (index -1) slices of specification_warning_matrix along the first axis and concatenates them into a two-element array. Returns None when any required attribute is absent.

Returns

Methods

NameSummary
__init__Store all environment parameters as instance attributes.
load_from_env_groupConstruct an instance by reading all data from an nc4 environment group.

__init__

def sdynpy.fileio.sdynpy_rattlesnake.RattlesnakeRandomEnvironmentData.__init__(self, channel_coordinates: 'CoordinateArray', sysid_averages: 'int', samples_per_frame: 'int', cpsd_overlap: 'int', cpsd_window: 'str', specification_frequency_lines: 'np.ndarray', specification_cpsd_matrix: 'np.ndarray', specification_warning_matrix: 'np.ndarray', specification_abort_matrix: 'np.ndarray', control_channel_indices: 'np.ndarray', fft_lines: 'int', sysid_frame_size: 'int' = None, sysid_averaging_type: 'str' = None, sysid_noise_averages: 'int' = None, sysid_exponential_averaging_coefficient: 'float' = None, sysid_estimator: 'str' = None, sysid_level: 'float' = None, sysid_level_ramp_time: 'float' = None, sysid_signal_type: 'str' = None, sysid_window: 'str' = None, sysid_overlap: 'float' = None, sysid_burst_on: 'float' = None, sysid_pretrigger: 'float' = None, sysid_burst_ramp_fraction: 'float' = None, sysid_low_frequency_cutoff: 'float' = None, sysid_high_frequency_cutoff: 'float' = None, test_level_ramp_time: 'float' = None, update_tf_during_control: 'int' = None, cola_window: 'str' = None, cola_overlap: 'float' = None, cola_window_exponent: 'float' = None, frames_in_cpsd: 'int' = None, control_python_script: 'os.pathlike' = None, control_python_function: 'str' = None, control_python_function_type: 'int' = None, control_python_function_parameters: 'str' = None, allow_automatic_aborts: 'int' = None, specification_channels: 'int' = None, control_channels: 'int' = None, **kwargs)

Store all environment parameters as instance attributes.

Every named parameter is assigned directly to self. Any additional keyword arguments (extra nc4 attributes, variables, or dimensions) are stored via __setattr__.

load_from_env_group

def sdynpy.fileio.sdynpy_rattlesnake.RattlesnakeRandomEnvironmentData.load_from_env_group(cls, parent: "'RattlesnakeData'", env_group: 'nc4.Group') -> "'RattlesnakeRandomEnvironmentData'"

Construct an instance by reading all data from an nc4 environment group.

Loads nc4 attributes, variables (including complex split-variable pairs stored as <name>_real / <name>_imag), and dimension sizes from env_group, then calls the constructor with channel_coordinates=parent.coordinate.

Parameters

Returns