Module:
sdynpy.fileio.sdynpy_rattlesnakeSource: GitHub
Signature¶
def sdynpy.fileio.sdynpy_rattlesnake.read_sine_control_data(control_file, read_quantities='control_response_signals_combined', excitation_dofs=None, control_dofs=None)Read sine-control data from a Rattlesnake npz control file.
Extracts one or more control quantities and returns them as
TimeHistoryArray objects. Quantities whose keys are suffixed with
block indices (e.g. control_response_signals_combined_0) are
concatenated along the last axis before wrapping.
Parameters¶
control_file : str or numpy.lib.npyio.NpzFile Path to a Rattlesnake
.npzcontrol file, or an already-loadedNpzFileobject.read_quantities : str or list of str, optional Name or list of names of the quantity/quantities to extract. Valid values are:
Concatenated (built from numbered sub-keys):
'control_response_signals_combined','control_response_amplitudes','control_response_phases','control_drive_modifications'Unconcatenated (single array):
'control_response_frequencies','control_response_arguments','control_target_phases','control_target_amplitudes'Defaults to
'control_response_signals_combined'.excitation_dofs : CoordinateArray, optional Coordinate labels for excitation channels. When
None(default) sequential integer nodes with direction 0 are used.control_dofs : CoordinateArray, optional Coordinate labels for response/control channels. When
None(default) sequential integer nodes with direction 0 are used.
Returns¶
TimeHistoryArray or list of TimeHistoryArray
If read_quantities is a single string the return value is a single
TimeHistoryArray. If it is a list, a list ofTimeHistoryArrayobjects is returned in the same order.
Raises¶
ValueError
If any entry in read_quantities is not one of the valid quantity
names listed above.