ProminenceRatioForOrdersOverTime#

class ansys.sound.core.psychoacoustics.ProminenceRatioForOrdersOverTime(signal=None, profile=None, order_list=None)#

Computes the ECMA 418-1/ISO 7779 prominence ratio (PR) for specific orders over time.

This class computes the PR, as defined in ECMA 418-1 and ISO 7779 standards, following specific orders over time in a given time-domain signal.

Examples

Compute and display the prominence ratio over time of a signal, for orders 2 and 4.

>>> from ansys.sound.core.psychoacoustics import ProminenceRatioForOrdersOverTime
>>> prominence_ratio = ProminenceRatioForOrdersOverTime(
...     signal=my_signal,
...     profile=my_rpm_profile,
...     order_list=[2, 4],
... )
>>> prominence_ratio.process()
>>> pr_value_over_time_order_2 = prominence_ratio.get_order_prominence_ratio_over_time(0)
>>> pr_value_over_time_order_4 = prominence_ratio.get_order_prominence_ratio_over_time(1)
>>> time_scale = prominence_ratio.get_time_scale()
>>> prominence_ratio.plot()

See also

Calculate TNR and PR

Example demonstrating how to compute tone-to-noise ratio and prominence ratio.

Class instantiation takes the following parameters.

Parameters:
signalField, default: None

Signal on which to compute prominence ratio.

profileField, default: None

Associated RPM profile to the input signal.

order_listlist, default: None

List of the order numbers, as floats, on which to compute the prominence ratio.

Methods

ProminenceRatioForOrdersOverTime.get_order_prominence_ratio_over_time(...)

Get the prominence ratio (PR) over time for a specific order.

ProminenceRatioForOrdersOverTime.get_output()

Get PR data over time and its associated RPM profile.

ProminenceRatioForOrdersOverTime.get_output_as_nparray()

Get PR data in a tuple of NumPy arrays.

ProminenceRatioForOrdersOverTime.get_rpm_scale()

Get the RPM scale corresponding to the PR array over time.

ProminenceRatioForOrdersOverTime.get_time_scale()

Get the time scale corresponding to the PR array over time.

ProminenceRatioForOrdersOverTime.plot([...])

Plot all orders’ PR over time or RPM.

ProminenceRatioForOrdersOverTime.process()

Compute the prominence ratio for orders.

Attributes

ProminenceRatioForOrdersOverTime.order_list

Orders list as floats.

ProminenceRatioForOrdersOverTime.profile

RPM over time related to the input signal.

ProminenceRatioForOrdersOverTime.signal

Input signal.