CreateSoundField#

class ansys.sound.core.signal_utilities.CreateSoundField(data=array([], dtype=float64), sampling_frequency=44100.0, unit='Pa')#

Creates a PyAnsys Sound field.

This class creates a DPF field with correct PyAnsys Sound metadata from a vector.

Class instantiation takes the following parameters.

Parameters:
datanumpy.ndarray, default: np.empty(0)

Data to use to create the PyAnsys Sound field as a 1D NumPy array.

sampling_frequencyfloat, default: 44100.0

Sampling frequency of the data.

unitstr, default: “Pa”

Unit of the data.

Methods

CreateSoundField.convert_fields_container_to_np_array(fc)

Convert a DPF fields container to a NumPy array.

CreateSoundField.get_output()

Get the data as a DPF field.

CreateSoundField.get_output_as_nparray()

Get the data as a NumPy array.

CreateSoundField.plot()

Plot the resulting signals in a single figure.

CreateSoundField.process()

Create the PyAnsys Sound field.

Attributes

CreateSoundField.data

Data to store in the created DPF field.

CreateSoundField.sampling_frequency

Sampling frequency in Hz of the data.

CreateSoundField.unit

Unit of the data to store.