@@ -0,0 +1,998 @@
+# -*- coding: utf-8 -*-%0A%0A# Third party imports%0Aimport pytest%0Afrom numpy import mean%0A%0A# Local application imports%0Afrom mosqito.functions.hearing_model.sine_wave_generator import sine_wave_generator%0Afrom mosqito.functions.hearing_model.comp_loudness import comp_loudness%0Afrom mosqito.functions.hearing_model.sone2phone import sone2phone%0A%0A%0A@pytest.mark.loudness_ecma  # to skip or run only loudness ecma tests%0Adef test_loudness_ecma():%0A    %22%22%22Test function for the Loudness_ecma calculation%0A%0A    Parameters%0A    ----------%0A    None%0A%0A    Outputs%0A    -------%0A    None%0A    %22%22%22%0A%0A    signal, samples = sine_wave_generator(%0A        fs=48000,%0A        t=1,%0A        spl_value=60,%0A        freq=1000,%0A    )%0A    t_array = comp_loudness(signal, validation=False)%5B1%5D%0A    mean_loudness_value = mean(t_array%5B:, 0%5D)%0A    phon_loudness_value = sone2phone(mean_loudness_value)%0A    assert phon_loudness_value %3C 60.1 and phon_loudness_value %3E 59.9%0A%0A%0A# test de la fonction%0Aif __name__ == %22__main__%22:%0A    test_loudness_ecma()%0A

Test for ECMA loudness computation