diff --git a/doc/changelog.d/184.added.md b/doc/changelog.d/184.added.md new file mode 100644 index 000000000..69d9212ea --- /dev/null +++ b/doc/changelog.d/184.added.md @@ -0,0 +1 @@ +feat: source harmonics for sound composer \ No newline at end of file diff --git a/doc/source/api/sound_composer.rst b/doc/source/api/sound_composer.rst index 39cd67887..a8aca601a 100644 --- a/doc/source/api/sound_composer.rst +++ b/doc/source/api/sound_composer.rst @@ -9,6 +9,7 @@ Sound composer SourceSpectrum SourceBroadbandNoise SourceBroadbandNoiseTwoParameters + SourceHarmonics SourceAudio SourceControlSpectrum SourceControlTime diff --git a/src/ansys/sound/core/sound_composer/__init__.py b/src/ansys/sound/core/sound_composer/__init__.py index 8d7e3381d..c6558e449 100644 --- a/src/ansys/sound/core/sound_composer/__init__.py +++ b/src/ansys/sound/core/sound_composer/__init__.py @@ -33,6 +33,7 @@ from .source_broadband_noise_two_parameters import SourceBroadbandNoiseTwoParameters from .source_control_spectrum import SourceControlSpectrum from .source_control_time import SourceControlTime +from .source_harmonics import SourceHarmonics from .source_spectrum import SourceSpectrum __all__ = ( @@ -44,6 +45,7 @@ "SourceControlSpectrum", "SourceBroadbandNoise", "SourceBroadbandNoiseTwoParameters", + "SourceHarmonics", "SourceControlTime", "SourceAudio", ) diff --git a/src/ansys/sound/core/sound_composer/source_harmonics.py b/src/ansys/sound/core/sound_composer/source_harmonics.py new file mode 100644 index 000000000..db0d471af --- /dev/null +++ b/src/ansys/sound/core/sound_composer/source_harmonics.py @@ -0,0 +1,342 @@ +# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +"""Sound Composer's harmonics source.""" +import warnings + +from ansys.dpf.core import Field, FieldsContainer, Operator +from matplotlib import pyplot as plt +import numpy as np + +from .._pyansys_sound import PyAnsysSoundException, PyAnsysSoundWarning +from ._source_parent import SourceParent +from .source_control_time import SourceControlTime + +ID_COMPUTE_LOAD_SOURCE_HARMONICS = "sound_composer_load_source_harmonics" +ID_COMPUTE_GENERATE_SOUND_HARMONICS = "sound_composer_generate_sound_harmonics" + + +class SourceHarmonics(SourceParent): + """Sound Composer's harmonics source class. + + This class creates a harmonics source for the Sound Composer. A harmonics source is used to + generate a sound signal from a given harmonics source data and its source control. The + harmonics source data consists of a series of orders whose levels depend on RPM. The source + control contains the RPM values over time. + """ + + def __init__(self, file: str = "", source_control: SourceControlTime = None): + """Class instantiation takes the following parameters. + + Parameters + ---------- + file : str, default: "" + Path to the harmonics source data file. Supported files are the same XML and text (with + the header `AnsysSound_Orders`) formats as supported by Ansys Sound SAS. + source_control : SourceControlTime, default: None + Source control, consisting of the control parameter values over time, to use when + generating the sound from this source. + """ + super().__init__() + self.source_control = source_control + + # Define DPF Sound operators. + self.__operator_load = Operator(ID_COMPUTE_LOAD_SOURCE_HARMONICS) + self.__operator_generate = Operator(ID_COMPUTE_GENERATE_SOUND_HARMONICS) + + if len(file) > 0: + self.load_source_harmonics(file) + else: + self.source_harmonics = None + + def __str__(self) -> str: + """Return the string representation of the object.""" + # Source info. + if self.source_harmonics is not None: + orders, control_name, control_values = self.__extract_harmonics_info() + + # Source name. + str_name = self.source_harmonics.name + if str_name is None: + str_name = "" + + # Orders. + orders = np.round(orders, 1) + if len(orders) > 10: + str_order_values = f"{str(orders[:5])[:-1]} ... {str(orders[-5:])[1:]}" + else: + str_order_values = str(orders) + + # Order control values. + control_values = np.round(control_values, 1) + if len(control_values) > 10: + str_control_values = ( + f"{str(control_values[:5])[:-1]} ... {str(control_values[-5:])[1:]}" + ) + else: + str_control_values = str(control_values) + + str_source = ( + f"'{str_name}'\n" + f"\tNumber of orders: {len(orders)}\n" + f"\t\t{str_order_values}\n" + f"\tControl parameter: {control_name}, " + f"{np.round(np.min(control_values), 1)} - " + f"{np.round(np.max(control_values), 1)} rpm\n" + f"\t\t{str_control_values}" + ) + else: + str_source = "Not set" + + # Source control info. + if self.is_source_control_valid(): + str_source_control = ( + f"{self.source_control.control.name}\n" + f"\tMin: {self.source_control.control.data.min()}\n" + f"\tMax: {self.source_control.control.data.max()}\n" + f"\tDuration: " + f"{self.source_control.control.time_freq_support.time_frequencies.data[-1]} s" + ) + else: + str_source_control = "Not set/valid" + + return f"Harmonics source: {str_source}\nSource control: {str_source_control}" + + @property + def source_control(self) -> SourceControlTime: + """Harmonics source control. + + Contains the control parameter values over time. + """ + return self.__source_control + + @source_control.setter + def source_control(self, source_control: SourceControlTime): + """Set the source control.""" + if not (isinstance(source_control, SourceControlTime) or source_control is None): + raise PyAnsysSoundException( + "Specified source control object must be of type SourceControlTime." + ) + self.__source_control = source_control + + @property + def source_harmonics(self) -> FieldsContainer: + """Harmonics source data, as a DPF fields container. + + The harmonics source data consists of a series of orders whose levels depend on RPM. + """ + return self.__source_harmonics + + @source_harmonics.setter + def source_harmonics(self, source: FieldsContainer): + """Set the harmonics source data, from a DPF fields container.""" + if source is not None: + if not isinstance(source, FieldsContainer): + raise PyAnsysSoundException( + "Specified harmonics source must be provided as a DPF fields container." + ) + + if ( + len(source) < 1 + or len(source[0].data) < 1 + or len(source[0].time_freq_support.time_frequencies.data) < 1 + ): + raise PyAnsysSoundException( + "Specified harmonics source must contain at least one order level (the " + "provided DPF fields container must contain at least one field with at least " + "one data point)." + ) + + for field in source: + if len(field.data) != len(field.time_freq_support.time_frequencies.data): + raise PyAnsysSoundException( + "Each set of order levels in the specified harmonics source must contain " + "as many level values as the number of orders (in the provided DPF fields " + "container, each field must contain the same number of data points and " + "support values)." + ) + + if len(field.data) != len(source[0].data): + raise PyAnsysSoundException( + "Each set of order levels in the specified harmonics source must contain " + "the same number of level values (in the provided DPF fields container, " + "each field must contain the same number of data points)." + ) + + support_data = source.get_support("control_parameter_1") + support_properties = support_data.available_field_supported_properties() + support_values = support_data.field_support_by_property(support_properties[0]) + if len(support_values) != len(source): + raise PyAnsysSoundException( + "The specified harmonics source must contain as many sets of order levels as " + "the number of values in the associated control parameter (in the provided " + "DPF fields container, the number of fields should be the same as the number " + "of values in the fields container support)." + ) + + self.__source_harmonics = source + + def is_source_control_valid(self) -> bool: + """Source control verification function. + + Check if the source control is valid, that is, if the source control is set and contains at + least one control value. + + Returns + ------- + bool + True if the source control is valid. + """ + return ( + self.source_control is not None + and self.source_control.control is not None + and len(self.source_control.control.data) > 0 + ) + + def load_source_harmonics(self, file: str): + """Load the harmonics source data from a file. + + Parameters + ---------- + file : str + Path to the harmonics source data file. Supported files are the same XML and text (with + the header `AnsysSound_Orders`) formats as supported by Ansys Sound SAS. + """ + # Set operator inputs. + self.__operator_load.connect(0, file) + + # Run the operator. + self.__operator_load.run() + + # Get the loaded sound power level parameters. + self.source_harmonics = self.__operator_load.get_output(0, "fields_container") + + def process(self, sampling_frequency: float = 44100.0): + """Generate the sound of the harmonics source. + + This method generates the sound of the harmonics source, using the current harmonics + data and source control. + + Parameters + ---------- + sampling_frequency : float, default: 44100.0 + Sampling frequency of the generated sound in Hz. + """ + if sampling_frequency <= 0.0: + raise PyAnsysSoundException("Sampling frequency must be strictly positive.") + + if not self.is_source_control_valid(): + raise PyAnsysSoundException( + "Harmonics source control is not set. " + f"Use ``{__class__.__name__}.source_control``." + ) + + if self.source_harmonics is None: + raise PyAnsysSoundException( + f"Harmonics source data is not set. Use ``{__class__.__name__}.source_harmonics`` " + f"or method ``{__class__.__name__}.load_source_harmonics()``." + ) + + # Set operator inputs. + self.__operator_generate.connect(0, self.source_harmonics) + self.__operator_generate.connect(1, self.source_control.control) + self.__operator_generate.connect(2, sampling_frequency) + + # Run the operator. + self.__operator_generate.run() + + # Get the loaded sound power level parameters. + self._output = self.__operator_generate.get_output(0, "field") + + def get_output(self) -> Field: + """Get the generated sound as a DPF field. + + Returns + ------- + Field + Generated sound as a DPF field. + """ + if self._output == None: + warnings.warn( + PyAnsysSoundWarning( + "Output is not processed yet. " + f"Use the ``{__class__.__name__}.process()`` method." + ) + ) + return self._output + + def get_output_as_nparray(self) -> np.ndarray: + """Get the generated sound as a NumPy array. + + Returns + ------- + numpy.ndarray + Generated sound (signal samples in Pa) as a NumPy array. + """ + output = self.get_output() + + return np.array(output.data if output is not None else []) + + def plot(self): + """Plot the resulting signal in a figure.""" + if self._output == None: + raise PyAnsysSoundException( + f"Output is not processed yet. Use the '{__class__.__name__}.process()' method." + ) + output = self.get_output() + + time_data = output.time_freq_support.time_frequencies.data + + plt.plot(time_data, output.data) + plt.title(output.name if len(output.name) > 0 else "Signal from harmonics source") + plt.xlabel("Time (s)") + plt.ylabel("Amplitude (Pa)") + plt.grid(True) + plt.show() + + def __extract_harmonics_info(self) -> tuple[list[float], str, list[float]]: + """Extract the harmonics source information. + + Returns + ------- + tuple[list[float], str, list[float]] + Harmonics source information, consisting of the following elements: + First element is the list of order values. + + Second element is the control parameter name. + + Third element is the list of control parameter values. + """ + if self.source_harmonics is None: + return ([], "", []) + + # Orders (same values for each field). + orders = self.source_harmonics[0].time_freq_support.time_frequencies.data + + # Control parameter info. + support_ids = list(self.source_harmonics.get_label_space(0).keys()) + support = self.source_harmonics.get_support(support_ids[0]) + parameter_ids = support.available_field_supported_properties() + control_name = support.field_support_by_property(parameter_ids[0]).name + control_values = list(support.field_support_by_property(parameter_ids[0]).data) + + return orders, control_name, control_values diff --git a/tests/conftest.py b/tests/conftest.py index d6e18e6e3..a0c884a3c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -88,12 +88,32 @@ def pytest_configure(): os.path.join(base_dir, "AnsysSound_Spectrum_v3_-_nominal_-_dBSPLperHz_2024R2_20241121.txt"), server=server, ) - + pytest.data_path_sound_composer_harmonics_source_in_container = upload_file_in_tmp_folder( + os.path.join(base_dir, "AnsysSound_Orders dBSPL v1_2024R2_20241203.txt"), server=server + ) + pytest.data_path_sound_composer_harmonics_source_10rpm_40orders_in_container = ( + upload_file_in_tmp_folder( + os.path.join( + base_dir, "AnsysSound_Orders dBSPL v1_10_rpm_values_40_orders_2024R2_20241203.txt" + ), + server=server, + ) + ) + pytest.data_path_sound_composer_harmonics_source_Pa_in_container = upload_file_in_tmp_folder( + os.path.join(base_dir, "AnsysSound_Orders Pa v1_2024R2_20241203.txt"), server=server + ) + pytest.data_path_sound_composer_harmonics_source_wrong_type_in_container = ( + upload_file_in_tmp_folder( + os.path.join(base_dir, "AnsysSound_Orders V2_2024R2_20241203.txt"), server=server + ) + ) + pytest.data_path_sound_composer_harmonics_source_xml_in_container = upload_file_in_tmp_folder( + os.path.join(base_dir, "VRX_Waterfall_2024R2_20241203.xml"), server=server + ) pytest.data_path_flute_nonUnitaryCalib_as_txt_in_container = upload_file_in_tmp_folder( os.path.join(base_dir, "flute_nonUnitaryCalib_as_text_2024R2_20241125.txt"), server=server, ) - pytest.data_path_rpm_profile_as_wav_in_container = upload_file_in_tmp_folder( os.path.join(base_dir, "RPM_profile_2024R2_20241126.wav"), server=server ) @@ -103,14 +123,12 @@ def pytest_configure(): pytest.data_path_sound_composer_bbn_source_in_container = upload_file_in_tmp_folder( os.path.join(base_dir, "AnsysSound_BBN dBSPL OCTAVE Constants.txt"), server=server ) - pytest.data_path_sound_composer_bbn_source_40_values_in_container = upload_file_in_tmp_folder( os.path.join( base_dir, "AnsysSound_BBN dBSPLperHz NARROWBAND v2_40values_2024R2_20241128.txt" ), server=server, ) - pytest.data_path_sound_composer_bbn_source_2p_in_container = upload_file_in_tmp_folder( os.path.join( base_dir, "AnsysSound_BBN_MultipleParameters Pa2PerHz Narrowband v2_2024R2_20240418.txt" diff --git a/tests/data/AnsysSound_Orders Pa v1_2024R2_20241203.txt b/tests/data/AnsysSound_Orders Pa v1_2024R2_20241203.txt new file mode 100644 index 000000000..7ddf44e78 --- /dev/null +++ b/tests/data/AnsysSound_Orders Pa v1_2024R2_20241203.txt @@ -0,0 +1,304 @@ +AnsysSound_Orders 1 +Pa +RPM 12 24 36 48 60 +500 0.00230055 0.00475752 0.00127085 0.00389983 0.00098248 +510 0.00280545 0.0045141 0.00171955 0.00473541 0.00159459 +520 0.00348622 0.00477956 0.00234935 0.00584891 0.00250399 +530 0.00441053 0.0058541 0.00322898 0.00735813 0.0038452 +540 0.00585535 0.00819799 0.00461066 0.00965395 0.00591034 +550 0.00830433 0.01273707 0.00695472 0.0135307 0.00950537 +560 0.01295145 0.02187818 0.01132937 0.02077151 0.01631807 +570 0.02709491 0.04953568 0.02458098 0.04256349 0.03724725 +580 0.09880057 0.19219043 0.09187554 0.15133976 0.14572509 +590 0.02984488 0.06048545 0.02803783 0.04428839 0.04643888 +600 0.01701718 0.03514417 0.01584911 0.02427166 0.02740347 +610 0.01276554 0.02594782 0.01145855 0.01729968 0.02079454 +620 0.01071132 0.02109504 0.00910209 0.01339884 0.01767012 +630 0.00992222 0.01834817 0.00790715 0.01169909 0.01573914 +640 0.01015146 0.01613309 0.00694223 0.01100965 0.01470847 +650 0.01190348 0.01395919 0.0061043 0.01167422 0.01443477 +660 0.02142909 0.00901288 0.00510592 0.01904177 0.01743761 +670 0.01623703 0.01978897 0.0086004 0.015998 0.01819443 +680 0.00805701 0.01608232 0.00671247 0.00863632 0.01479154 +690 0.00920186 0.01529098 0.00637442 0.00959047 0.01535905 +700 0.01397096 0.0154742 0.00628921 0.01306902 0.01852615 +710 0.03438481 0.01881672 0.00571547 0.02954029 0.03197595 +720 0.01407047 0.00793078 0.00374037 0.01165112 0.00787876 +730 0.0040044 0.00810592 0.0047787 0.00296045 0.0057173 +740 0.00332504 0.00796794 0.00503585 0.00177257 0.00784631 +750 0.00481727 0.00721514 0.00523315 0.00267431 0.00928551 +760 0.00657916 0.00599084 0.00555617 0.00371864 0.0107239 +770 0.00885373 0.00421969 0.00632046 0.00486061 0.01309117 +780 0.01380695 0.00321789 0.00930627 0.00628095 0.0213075 +790 0.01553354 0.00487781 0.00657952 0.00655362 0.02312911 +800 0.0148457 0.00792761 0.00192106 0.00994655 0.01243859 +810 0.0200341 0.01997883 0.00191437 0.01473308 0.01233024 +820 0.03094308 0.04841211 0.00427428 0.02501753 0.01388433 +830 0.06432878 0.15288363 0.01800428 0.05938402 0.01958968 +840 0.04426707 0.17193558 0.02546103 0.0502879 0.02055629 +850 0.01168956 0.0987765 0.01751519 0.01974466 0.01970313 +860 0.01077418 0.08066815 0.01691409 0.00909495 0.02386195 +870 0.04266908 0.08798577 0.02469516 0.03522557 0.03426425 +880 0.0350846 0.04768366 0.01981678 0.04998466 0.00268969 +890 0.01231974 0.04401015 0.01758538 0.03660267 0.01779543 +900 0.01562178 0.0491079 0.0242659 0.04344256 0.03901401 +910 0.04885418 0.04271016 0.02309377 0.04800895 0.05548448 +920 0.02817649 0.0353347 0.00263466 0.01680889 0.01533481 +930 0.02248701 0.03699193 0.00524919 0.01122063 0.00318122 +940 0.02338992 0.03835594 0.00918105 0.00947239 0.00429639 +950 0.031341 0.03879237 0.01492729 0.00706417 0.01262273 +960 0.04306379 0.03702529 0.02056949 0.00558714 0.02265649 +970 0.98108008 0.15943608 0.26058275 0.15130962 0.31627256 +980 0.04384665 0.03894882 0.00905465 0.01689083 0.01590647 +990 0.02431832 0.04469084 0.00259133 0.01595538 0.01318341 +1000 0.01704061 0.04907249 0.00244913 0.01657446 0.01460244 +1010 0.01325274 0.05388354 0.00427785 0.0179732 0.0172714 +1020 0.01104244 0.06004169 0.00612761 0.02019195 0.02089322 +1030 0.00972679 0.06863319 0.0081323 0.02350342 0.02583266 +1040 0.00895437 0.08166346 0.01047915 0.02871197 0.03288465 +1050 0.00960413 0.1014664 0.01195789 0.038198 0.03928094 +1060 0.01061608 0.14403145 0.01693273 0.05343749 0.05594899 +1070 0.01038479 0.26649007 0.02846238 0.09108428 0.1005802 +1080 0.00896631 0.36538091 0.02625997 0.09856134 0.12160252 +1090 0.02150451 0.13514691 0.0057361 0.03781382 0.0516179 +1100 0.03718317 0.05799974 0.01957412 0.09038687 0.07888377 +1110 0.09155955 0.01295763 0.06009809 0.28495879 0.22239944 +1120 0.09103846 0.06930149 0.06564402 0.33557044 0.24419456 +1130 0.03910518 0.04216525 0.02984793 0.16569756 0.11255473 +1140 0.02460854 0.02990273 0.01981536 0.11838884 0.07472739 +1150 0.01817731 0.02310799 0.01565147 0.09867186 0.05765244 +1160 0.01469361 0.0189417 0.01380799 0.08951197 0.0482402 +1170 0.01266222 0.01644797 0.01323923 0.08599056 0.04261861 +1180 0.01151983 0.01515751 0.01355555 0.08641103 0.03930008 +1190 0.01105257 0.01479992 0.0146407 0.09044655 0.0376818 +1200 0.01122262 0.01521958 0.0165689 0.09868976 0.0376095 +1210 0.01215288 0.01639578 0.01966699 0.11299646 0.03932114 +1220 0.01422036 0.01853611 0.02476709 0.13782697 0.04367539 +1230 0.01839791 0.02233583 0.03406324 0.18471544 0.05304561 +1240 0.02761562 0.03012378 0.05503891 0.29316539 0.07549981 +1250 0.04636787 0.04359406 0.10777059 0.57732893 0.13039544 +1260 0.02105844 0.02597524 0.07401161 0.42479971 0.08545417 +1270 0.01664564 0.05437574 0.03875114 0.26865299 0.06398688 +1280 0.05935464 0.11452774 0.03694793 0.25193923 0.09162875 +1290 0.04493611 0.07663621 0.02837921 0.13802549 0.05027332 +1300 0.03452622 0.05902858 0.02292199 0.09452185 0.02988595 +1310 0.03086491 0.05608219 0.0213251 0.07576249 0.01834635 +1320 0.0320306 0.0611393 0.02506748 0.06912467 0.00457258 +1330 0.03872569 0.05084033 0.03914199 0.06532212 0.0387083 +1340 0.03437462 0.04922517 0.03404325 0.04618384 0.04038502 +1350 0.03626767 0.06338333 0.0360702 0.04575198 0.03937348 +1360 0.04197006 0.08347889 0.04387488 0.05207104 0.04408366 +1370 0.05300659 0.12024432 0.06004879 0.06481616 0.05658059 +1380 0.07705745 0.20537451 0.10081594 0.10250522 0.09118232 +1390 0.13182979 0.3977852 0.18050333 0.18467464 0.16334945 +1400 0.06408107 0.22934849 0.09055195 0.11919359 0.08065778 +1410 0.03355002 0.13849605 0.04634278 0.07836887 0.04159515 +1420 0.01906591 0.09312029 0.01868727 0.07871702 0.01800633 +1430 0.02792355 0.07840785 0.04304383 0.11620637 0.02197015 +1440 0.05350618 0.1128389 0.10664201 0.17298177 0.06871568 +1450 0.0415066 0.10260681 0.09227033 0.1208715 0.0659097 +1460 0.02925167 0.08471475 0.06935463 0.08390743 0.0536126 +1470 0.02372542 0.07659856 0.05740962 0.06924807 0.04846856 +1480 0.02199193 0.0748241 0.05084214 0.06472535 0.0484997 +1490 0.02356351 0.07902357 0.04673867 0.06689962 0.05417812 +1500 0.02984074 0.09072978 0.04230211 0.07665497 0.06916165 +1510 0.0411093 0.10153005 0.03065252 0.08831539 0.0944099 +1520 0.0388636 0.06876093 0.0287527 0.06802246 0.0921493 +1530 0.02984771 0.02822317 0.04927713 0.04461583 0.07465955 +1540 0.02839195 0.00669252 0.07525816 0.05164858 0.07902235 +1550 0.01777724 0.00832101 0.05998921 0.0407827 0.06248946 +1560 0.00760889 0.01855261 0.02597595 0.01739714 0.03668958 +1570 0.00576911 0.02977923 0.01240938 0.00978738 0.02886256 +1580 0.00732585 0.04722928 0.01403272 0.01547085 0.02985301 +1590 0.01107504 0.0815392 0.02563843 0.02844806 0.03973699 +1600 0.01986801 0.16722987 0.05271918 0.05808819 0.06969533 +1610 0.02421259 0.22874355 0.06865649 0.08151907 0.08706217 +1620 0.01444348 0.14019688 0.03876242 0.05864491 0.05094881 +1630 0.01218887 0.10253488 0.02534407 0.05883179 0.03689812 +1640 0.01479418 0.09098028 0.01927381 0.07892539 0.03369097 +1650 0.02254576 0.09247797 0.01684708 0.12577768 0.03641872 +1660 0.02154622 0.06450989 0.01543607 0.12180958 0.02488791 +1670 0.01280696 0.0401086 0.01327708 0.07146644 0.01122717 +1680 0.00870935 0.03426939 0.01203006 0.04643152 0.00613553 +1690 0.00684797 0.03257959 0.01123219 0.03345327 0.00375584 +1700 0.0060215 0.03218562 0.01066224 0.0257411 0.00225695 +1710 0.00578998 0.03276904 0.01030078 0.02077284 0.0016512 +1720 0.00601171 0.03447695 0.0101701 0.0174057 0.00249501 +1730 0.00674609 0.03763579 0.010502 0.01551221 0.00417569 +1740 0.00820255 0.04291107 0.01165661 0.01516675 0.00661088 +1750 0.01102036 0.05212466 0.01440211 0.01716024 0.01046831 +1760 0.01662705 0.06928376 0.02062188 0.02439492 0.01730583 +1770 0.0229361 0.08842814 0.02836673 0.03776674 0.02538033 +1780 0.02733482 0.09030788 0.03087247 0.04939439 0.0290168 +1790 0.02482096 0.05373913 0.02510646 0.05463327 0.01939208 +1800 0.02406303 0.03555504 0.02245885 0.06979355 0.01340282 +1810 0.03265004 0.04873353 0.02621803 0.11845331 0.02604866 +1820 0.02204237 0.03882856 0.01227534 0.09213254 0.03044044 +1830 0.00864748 0.01651394 0.00118223 0.03713085 0.01841322 +1840 0.00403135 0.00731984 0.00331569 0.01315966 0.01272527 +1850 0.0019231 0.00236033 0.00586344 0.00499129 0.00962807 +1860 0.00183066 0.00201611 0.00832172 0.02481442 0.00926287 +1870 0.00389886 0.00769065 0.00994782 0.05128901 0.01391671 +1880 0.00476677 0.01407228 0.00608772 0.05397544 0.01565425 +1890 0.00411493 0.01682171 0.00336965 0.03720111 0.0118972 +1900 0.00394162 0.01954202 0.00597566 0.03033225 0.00860691 +1910 0.0041241 0.02330473 0.01054072 0.04159026 0.00708205 +1920 0.00532565 0.02797499 0.01774948 0.0791546 0.01150545 +1930 0.00780599 0.03223174 0.02293949 0.12633778 0.01969108 +1940 0.00940844 0.03690067 0.01691118 0.1251313 0.01916678 +1950 0.01161176 0.04659249 0.00953551 0.11678921 0.01474999 +1960 0.01632748 0.06324636 0.00938261 0.13753465 0.0104661 +1970 0.02520695 0.09038625 0.02054233 0.2091667 0.01112295 +1980 0.04060835 0.13178292 0.03353003 0.3149969 0.01178675 +1990 0.04133337 0.11810751 0.04629491 0.334535 0.01720614 +2000 0.02847039 0.07510658 0.04407647 0.28043473 0.01955739 +2010 0.0219158 0.05995224 0.03727028 0.24237509 0.01655552 +2020 0.01764242 0.05013186 0.03665739 0.23374154 0.01385311 +2030 0.01757833 0.06344671 0.04182669 0.2690037 0.00913857 +2040 0.01958772 0.07285426 0.03262448 0.22846337 0.00144474 +2050 0.0178126 0.06128068 0.01913283 0.15262297 0.00805595 +2060 0.01571662 0.05105795 0.01217846 0.11036188 0.01110123 +2070 0.0139923 0.04438526 0.0093126 0.08933067 0.0129164 +2080 0.01240179 0.04010855 0.00887076 0.0802696 0.01438363 +2090 0.01054703 0.03793622 0.0100459 0.08099893 0.01586576 +2100 0.00864234 0.0391179 0.01111408 0.08653036 0.01738553 +2110 0.00846619 0.04144883 0.01051226 0.08067743 0.01905465 +2120 0.00803973 0.04376428 0.01235382 0.07538651 0.02181153 +2130 0.00662326 0.04914616 0.01859484 0.0781413 0.02664006 +2140 0.00400213 0.06086687 0.03340892 0.09028809 0.03586296 +2150 0.00796676 0.06778434 0.05735512 0.09239967 0.04511099 +2160 0.01170021 0.03550406 0.04938514 0.04279629 0.03171728 +2170 0.01074138 0.01633214 0.03858014 0.01693051 0.02668437 +2180 0.00950912 0.01010405 0.03564592 0.00922662 0.03216079 +2190 0.00888278 0.01006394 0.03667824 0.00932921 0.04598207 +2200 0.01067967 0.01578129 0.02819599 0.02798779 0.05258299 +2210 0.01106333 0.01969743 0.01119167 0.03805396 0.03705222 +2220 0.01040895 0.0221606 0.00258698 0.04139807 0.02675297 +2230 0.00985708 0.0253693 0.00253115 0.0447652 0.0227284 +2240 0.00947949 0.03003969 0.00514462 0.04937201 0.02248089 +2250 0.00919231 0.03716183 0.00716768 0.05574568 0.0254176 +2260 0.00839203 0.04771121 0.00810465 0.06416348 0.03194267 +2270 0.00516125 0.05529306 0.00836691 0.0612281 0.04183116 +2280 0.0014234 0.05578119 0.01175772 0.02717565 0.051868 +2290 0.00157584 0.05309835 0.01230174 0.03064761 0.05347661 +2300 0.00104973 0.03637336 0.00810743 0.0625299 0.03953572 +2310 0.00269218 0.03639949 0.01272771 0.0812313 0.04103575 +2320 0.00604917 0.01194407 0.01629313 0.05731642 0.02543991 +2330 0.01304863 0.01747185 0.02876329 0.06238918 0.01848027 +2340 0.01192032 0.033651 0.02739944 0.04503254 0.02461663 +2350 0.00878107 0.03067695 0.02210322 0.04610712 0.02685551 +2360 0.00923989 0.03529881 0.02224279 0.07363335 0.03135451 +2370 0.01071352 0.04705911 0.02533454 0.11547831 0.0405266 +2380 0.01047785 0.06348515 0.02264557 0.15781849 0.05399094 +2390 0.01166031 0.09271222 0.01110479 0.18835668 0.08328589 +2400 0.01064452 0.10355326 0.00748622 0.14982724 0.10076633 +2410 0.00422265 0.08859369 0.01530123 0.08096636 0.10982098 +2420 0.00646178 0.06556956 0.01373948 0.0618848 0.10195491 +2430 0.0085818 0.0486018 0.00978781 0.05994151 0.08729838 +2440 0.01052253 0.03773762 0.00615089 0.06415899 0.07828268 +2450 0.01611105 0.0296755 0.00108798 0.09828974 0.07019032 +2460 0.02833841 0.05021081 0.00893804 0.17189595 0.05670437 +2470 0.03041444 0.0630612 0.01693263 0.16782062 0.03740215 +2480 0.02334217 0.05345926 0.01683792 0.11439859 0.03706936 +2490 0.01887439 0.04574388 0.01560255 0.08080182 0.04166296 +2500 0.01671479 0.04074581 0.0147828 0.05944593 0.04577064 +2510 0.01580948 0.03757447 0.01457862 0.0440155 0.04966286 +2520 0.01581206 0.0358657 0.01487813 0.03161162 0.0545306 +2530 0.01685525 0.03554794 0.01572365 0.02060447 0.06155139 +2540 0.01961415 0.03713446 0.01748615 0.01325081 0.0727571 +2550 0.02599562 0.04249377 0.02139606 0.02586377 0.09320459 +2560 0.04112123 0.05648409 0.03090159 0.06671242 0.13709297 +2570 0.06211206 0.06609908 0.0384542 0.1167234 0.19142604 +2580 0.05425637 0.03656979 0.01709637 0.08388076 0.1364648 +2590 0.03934492 0.02449354 0.01114571 0.05216366 0.07379269 +2600 0.03113254 0.02402543 0.014608 0.03458162 0.05098103 +2610 0.02734895 0.02650027 0.01835958 0.02403442 0.05356212 +2620 0.02607151 0.03123694 0.02318647 0.03194844 0.07172171 +2630 0.02581882 0.03623573 0.02856664 0.06199152 0.09615365 +2640 0.02484769 0.03676664 0.03054168 0.08966618 0.10900474 +2650 0.02310359 0.03582004 0.02876107 0.11322225 0.11059537 +2660 0.0192472 0.02964645 0.02244011 0.1167987 0.08778542 +2670 0.01650931 0.02387209 0.01888168 0.10820483 0.06405903 +2680 0.01507586 0.02193735 0.01996869 0.1039518 0.05336253 +2690 0.01379168 0.02407396 0.02505116 0.10806969 0.05521484 +2700 0.01251073 0.03121281 0.03273078 0.12383379 0.06577351 +2710 0.01379428 0.04268833 0.03880438 0.15036362 0.08700742 +2720 0.01726812 0.060655 0.04705098 0.19310478 0.1343629 +2730 0.0214159 0.07827745 0.05687455 0.23107383 0.1985564 +2740 0.02137987 0.06678 0.0522401 0.18760159 0.20690216 +2750 0.01744469 0.05173705 0.04271978 0.12633362 0.17134795 +2760 0.01388951 0.05426491 0.03982196 0.0903651 0.12966711 +2770 0.0134313 0.05983971 0.03820307 0.07261253 0.10679674 +2780 0.01606817 0.06966522 0.0391192 0.06088128 0.09506373 +2790 0.02054184 0.07773447 0.0366719 0.04201329 0.0648659 +2800 0.01823257 0.05737703 0.0207754 0.02823156 0.01653977 +2810 0.01444091 0.03988014 0.01038222 0.03086416 0.01876064 +2820 0.0121895 0.03179838 0.00647699 0.03270276 0.02532729 +2830 0.01043568 0.02798418 0.00623061 0.03314278 0.02718617 +2840 0.00865221 0.02746948 0.00870192 0.0321512 0.02798889 +2850 0.00880928 0.02807781 0.01207314 0.03009182 0.0300242 +2860 0.01178761 0.02545638 0.01455058 0.02816911 0.03241386 +2870 0.01492416 0.02051859 0.01499341 0.02787012 0.03413114 +2880 0.01684815 0.01798061 0.01403238 0.02899541 0.03476567 +2890 0.01832496 0.02018984 0.0130167 0.02960052 0.03496617 +2900 0.02022515 0.026609 0.01289241 0.02906525 0.03695389 +2910 0.02195598 0.03296703 0.01279861 0.02836955 0.04170883 +2920 0.02173487 0.03275116 0.01091538 0.0314687 0.04413048 +2930 0.02120806 0.02943212 0.00830798 0.03649355 0.04247205 +2940 0.02025402 0.02803 0.00483849 0.03872863 0.03954968 +2950 0.01447136 0.02526555 0.00129277 0.03310504 0.03897212 +2960 0.00859217 0.01890414 0.00502503 0.02781411 0.0395872 +2970 0.00686084 0.01424088 0.0061524 0.02788589 0.03843874 +2980 0.00624878 0.01567113 0.00684916 0.02865836 0.03855222 +2990 0.00498843 0.01920118 0.0086572 0.02839345 0.04031918 +3000 0.00371909 0.01960854 0.0105462 0.02899138 0.04122706 +3010 0.00440186 0.01728037 0.01104076 0.03084488 0.04011377 +3020 0.00486785 0.01741048 0.01058694 0.03110238 0.03887535 +3030 0.00490124 0.02143945 0.01014179 0.03272649 0.04006211 +3040 0.00533644 0.02786141 0.0097422 0.03619492 0.04303183 +3050 0.00628239 0.03061451 0.00812811 0.03633156 0.03950138 +3060 0.00748179 0.02665012 0.0052999 0.03190194 0.02972891 +3070 0.01020598 0.02214998 0.00462621 0.02684295 0.02127268 +3080 0.01350105 0.01830914 0.00721484 0.02086978 0.01241161 +3090 0.0153353 0.01425283 0.00987267 0.01939007 0.00553551 +3100 0.01662706 0.01059513 0.01224446 0.02340331 0.00492296 +3110 0.0179111 0.00883972 0.01418906 0.02850014 0.00846095 +3120 0.01811503 0.00916195 0.01479414 0.03075337 0.01353861 +3130 0.01749934 0.00891529 0.01490054 0.03025227 0.01845211 +3140 0.01734455 0.00782152 0.01623508 0.02946257 0.02314404 +3150 0.01849307 0.00701808 0.01927036 0.02839599 0.02717434 +3160 0.01994443 0.00699364 0.02083744 0.0244148 0.02729323 +3170 0.01905444 0.00764643 0.01862414 0.01838251 0.02366362 +3180 0.01759007 0.00946572 0.01757309 0.01309367 0.02245001 +3190 0.02090831 0.01089222 0.02120987 0.00760096 0.02402296 +3200 0.02533322 0.00937846 0.02314052 0.00427563 0.02240571 +3210 0.02613591 0.0070534 0.02170128 0.00443315 0.01782119 +3220 0.0260062 0.00545423 0.01912967 0.00662926 0.01377573 +3230 0.02616089 0.00444246 0.01627409 0.00934921 0.01278095 +3240 0.026371 0.00383442 0.01365354 0.01063541 0.01400118 +3250 0.02690097 0.00370009 0.01144562 0.01244866 0.01561165 +3260 0.02710459 0.00431128 0.00996102 0.01504935 0.0161464 +3270 0.02670636 0.00542577 0.0086034 0.01660093 0.01623154 +3280 0.02612987 0.00667069 0.00678256 0.01696641 0.01640819 +3290 0.02576402 0.00762946 0.0041522 0.01694358 0.01669074 +3300 0.02553711 0.00831498 0.00090222 0.01836996 0.01781531 +3310 0.02512484 0.00939715 0.00387003 0.02117427 0.02055501 +3320 0.02486583 0.01134737 0.01045507 0.02484138 0.02523292 +3330 0.02574529 0.01515194 0.02041893 0.03025815 0.03287157 +3340 0.0301864 0.02226001 0.0344025 0.03744227 0.0442464 +3350 0.03926378 0.03060142 0.04662896 0.04205666 0.05360123 +3360 0.04627554 0.03425539 0.04718588 0.04158529 0.0529324 +3370 0.0506817 0.03520103 0.04146513 0.0426443 0.04900523 +3380 0.05735337 0.03704193 0.03566619 0.04819715 0.04757182 +3390 0.06958235 0.04035765 0.03073904 0.05820622 0.04884662 +3400 0.08578449 0.04255483 0.02720775 0.06913352 0.04940825 +3410 0.09164971 0.03760246 0.02686486 0.0699334 0.04274504 +3420 0.08222593 0.02791006 0.02767906 0.06148635 0.03306249 +3430 0.07072708 0.02071054 0.02771986 0.05575497 0.02903121 +3440 0.06188632 0.01855913 0.0278343 0.05347625 0.02892717 +3450 0.05409884 0.0190884 0.02756569 0.05499842 0.03071173 +3460 0.04617707 0.01990994 0.02642522 0.06235082 0.03597776 +3470 0.03840206 0.02094035 0.02459412 0.07498635 0.04504593 +3480 0.03728793 0.02413975 0.02487223 0.0859951 0.05441845 +3490 0.04767964 0.03005335 0.02974544 0.08024515 0.0541514 +3500 0.05593794 0.03597951 0.03467402 0.06186591 0.04457922 diff --git a/tests/data/AnsysSound_Orders V2_2024R2_20241203.txt b/tests/data/AnsysSound_Orders V2_2024R2_20241203.txt new file mode 100644 index 000000000..5cf2b8e50 --- /dev/null +++ b/tests/data/AnsysSound_Orders V2_2024R2_20241203.txt @@ -0,0 +1,304 @@ +AnsysSound_Orders 2 +dBSPL +km/h 12 24 36 48 60 +500 41.21603362 47.52701254 36.06128595 45.8003136 45.8003136 +510 42.93945075 47.0708236 38.68769626 47.48655183 47.48655183 +520 44.82649589 47.56715844 41.39835452 49.32089886 49.32089886 +530 46.8692157 49.32860282 44.16070719 51.31474922 51.31474922 +540 49.33045728 52.25354777 47.25466204 53.67350099 53.67350099 +550 52.36549207 56.0807908 50.82499308 56.60580539 56.60580539 +560 56.22576795 60.77962391 55.0635153 60.32876147 60.32876147 +570 62.63715434 67.87776267 61.79138396 66.5601447 66.5601447 +580 73.87458909 79.65403526 73.24339818 77.5784609 77.5784609 +590 63.47679683 69.61241841 62.93428805 66.90519794 66.90519794 +600 58.59715194 64.89646591 57.97949768 61.68138968 61.68138968 +610 56.1001839 62.26141762 55.16199337 58.74016148 58.74016148 +620 54.57625997 60.46300715 53.1622226 56.52074411 56.52074411 +630 53.91157713 59.25125519 51.93979964 55.34244173 55.34244173 +640 54.10997024 58.13375122 50.80938005 54.81487034 54.81487034 +650 55.49287902 56.87660446 49.69211747 55.32395755 55.32395755 +660 60.59947466 53.07667186 48.14088021 59.57354639 59.57354639 +670 58.18953195 59.90786389 52.6697731 58.06071394 58.06071394 +680 52.10287814 58.10637407 50.51704724 52.7059746 52.7059746 +690 53.25691252 57.66810649 50.06821359 53.61619791 53.61619791 +700 56.88392507 57.7715642 49.95132201 56.30426054 56.30426054 +710 64.70673266 59.47027854 49.12043908 63.38769518 63.38769518 +720 56.94557218 51.96571814 45.43769139 55.30675359 55.30675359 +730 46.03014914 52.15544635 47.56559543 43.4065547 43.4065547 +740 44.41533757 52.00632119 48.0208558 38.95146798 38.95146798 +750 47.63541986 51.14429533 48.35466375 42.52363505 42.52363505 +760 50.34280905 49.5291545 48.87491059 45.38708282 45.38708282 +770 52.92192556 46.48501102 49.99437383 47.71321561 47.71321561 +780 56.78135513 44.13082397 53.35491306 49.93990681 49.93990681 +790 57.80480889 47.74389768 50.34328431 50.30902521 50.30902521 +800 57.41141369 51.96224562 39.65021867 53.93284949 53.93284949 +810 60.01479683 59.99080112 39.61991768 57.34527103 57.34527103 +820 63.79067089 67.67848031 46.59665946 61.94428867 61.94428867 +830 70.14750639 77.6666198 59.08691525 69.45279196 69.45279196 +840 66.90101563 78.68671525 62.09691946 68.00867009 68.00867009 +850 55.33536338 73.87247276 58.84769714 59.88839328 59.88839328 +860 54.62708462 72.11344203 58.54437283 53.1554064 53.1554064 +870 66.58166567 72.86764887 61.83163697 64.91656067 64.91656067 +880 64.88173068 67.54679174 59.92006185 67.95613493 67.95613493 +890 55.79143094 66.85045706 58.88243523 65.24965541 65.24965541 +900 57.85401043 67.80242734 61.67932816 66.73770828 66.73770828 +910 67.75743465 66.59002405 61.24929681 67.60584424 67.60584424 +920 62.97713791 64.94342825 42.39389165 58.49018079 58.49018079 +930 61.01803435 65.3415399 48.38124594 54.97974492 54.97974492 +940 61.35997481 65.6560527 53.23724714 53.5085915 53.5085915 +950 63.90165708 65.75432635 57.45901949 50.96062293 50.96062293 +960 66.66164507 65.34936946 60.24387057 48.92319116 48.92319116 +970 93.81348924 78.03113225 82.29831335 77.5767309 77.5767309 +980 66.81812844 65.78928618 53.11683344 58.53241991 58.53241991 +990 61.69807147 66.98377044 42.24985455 58.03754313 58.03754313 +1000 58.60910283 67.79616199 41.75963685 58.36818784 58.36818784 +1010 56.42551364 68.60852249 46.60391113 59.07190823 59.07190823 +1020 54.84070105 69.54845824 49.72522241 60.08296533 60.08296533 +1030 53.73879088 70.71008379 52.18366791 61.40202131 61.40202131 +1040 53.0201008 72.21995562 54.38592123 63.14065992 63.14065992 +1050 53.62856069 74.10584513 55.53249117 65.62021257 65.62021257 +1060 54.49868374 77.14854674 58.55393975 68.5363211 68.5363211 +1070 54.30735446 82.4930207 63.06482434 73.16826868 73.16826868 +1080 53.03167509 85.23431715 62.3652846 73.85353207 73.85353207 +1090 60.62999111 76.5955225 49.15173437 65.53241114 65.53241114 +1100 65.38632833 69.24792102 59.81304502 73.10150704 73.10150704 +1110 73.21347308 56.22991158 69.55661348 83.07504125 83.07504125 +1120 73.16389814 70.79425153 70.32330347 84.49507403 84.49507403 +1130 65.82408587 66.47849368 63.47768444 78.36572235 78.36572235 +1140 61.80111705 63.49361688 59.91943942 75.44561539 75.44561539 +1150 59.16999236 61.25464351 57.87050275 73.86326638 73.86326638 +1160 57.32197026 59.52777917 56.78200936 73.01702239 73.01702239 +1170 56.02959718 58.30164619 56.41665463 72.66841563 72.66841563 +1180 55.20832149 57.59195736 56.62174295 72.71078372 72.71078372 +1190 54.84866557 57.38458744 57.29063692 73.1072402 73.1072402 +1200 54.98128524 57.62745344 58.36527362 73.86484194 73.86484194 +1210 55.67298428 58.27404173 59.85415803 75.04069685 75.04069685 +1220 57.03761191 59.33977205 61.85689973 76.76608426 76.76608426 +1230 59.27476989 60.959442 64.62511918 79.30946406 79.30946406 +1240 62.80249605 63.55758943 68.79279658 83.32165404 83.32165404 +1250 67.30374301 66.76794644 74.6294053 89.2078665 89.2078665 +1260 60.447924 62.27059147 71.36539712 86.54308432 86.54308432 +1270 58.40541004 68.68750369 65.74508975 82.56323366 82.56323366 +1280 69.44849359 75.1576139 65.33120233 82.00531604 82.00531604 +1290 67.03130957 71.66808046 63.03940612 76.77858604 76.77858604 +1300 64.74238076 69.4006468 61.18444646 73.49004435 73.49004435 +1310 63.76870039 68.95589938 60.55722161 71.56848488 71.56848488 +1320 64.09070157 69.70580933 61.96161363 70.77206151 70.77206151 +1330 65.73938338 68.1035673 65.83225812 70.28060551 70.28060551 +1340 64.7041582 67.82314458 64.62002037 67.26920089 67.26920089 +1350 65.1697932 70.01890113 65.12237109 67.18759796 67.18759796 +1360 66.43819189 72.4109334 66.82371892 68.31132512 68.31132512 +1370 68.46599741 75.5806915 69.5494853 70.21306604 70.21306604 +1380 71.71569275 80.23033089 74.04998416 74.19431973 74.19431973 +1390 76.37967129 85.9723725 79.10910445 79.30754531 79.30754531 +1400 70.11399518 81.18931779 73.11735623 75.5044581 75.5044581 +1410 64.49325575 76.80814783 67.29904174 71.86227178 71.86227178 +1420 59.58455086 73.36028648 59.4103173 71.90077298 71.90077298 +1430 62.8988127 71.86659099 66.65761824 75.28399879 75.28399879 +1440 68.54747901 75.02857696 74.53796653 78.73940682 78.73940682 +1450 66.34174328 74.2029238 73.28064156 75.62587832 75.62587832 +1460 63.30241339 72.53858076 70.80090927 72.45540847 72.45540847 +1470 61.48367827 71.66381219 69.15909353 70.78755356 70.78755356 +1480 60.82466698 71.46023012 68.10387653 70.20088824 70.20088824 +1490 61.42419975 71.934533 67.37292708 70.48787311 70.48787311 +1500 63.47559186 73.13439724 66.50664069 71.67020645 71.67020645 +1510 66.25820172 74.11129209 63.70872378 72.90012791 72.90012791 +1520 65.77026064 70.72623493 63.15297275 70.63244677 70.63244677 +1530 63.47762042 62.99151592 67.8323082 66.96917962 66.96917962 +1540 63.04330452 50.49119364 71.51047201 68.2405678 68.2405678 +1550 58.9766868 52.38292097 69.54086294 66.18891958 66.18891958 +1560 51.6058262 59.34750039 62.27082888 58.78895725 58.78895725 +1570 49.20157648 63.45766937 55.85440176 53.79272909 53.79272909 +1580 51.27656053 67.46362658 56.92223728 57.76968359 57.76968359 +1590 54.86630616 72.20672901 62.15722863 63.06045319 63.06045319 +1600 59.94248748 78.44567713 68.41877302 69.26115697 69.26115697 +1610 61.66022505 81.16637722 70.71303202 72.20458442 72.20458442 +1620 57.17283697 76.91416706 65.74761775 69.34400657 69.34400657 +1630 55.69866899 74.19683264 62.05692728 69.37164133 69.37164133 +1640 57.38121806 73.15834547 59.67875156 71.92373482 71.92373482 +1650 61.04069768 73.30016584 58.50989285 75.97147168 75.97147168 +1660 60.64682189 70.17192611 57.75013487 75.693029 75.693029 +1670 56.12832115 66.04415015 56.44145153 71.06144306 71.06144306 +1680 52.77911496 64.67752757 55.58475595 67.31565811 67.31565811 +1690 50.69063707 64.23831238 54.98868891 64.4681716 64.4681716 +1700 49.5734939 64.13263768 54.53636917 62.19194212 62.19194212 +1710 49.23294136 64.28867446 54.23680232 60.32931761 60.32931761 +1720 49.55936053 64.72997687 54.12590455 58.79322996 58.79322996 +1730 50.5604427 65.49142082 54.40484037 57.7928736 57.7928736 +1740 52.25837781 66.63078697 55.31084541 57.59725065 57.59725065 +1750 54.82331572 68.32026479 57.14792256 58.66986724 58.66986724 +1760 58.39570414 70.79202906 60.26596519 61.72538805 61.72538805 +1770 61.18979156 72.91120989 63.03558559 65.52159006 65.52159006 +1780 62.71372445 73.09391303 63.77082763 67.85295262 67.85295262 +1790 61.87577158 68.58521271 61.97510972 68.72854399 68.72854399 +1800 61.60640634 64.99742352 61.00715038 70.85570587 70.85570587 +1810 64.25707444 67.7359575 62.35140121 75.45034411 75.45034411 +1820 60.84456585 65.76242578 55.76007069 73.26766097 73.26766097 +1830 52.71719141 58.33641413 35.4334396 65.37409791 65.37409791 +1840 46.08841019 51.26943185 44.39087848 56.36429346 56.36429346 +1850 39.65943744 41.43885461 49.3424498 47.94365616 47.94365616 +1860 39.23155393 40.06968456 52.38366207 61.87348266 61.87348266 +1870 45.7981529 51.69866103 53.93395845 68.17988641 68.17988641 +1880 47.54388404 56.94668944 49.66849347 68.62332391 68.62332391 +1890 46.26664912 58.49680292 44.53109596 65.39051806 65.39051806 +1900 45.89289514 59.79878916 49.50711767 63.61749262 63.61749262 +1910 46.28598383 61.3282816 54.43680563 66.35923279 66.35923279 +1920 48.50685251 62.91479889 58.96311277 71.94892326 71.94892326 +1930 51.8279599 64.14507511 61.19107525 76.01006491 76.01006491 +1940 53.44975248 65.32008512 58.54287833 75.92671922 75.92671922 +1950 55.27736111 67.3457185 53.56627861 75.3274545 75.3274545 +1960 58.2377833 70.0001108 53.42587338 76.74764262 76.74764262 +1970 62.00980609 73.10144746 60.23239412 80.38925098 80.38925098 +1980 66.15170696 76.37658261 64.48807893 83.94552568 83.94552568 +1990 66.3054164 75.42495036 67.29006497 84.46823132 84.46823132 +2000 63.06726841 71.49295982 66.8635362 82.93603603 82.93603603 +2010 60.79454666 69.53550837 65.4066532 81.66915975 81.66915975 +2020 58.91056322 67.98167645 65.26263089 81.35411811 81.35411811 +2030 58.87895235 70.02758222 66.40847004 82.57456516 82.57456516 +2040 59.81907783 71.22849911 64.25027205 81.15573166 81.15573166 +2050 58.9939464 69.7258716 59.61498434 77.6517981 77.6517981 +2060 57.90658314 68.14066756 55.69124757 74.83578189 74.83578189 +2070 56.89718225 66.92417545 53.36081907 72.99941191 72.99941191 +2080 55.84908755 66.04413932 52.93861668 72.07042206 72.07042206 +2090 54.44200371 65.56048119 54.0191771 72.14898572 72.14898572 +2100 52.71202705 65.82691073 54.89687046 72.7227703 72.7227703 +2110 52.5331603 66.32964561 54.41332196 72.11444119 72.11444119 +2120 52.08422937 66.80179585 55.81542547 71.52527285 71.52527285 +2130 50.40083616 67.80919189 59.367249 71.83701273 71.83701273 +2140 46.02522392 69.66701947 64.45664882 73.0920094 73.0920094 +2150 52.00503477 70.60198752 69.15084394 73.29280849 73.29280849 +2160 55.34327322 64.98496046 67.85132587 66.60752252 66.60752252 +2170 54.60060171 58.24026197 65.70667607 58.5528009 58.5528009 +2180 53.54220665 54.06930982 65.01959665 53.28025278 53.28025278 +2190 52.95037821 54.03476086 65.26756985 53.37629747 53.37629747 +2200 54.55055675 57.9422501 62.98314704 62.91877222 62.91877222 +2210 54.85711742 59.8675914 54.95729801 65.58739723 65.58739723 +2220 54.32753853 60.89103038 42.23526151 66.31900198 66.31900198 +2230 53.85436571 62.06556977 42.04575774 66.99821067 66.99821067 +2240 53.51509954 63.53330902 48.20646612 67.84901625 67.84901625 +2250 53.24789333 65.38134193 51.08697225 68.90362444 68.90362444 +2260 52.45674064 67.5518087 52.15408538 70.1251583 70.1251583 +2270 48.234498 68.83281259 52.43070204 69.71841574 69.71841574 +2280 37.04593932 68.90915559 55.38586236 62.6629989 62.6629989 +2290 37.92964249 68.4810206 55.77873096 63.70733234 63.70733234 +2300 34.40095227 65.19506851 52.15706424 69.90115477 69.90115477 +2310 42.58148196 65.20130606 56.07440551 72.17386816 72.17386816 +2320 49.61331588 55.52244689 58.21949054 69.14498122 69.14498122 +2330 56.29069842 58.82617794 63.15617129 69.88158564 69.88158564 +2340 55.50515837 64.51935958 62.73423382 67.04992896 67.04992896 +2350 52.85034887 63.71564366 60.86851101 67.25476 67.25476 +2360 53.29273611 64.93460138 60.92318532 71.32089128 71.32089128 +2370 54.57804378 67.43227427 62.05366055 75.22940848 75.22940848 +2380 54.38484362 70.03284309 61.07906522 77.94255776 77.94255776 +2390 55.31360202 73.32213969 54.88960709 79.47902062 79.47902062 +2400 54.52192173 74.2826756 51.4646518 77.49121567 77.49121567 +2410 46.4911018 72.9274559 57.67392695 72.14549239 72.14549239 +2420 50.18644344 70.31344547 56.73880601 69.81107992 69.81107992 +2430 52.65096787 67.71244717 53.79311069 69.53395367 69.53395367 +2440 54.42180354 65.51489023 49.75815929 70.12455046 70.12455046 +2450 58.121877 63.42736099 34.71181833 73.82956381 73.82956381 +2460 63.02690967 67.99534464 53.00424596 78.68471298 78.68471298 +2470 63.64099658 69.9746447 58.55388846 78.47630651 78.47630651 +2480 61.34222464 68.53985894 58.50516892 75.14781352 75.14781352 +2490 59.49685858 67.18606006 57.84331175 72.12782295 72.12782295 +2500 58.44141858 66.1810592 57.37453411 69.4618426 69.4618426 +2510 57.9577518 65.47725736 57.25372841 66.85151288 66.85151288 +2520 57.95916916 65.07298632 57.43036707 63.97633514 63.97633514 +2530 58.51410406 64.99568886 57.91046745 60.25862904 60.25862904 +2540 59.83078993 65.37494234 58.83328408 56.42424862 56.42424862 +2550 62.27740368 66.54590535 60.58607623 62.23323668 62.23323668 +2560 66.26072202 69.01792281 63.77901661 70.46353399 70.46353399 +2570 69.84291875 70.38330838 65.6782757 75.32255868 75.32255868 +2580 68.66841477 65.24184942 58.63747825 72.45264722 72.45264722 +2590 65.87717342 61.76043123 54.92155487 68.3267612 68.3267612 +2600 63.84369118 61.59282347 57.27121529 64.75630677 64.75630677 +2610 62.71821323 62.44440606 59.25665492 61.59607301 61.59607301 +2620 62.30272379 63.87276975 61.28409279 64.06839323 64.06839323 +2630 62.21812788 65.16214039 63.09658332 69.82604579 69.82604579 +2640 61.88512049 65.28847894 63.67725854 73.03197345 73.03197345 +2650 61.25298946 65.06192142 63.15550087 75.05803571 75.05803571 +2660 59.66675127 63.41885402 60.99989972 75.32816027 75.32816027 +2670 58.33397854 61.53720895 59.50021275 74.66433303 74.66433303 +2680 57.545042 60.80308337 59.98639159 74.31604036 74.31604036 +2690 56.77174353 61.61035078 61.9559569 74.6534782 74.6534782 +2700 55.92505312 63.86605746 64.27852719 75.83618339 75.83618339 +2710 56.77338083 66.58558339 65.75701506 77.52225554 77.52225554 +2720 58.72430125 69.63673223 67.43077356 79.69526057 79.69526057 +2730 60.59412669 71.85213348 69.07775956 81.25441534 81.25441534 +2740 60.57950129 70.47232838 68.33948008 79.44413038 79.44413038 +2750 58.81266521 68.25543333 66.59198024 76.0097789 76.0097789 +2760 56.83313858 68.66978183 65.98185272 73.09941476 73.09941476 +2770 56.54176108 69.51918969 65.62136537 71.19963146 71.19963146 +2780 58.09872844 70.83972035 65.82719938 69.66907558 69.66907558 +2790 60.23218693 71.79167292 65.26606832 66.44713392 66.44713392 +2800 59.19635788 69.15416137 60.33038797 62.99409762 62.99409762 +2810 57.17129131 65.99453357 54.30520463 63.76848932 63.76848932 +2820 55.69911792 64.02749999 50.20686462 64.27108823 64.27108823 +2830 54.34981515 62.9176518 49.87001144 64.38717877 64.38717877 +2840 52.72194112 62.75640885 52.77170181 64.12334383 64.12334383 +2850 52.87820837 62.9466647 55.61580482 63.54836919 63.54836919 +2860 55.40791526 62.09533299 57.23700619 62.9748626 62.9748626 +2870 57.45719801 60.22235036 57.49740843 62.88217686 62.88217686 +2880 58.51044449 59.07548851 56.92202683 63.22598517 63.22598517 +2890 59.24026079 60.08205763 56.269418 63.4053869 63.4053869 +2900 60.09723511 62.47997116 56.18608225 63.24688134 63.24688134 +2910 60.81045662 64.34099655 56.1226562 63.03644903 63.03644903 +2920 60.72254103 64.28393382 54.74017728 63.93697613 63.93697613 +2930 60.50941895 63.355831 52.36930893 65.22372234 65.22372234 +2940 60.10962478 62.93186204 47.67359704 65.74004277 65.74004277 +2950 57.18958704 62.02997522 36.20982539 64.37728243 64.37728243 +2960 52.66145731 59.51053859 48.00217326 62.86470344 62.86470344 +2970 50.70694591 57.05013662 49.76029136 62.88709028 62.88709028 +2980 49.89530478 57.88140635 50.69214632 63.12442676 63.12442676 +2990 47.93867773 59.64595846 52.7269491 63.0437634 63.0437634 +3000 45.38813385 59.82830526 54.44132015 63.22477786 63.22477786 +3010 46.8521246 58.73046083 54.83937948 63.76306179 63.76306179 +3020 47.72614383 58.79561498 54.47480912 63.83527255 63.83527255 +3030 47.78551947 60.60367289 54.10169236 64.27738866 64.27738866 +3040 48.5244327 62.87946191 53.75254091 65.15235251 65.15235251 +3050 49.94189795 63.69794634 52.17919153 65.18508101 65.18508101 +3060 51.45951037 62.49338346 48.46475359 64.05574196 64.05574196 +3070 54.15649435 60.88686686 47.28390695 62.55600494 62.55600494 +3080 56.586751 59.232759 51.14393417 60.36975751 60.36975751 +3090 57.69324561 57.05742219 53.8680925 59.73098763 59.73098763 +3100 58.39570937 54.48152588 55.73819282 61.36494579 61.36494579 +3110 59.04184526 52.90817026 57.01847259 63.07633995 63.07633995 +3120 59.14018124 53.21915843 57.38119457 63.73725435 63.73725435 +3130 58.83983347 52.98210958 57.44344024 63.59455944 63.59455944 +3140 58.76266082 51.84522329 58.18848875 63.36481263 63.36481263 +3150 59.31958036 50.90376638 59.67719665 63.04454038 63.04454038 +3160 59.97583267 50.87346555 60.35628733 61.73246351 61.73246351 +3170 59.57932388 51.64857443 59.38092464 59.2674963 59.2674963 +3180 58.88475144 53.50247316 58.87636275 56.32062791 56.32062791 +3190 60.3857787 54.72172818 60.51016022 51.59676903 51.59676903 +3200 62.05320798 53.4220307 61.26686237 46.5994024 46.5994024 +3210 62.32415261 50.94737036 60.7091071 46.91364861 46.91364861 +3220 62.28093805 48.71406904 59.61354965 50.40870113 50.40870113 +3230 62.33245038 46.93187061 58.20933436 53.39489839 53.39489839 +3240 62.40193206 45.65339371 56.68430543 54.51448482 54.51448482 +3250 62.57475889 45.34364584 55.15218655 55.8818522 55.8818522 +3260 62.64025693 46.67152468 53.94547633 57.52975494 57.52975494 +3270 62.51169407 48.66862769 52.67280239 58.38204845 58.38204845 +3280 62.32214507 50.46281526 50.60727297 58.57119924 58.57119924 +3290 62.19967264 51.6292761 46.34496537 58.55950364 58.55950364 +3300 62.12283503 52.37662427 33.08564909 59.2615643 59.2615643 +3310 61.98146618 53.43932327 45.73368672 60.49556902 60.49556902 +3320 61.89145929 55.07730441 54.36593898 61.88291445 61.88291445 +3330 62.19335585 57.58876492 60.18005969 63.59624752 63.59624752 +3340 63.57562654 60.92990719 64.71120016 65.4466435 65.4466435 +3350 65.85924224 63.69423168 67.35251467 66.45609568 66.45609568 +3360 67.28642999 64.67397841 67.45564126 66.35819478 66.35819478 +3370 68.07642356 64.91050751 66.33306071 66.57661989 66.57661989 +3380 69.15057892 65.35327222 65.02453446 67.63982725 67.63982725 +3390 70.82938193 66.09791748 63.73320609 69.27878802 69.27878802 +3400 72.64757556 66.55837729 62.67325265 70.77317349 70.77317349 +3410 73.22202199 65.48372525 62.56309172 70.87309295 70.87309295 +3420 72.27957597 62.89461549 62.82242683 69.75497434 69.75497434 +3430 70.97111465 60.30322854 62.83522074 68.90507182 68.90507182 +3440 69.81129326 59.35055236 62.87100616 68.54261899 68.54261899 +3450 68.64315915 59.59479063 62.78677744 68.78640435 68.78640435 +3460 67.26792754 59.96079911 62.41977232 69.87624348 69.87624348 +3470 65.66649052 60.39907881 61.79602584 71.47904438 71.47904438 +3480 65.41076558 61.63405545 61.89369459 72.6688742 72.6688742 +3490 67.54605944 63.53725787 63.44780804 72.06777595 72.06777595 +3500 68.93352946 65.10050498 64.77948399 69.8084282 69.8084282 \ No newline at end of file diff --git a/tests/data/AnsysSound_Orders dBSPL v1_10_rpm_values_40_orders_2024R2_20241203.txt b/tests/data/AnsysSound_Orders dBSPL v1_10_rpm_values_40_orders_2024R2_20241203.txt new file mode 100644 index 000000000..a11e608d2 --- /dev/null +++ b/tests/data/AnsysSound_Orders dBSPL v1_10_rpm_values_40_orders_2024R2_20241203.txt @@ -0,0 +1,13 @@ +AnsysSound_Orders 1 +dBSPL +RPM 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 +500 41.21603362 47.52701254 36.06128595 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 45.8003136 +510 42.93945075 47.0708236 38.68769626 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 47.48655183 +520 44.82649589 47.56715844 41.39835452 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 49.32089886 +530 46.8692157 49.32860282 44.16070719 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 51.31474922 +540 49.33045728 52.25354777 47.25466204 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 53.67350099 +550 52.36549207 56.0807908 50.82499308 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 56.60580539 +560 56.22576795 60.77962391 55.0635153 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 60.32876147 +570 62.63715434 67.87776267 61.79138396 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 66.5601447 +580 73.87458909 79.65403526 73.24339818 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 77.5784609 +590 63.47679683 69.61241841 62.93428805 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 66.90519794 diff --git a/tests/data/AnsysSound_Orders dBSPL v1_2024R2_20241203.txt b/tests/data/AnsysSound_Orders dBSPL v1_2024R2_20241203.txt new file mode 100644 index 000000000..e9a025289 --- /dev/null +++ b/tests/data/AnsysSound_Orders dBSPL v1_2024R2_20241203.txt @@ -0,0 +1,304 @@ +AnsysSound_Orders 1 +dBSPL +RPM 12 24 36 48 60 +500 41.21603362 47.52701254 36.06128595 45.8003136 45.8003136 +510 42.93945075 47.0708236 38.68769626 47.48655183 47.48655183 +520 44.82649589 47.56715844 41.39835452 49.32089886 49.32089886 +530 46.8692157 49.32860282 44.16070719 51.31474922 51.31474922 +540 49.33045728 52.25354777 47.25466204 53.67350099 53.67350099 +550 52.36549207 56.0807908 50.82499308 56.60580539 56.60580539 +560 56.22576795 60.77962391 55.0635153 60.32876147 60.32876147 +570 62.63715434 67.87776267 61.79138396 66.5601447 66.5601447 +580 73.87458909 79.65403526 73.24339818 77.5784609 77.5784609 +590 63.47679683 69.61241841 62.93428805 66.90519794 66.90519794 +600 58.59715194 64.89646591 57.97949768 61.68138968 61.68138968 +610 56.1001839 62.26141762 55.16199337 58.74016148 58.74016148 +620 54.57625997 60.46300715 53.1622226 56.52074411 56.52074411 +630 53.91157713 59.25125519 51.93979964 55.34244173 55.34244173 +640 54.10997024 58.13375122 50.80938005 54.81487034 54.81487034 +650 55.49287902 56.87660446 49.69211747 55.32395755 55.32395755 +660 60.59947466 53.07667186 48.14088021 59.57354639 59.57354639 +670 58.18953195 59.90786389 52.6697731 58.06071394 58.06071394 +680 52.10287814 58.10637407 50.51704724 52.7059746 52.7059746 +690 53.25691252 57.66810649 50.06821359 53.61619791 53.61619791 +700 56.88392507 57.7715642 49.95132201 56.30426054 56.30426054 +710 64.70673266 59.47027854 49.12043908 63.38769518 63.38769518 +720 56.94557218 51.96571814 45.43769139 55.30675359 55.30675359 +730 46.03014914 52.15544635 47.56559543 43.4065547 43.4065547 +740 44.41533757 52.00632119 48.0208558 38.95146798 38.95146798 +750 47.63541986 51.14429533 48.35466375 42.52363505 42.52363505 +760 50.34280905 49.5291545 48.87491059 45.38708282 45.38708282 +770 52.92192556 46.48501102 49.99437383 47.71321561 47.71321561 +780 56.78135513 44.13082397 53.35491306 49.93990681 49.93990681 +790 57.80480889 47.74389768 50.34328431 50.30902521 50.30902521 +800 57.41141369 51.96224562 39.65021867 53.93284949 53.93284949 +810 60.01479683 59.99080112 39.61991768 57.34527103 57.34527103 +820 63.79067089 67.67848031 46.59665946 61.94428867 61.94428867 +830 70.14750639 77.6666198 59.08691525 69.45279196 69.45279196 +840 66.90101563 78.68671525 62.09691946 68.00867009 68.00867009 +850 55.33536338 73.87247276 58.84769714 59.88839328 59.88839328 +860 54.62708462 72.11344203 58.54437283 53.1554064 53.1554064 +870 66.58166567 72.86764887 61.83163697 64.91656067 64.91656067 +880 64.88173068 67.54679174 59.92006185 67.95613493 67.95613493 +890 55.79143094 66.85045706 58.88243523 65.24965541 65.24965541 +900 57.85401043 67.80242734 61.67932816 66.73770828 66.73770828 +910 67.75743465 66.59002405 61.24929681 67.60584424 67.60584424 +920 62.97713791 64.94342825 42.39389165 58.49018079 58.49018079 +930 61.01803435 65.3415399 48.38124594 54.97974492 54.97974492 +940 61.35997481 65.6560527 53.23724714 53.5085915 53.5085915 +950 63.90165708 65.75432635 57.45901949 50.96062293 50.96062293 +960 66.66164507 65.34936946 60.24387057 48.92319116 48.92319116 +970 93.81348924 78.03113225 82.29831335 77.5767309 77.5767309 +980 66.81812844 65.78928618 53.11683344 58.53241991 58.53241991 +990 61.69807147 66.98377044 42.24985455 58.03754313 58.03754313 +1000 58.60910283 67.79616199 41.75963685 58.36818784 58.36818784 +1010 56.42551364 68.60852249 46.60391113 59.07190823 59.07190823 +1020 54.84070105 69.54845824 49.72522241 60.08296533 60.08296533 +1030 53.73879088 70.71008379 52.18366791 61.40202131 61.40202131 +1040 53.0201008 72.21995562 54.38592123 63.14065992 63.14065992 +1050 53.62856069 74.10584513 55.53249117 65.62021257 65.62021257 +1060 54.49868374 77.14854674 58.55393975 68.5363211 68.5363211 +1070 54.30735446 82.4930207 63.06482434 73.16826868 73.16826868 +1080 53.03167509 85.23431715 62.3652846 73.85353207 73.85353207 +1090 60.62999111 76.5955225 49.15173437 65.53241114 65.53241114 +1100 65.38632833 69.24792102 59.81304502 73.10150704 73.10150704 +1110 73.21347308 56.22991158 69.55661348 83.07504125 83.07504125 +1120 73.16389814 70.79425153 70.32330347 84.49507403 84.49507403 +1130 65.82408587 66.47849368 63.47768444 78.36572235 78.36572235 +1140 61.80111705 63.49361688 59.91943942 75.44561539 75.44561539 +1150 59.16999236 61.25464351 57.87050275 73.86326638 73.86326638 +1160 57.32197026 59.52777917 56.78200936 73.01702239 73.01702239 +1170 56.02959718 58.30164619 56.41665463 72.66841563 72.66841563 +1180 55.20832149 57.59195736 56.62174295 72.71078372 72.71078372 +1190 54.84866557 57.38458744 57.29063692 73.1072402 73.1072402 +1200 54.98128524 57.62745344 58.36527362 73.86484194 73.86484194 +1210 55.67298428 58.27404173 59.85415803 75.04069685 75.04069685 +1220 57.03761191 59.33977205 61.85689973 76.76608426 76.76608426 +1230 59.27476989 60.959442 64.62511918 79.30946406 79.30946406 +1240 62.80249605 63.55758943 68.79279658 83.32165404 83.32165404 +1250 67.30374301 66.76794644 74.6294053 89.2078665 89.2078665 +1260 60.447924 62.27059147 71.36539712 86.54308432 86.54308432 +1270 58.40541004 68.68750369 65.74508975 82.56323366 82.56323366 +1280 69.44849359 75.1576139 65.33120233 82.00531604 82.00531604 +1290 67.03130957 71.66808046 63.03940612 76.77858604 76.77858604 +1300 64.74238076 69.4006468 61.18444646 73.49004435 73.49004435 +1310 63.76870039 68.95589938 60.55722161 71.56848488 71.56848488 +1320 64.09070157 69.70580933 61.96161363 70.77206151 70.77206151 +1330 65.73938338 68.1035673 65.83225812 70.28060551 70.28060551 +1340 64.7041582 67.82314458 64.62002037 67.26920089 67.26920089 +1350 65.1697932 70.01890113 65.12237109 67.18759796 67.18759796 +1360 66.43819189 72.4109334 66.82371892 68.31132512 68.31132512 +1370 68.46599741 75.5806915 69.5494853 70.21306604 70.21306604 +1380 71.71569275 80.23033089 74.04998416 74.19431973 74.19431973 +1390 76.37967129 85.9723725 79.10910445 79.30754531 79.30754531 +1400 70.11399518 81.18931779 73.11735623 75.5044581 75.5044581 +1410 64.49325575 76.80814783 67.29904174 71.86227178 71.86227178 +1420 59.58455086 73.36028648 59.4103173 71.90077298 71.90077298 +1430 62.8988127 71.86659099 66.65761824 75.28399879 75.28399879 +1440 68.54747901 75.02857696 74.53796653 78.73940682 78.73940682 +1450 66.34174328 74.2029238 73.28064156 75.62587832 75.62587832 +1460 63.30241339 72.53858076 70.80090927 72.45540847 72.45540847 +1470 61.48367827 71.66381219 69.15909353 70.78755356 70.78755356 +1480 60.82466698 71.46023012 68.10387653 70.20088824 70.20088824 +1490 61.42419975 71.934533 67.37292708 70.48787311 70.48787311 +1500 63.47559186 73.13439724 66.50664069 71.67020645 71.67020645 +1510 66.25820172 74.11129209 63.70872378 72.90012791 72.90012791 +1520 65.77026064 70.72623493 63.15297275 70.63244677 70.63244677 +1530 63.47762042 62.99151592 67.8323082 66.96917962 66.96917962 +1540 63.04330452 50.49119364 71.51047201 68.2405678 68.2405678 +1550 58.9766868 52.38292097 69.54086294 66.18891958 66.18891958 +1560 51.6058262 59.34750039 62.27082888 58.78895725 58.78895725 +1570 49.20157648 63.45766937 55.85440176 53.79272909 53.79272909 +1580 51.27656053 67.46362658 56.92223728 57.76968359 57.76968359 +1590 54.86630616 72.20672901 62.15722863 63.06045319 63.06045319 +1600 59.94248748 78.44567713 68.41877302 69.26115697 69.26115697 +1610 61.66022505 81.16637722 70.71303202 72.20458442 72.20458442 +1620 57.17283697 76.91416706 65.74761775 69.34400657 69.34400657 +1630 55.69866899 74.19683264 62.05692728 69.37164133 69.37164133 +1640 57.38121806 73.15834547 59.67875156 71.92373482 71.92373482 +1650 61.04069768 73.30016584 58.50989285 75.97147168 75.97147168 +1660 60.64682189 70.17192611 57.75013487 75.693029 75.693029 +1670 56.12832115 66.04415015 56.44145153 71.06144306 71.06144306 +1680 52.77911496 64.67752757 55.58475595 67.31565811 67.31565811 +1690 50.69063707 64.23831238 54.98868891 64.4681716 64.4681716 +1700 49.5734939 64.13263768 54.53636917 62.19194212 62.19194212 +1710 49.23294136 64.28867446 54.23680232 60.32931761 60.32931761 +1720 49.55936053 64.72997687 54.12590455 58.79322996 58.79322996 +1730 50.5604427 65.49142082 54.40484037 57.7928736 57.7928736 +1740 52.25837781 66.63078697 55.31084541 57.59725065 57.59725065 +1750 54.82331572 68.32026479 57.14792256 58.66986724 58.66986724 +1760 58.39570414 70.79202906 60.26596519 61.72538805 61.72538805 +1770 61.18979156 72.91120989 63.03558559 65.52159006 65.52159006 +1780 62.71372445 73.09391303 63.77082763 67.85295262 67.85295262 +1790 61.87577158 68.58521271 61.97510972 68.72854399 68.72854399 +1800 61.60640634 64.99742352 61.00715038 70.85570587 70.85570587 +1810 64.25707444 67.7359575 62.35140121 75.45034411 75.45034411 +1820 60.84456585 65.76242578 55.76007069 73.26766097 73.26766097 +1830 52.71719141 58.33641413 35.4334396 65.37409791 65.37409791 +1840 46.08841019 51.26943185 44.39087848 56.36429346 56.36429346 +1850 39.65943744 41.43885461 49.3424498 47.94365616 47.94365616 +1860 39.23155393 40.06968456 52.38366207 61.87348266 61.87348266 +1870 45.7981529 51.69866103 53.93395845 68.17988641 68.17988641 +1880 47.54388404 56.94668944 49.66849347 68.62332391 68.62332391 +1890 46.26664912 58.49680292 44.53109596 65.39051806 65.39051806 +1900 45.89289514 59.79878916 49.50711767 63.61749262 63.61749262 +1910 46.28598383 61.3282816 54.43680563 66.35923279 66.35923279 +1920 48.50685251 62.91479889 58.96311277 71.94892326 71.94892326 +1930 51.8279599 64.14507511 61.19107525 76.01006491 76.01006491 +1940 53.44975248 65.32008512 58.54287833 75.92671922 75.92671922 +1950 55.27736111 67.3457185 53.56627861 75.3274545 75.3274545 +1960 58.2377833 70.0001108 53.42587338 76.74764262 76.74764262 +1970 62.00980609 73.10144746 60.23239412 80.38925098 80.38925098 +1980 66.15170696 76.37658261 64.48807893 83.94552568 83.94552568 +1990 66.3054164 75.42495036 67.29006497 84.46823132 84.46823132 +2000 63.06726841 71.49295982 66.8635362 82.93603603 82.93603603 +2010 60.79454666 69.53550837 65.4066532 81.66915975 81.66915975 +2020 58.91056322 67.98167645 65.26263089 81.35411811 81.35411811 +2030 58.87895235 70.02758222 66.40847004 82.57456516 82.57456516 +2040 59.81907783 71.22849911 64.25027205 81.15573166 81.15573166 +2050 58.9939464 69.7258716 59.61498434 77.6517981 77.6517981 +2060 57.90658314 68.14066756 55.69124757 74.83578189 74.83578189 +2070 56.89718225 66.92417545 53.36081907 72.99941191 72.99941191 +2080 55.84908755 66.04413932 52.93861668 72.07042206 72.07042206 +2090 54.44200371 65.56048119 54.0191771 72.14898572 72.14898572 +2100 52.71202705 65.82691073 54.89687046 72.7227703 72.7227703 +2110 52.5331603 66.32964561 54.41332196 72.11444119 72.11444119 +2120 52.08422937 66.80179585 55.81542547 71.52527285 71.52527285 +2130 50.40083616 67.80919189 59.367249 71.83701273 71.83701273 +2140 46.02522392 69.66701947 64.45664882 73.0920094 73.0920094 +2150 52.00503477 70.60198752 69.15084394 73.29280849 73.29280849 +2160 55.34327322 64.98496046 67.85132587 66.60752252 66.60752252 +2170 54.60060171 58.24026197 65.70667607 58.5528009 58.5528009 +2180 53.54220665 54.06930982 65.01959665 53.28025278 53.28025278 +2190 52.95037821 54.03476086 65.26756985 53.37629747 53.37629747 +2200 54.55055675 57.9422501 62.98314704 62.91877222 62.91877222 +2210 54.85711742 59.8675914 54.95729801 65.58739723 65.58739723 +2220 54.32753853 60.89103038 42.23526151 66.31900198 66.31900198 +2230 53.85436571 62.06556977 42.04575774 66.99821067 66.99821067 +2240 53.51509954 63.53330902 48.20646612 67.84901625 67.84901625 +2250 53.24789333 65.38134193 51.08697225 68.90362444 68.90362444 +2260 52.45674064 67.5518087 52.15408538 70.1251583 70.1251583 +2270 48.234498 68.83281259 52.43070204 69.71841574 69.71841574 +2280 37.04593932 68.90915559 55.38586236 62.6629989 62.6629989 +2290 37.92964249 68.4810206 55.77873096 63.70733234 63.70733234 +2300 34.40095227 65.19506851 52.15706424 69.90115477 69.90115477 +2310 42.58148196 65.20130606 56.07440551 72.17386816 72.17386816 +2320 49.61331588 55.52244689 58.21949054 69.14498122 69.14498122 +2330 56.29069842 58.82617794 63.15617129 69.88158564 69.88158564 +2340 55.50515837 64.51935958 62.73423382 67.04992896 67.04992896 +2350 52.85034887 63.71564366 60.86851101 67.25476 67.25476 +2360 53.29273611 64.93460138 60.92318532 71.32089128 71.32089128 +2370 54.57804378 67.43227427 62.05366055 75.22940848 75.22940848 +2380 54.38484362 70.03284309 61.07906522 77.94255776 77.94255776 +2390 55.31360202 73.32213969 54.88960709 79.47902062 79.47902062 +2400 54.52192173 74.2826756 51.4646518 77.49121567 77.49121567 +2410 46.4911018 72.9274559 57.67392695 72.14549239 72.14549239 +2420 50.18644344 70.31344547 56.73880601 69.81107992 69.81107992 +2430 52.65096787 67.71244717 53.79311069 69.53395367 69.53395367 +2440 54.42180354 65.51489023 49.75815929 70.12455046 70.12455046 +2450 58.121877 63.42736099 34.71181833 73.82956381 73.82956381 +2460 63.02690967 67.99534464 53.00424596 78.68471298 78.68471298 +2470 63.64099658 69.9746447 58.55388846 78.47630651 78.47630651 +2480 61.34222464 68.53985894 58.50516892 75.14781352 75.14781352 +2490 59.49685858 67.18606006 57.84331175 72.12782295 72.12782295 +2500 58.44141858 66.1810592 57.37453411 69.4618426 69.4618426 +2510 57.9577518 65.47725736 57.25372841 66.85151288 66.85151288 +2520 57.95916916 65.07298632 57.43036707 63.97633514 63.97633514 +2530 58.51410406 64.99568886 57.91046745 60.25862904 60.25862904 +2540 59.83078993 65.37494234 58.83328408 56.42424862 56.42424862 +2550 62.27740368 66.54590535 60.58607623 62.23323668 62.23323668 +2560 66.26072202 69.01792281 63.77901661 70.46353399 70.46353399 +2570 69.84291875 70.38330838 65.6782757 75.32255868 75.32255868 +2580 68.66841477 65.24184942 58.63747825 72.45264722 72.45264722 +2590 65.87717342 61.76043123 54.92155487 68.3267612 68.3267612 +2600 63.84369118 61.59282347 57.27121529 64.75630677 64.75630677 +2610 62.71821323 62.44440606 59.25665492 61.59607301 61.59607301 +2620 62.30272379 63.87276975 61.28409279 64.06839323 64.06839323 +2630 62.21812788 65.16214039 63.09658332 69.82604579 69.82604579 +2640 61.88512049 65.28847894 63.67725854 73.03197345 73.03197345 +2650 61.25298946 65.06192142 63.15550087 75.05803571 75.05803571 +2660 59.66675127 63.41885402 60.99989972 75.32816027 75.32816027 +2670 58.33397854 61.53720895 59.50021275 74.66433303 74.66433303 +2680 57.545042 60.80308337 59.98639159 74.31604036 74.31604036 +2690 56.77174353 61.61035078 61.9559569 74.6534782 74.6534782 +2700 55.92505312 63.86605746 64.27852719 75.83618339 75.83618339 +2710 56.77338083 66.58558339 65.75701506 77.52225554 77.52225554 +2720 58.72430125 69.63673223 67.43077356 79.69526057 79.69526057 +2730 60.59412669 71.85213348 69.07775956 81.25441534 81.25441534 +2740 60.57950129 70.47232838 68.33948008 79.44413038 79.44413038 +2750 58.81266521 68.25543333 66.59198024 76.0097789 76.0097789 +2760 56.83313858 68.66978183 65.98185272 73.09941476 73.09941476 +2770 56.54176108 69.51918969 65.62136537 71.19963146 71.19963146 +2780 58.09872844 70.83972035 65.82719938 69.66907558 69.66907558 +2790 60.23218693 71.79167292 65.26606832 66.44713392 66.44713392 +2800 59.19635788 69.15416137 60.33038797 62.99409762 62.99409762 +2810 57.17129131 65.99453357 54.30520463 63.76848932 63.76848932 +2820 55.69911792 64.02749999 50.20686462 64.27108823 64.27108823 +2830 54.34981515 62.9176518 49.87001144 64.38717877 64.38717877 +2840 52.72194112 62.75640885 52.77170181 64.12334383 64.12334383 +2850 52.87820837 62.9466647 55.61580482 63.54836919 63.54836919 +2860 55.40791526 62.09533299 57.23700619 62.9748626 62.9748626 +2870 57.45719801 60.22235036 57.49740843 62.88217686 62.88217686 +2880 58.51044449 59.07548851 56.92202683 63.22598517 63.22598517 +2890 59.24026079 60.08205763 56.269418 63.4053869 63.4053869 +2900 60.09723511 62.47997116 56.18608225 63.24688134 63.24688134 +2910 60.81045662 64.34099655 56.1226562 63.03644903 63.03644903 +2920 60.72254103 64.28393382 54.74017728 63.93697613 63.93697613 +2930 60.50941895 63.355831 52.36930893 65.22372234 65.22372234 +2940 60.10962478 62.93186204 47.67359704 65.74004277 65.74004277 +2950 57.18958704 62.02997522 36.20982539 64.37728243 64.37728243 +2960 52.66145731 59.51053859 48.00217326 62.86470344 62.86470344 +2970 50.70694591 57.05013662 49.76029136 62.88709028 62.88709028 +2980 49.89530478 57.88140635 50.69214632 63.12442676 63.12442676 +2990 47.93867773 59.64595846 52.7269491 63.0437634 63.0437634 +3000 45.38813385 59.82830526 54.44132015 63.22477786 63.22477786 +3010 46.8521246 58.73046083 54.83937948 63.76306179 63.76306179 +3020 47.72614383 58.79561498 54.47480912 63.83527255 63.83527255 +3030 47.78551947 60.60367289 54.10169236 64.27738866 64.27738866 +3040 48.5244327 62.87946191 53.75254091 65.15235251 65.15235251 +3050 49.94189795 63.69794634 52.17919153 65.18508101 65.18508101 +3060 51.45951037 62.49338346 48.46475359 64.05574196 64.05574196 +3070 54.15649435 60.88686686 47.28390695 62.55600494 62.55600494 +3080 56.586751 59.232759 51.14393417 60.36975751 60.36975751 +3090 57.69324561 57.05742219 53.8680925 59.73098763 59.73098763 +3100 58.39570937 54.48152588 55.73819282 61.36494579 61.36494579 +3110 59.04184526 52.90817026 57.01847259 63.07633995 63.07633995 +3120 59.14018124 53.21915843 57.38119457 63.73725435 63.73725435 +3130 58.83983347 52.98210958 57.44344024 63.59455944 63.59455944 +3140 58.76266082 51.84522329 58.18848875 63.36481263 63.36481263 +3150 59.31958036 50.90376638 59.67719665 63.04454038 63.04454038 +3160 59.97583267 50.87346555 60.35628733 61.73246351 61.73246351 +3170 59.57932388 51.64857443 59.38092464 59.2674963 59.2674963 +3180 58.88475144 53.50247316 58.87636275 56.32062791 56.32062791 +3190 60.3857787 54.72172818 60.51016022 51.59676903 51.59676903 +3200 62.05320798 53.4220307 61.26686237 46.5994024 46.5994024 +3210 62.32415261 50.94737036 60.7091071 46.91364861 46.91364861 +3220 62.28093805 48.71406904 59.61354965 50.40870113 50.40870113 +3230 62.33245038 46.93187061 58.20933436 53.39489839 53.39489839 +3240 62.40193206 45.65339371 56.68430543 54.51448482 54.51448482 +3250 62.57475889 45.34364584 55.15218655 55.8818522 55.8818522 +3260 62.64025693 46.67152468 53.94547633 57.52975494 57.52975494 +3270 62.51169407 48.66862769 52.67280239 58.38204845 58.38204845 +3280 62.32214507 50.46281526 50.60727297 58.57119924 58.57119924 +3290 62.19967264 51.6292761 46.34496537 58.55950364 58.55950364 +3300 62.12283503 52.37662427 33.08564909 59.2615643 59.2615643 +3310 61.98146618 53.43932327 45.73368672 60.49556902 60.49556902 +3320 61.89145929 55.07730441 54.36593898 61.88291445 61.88291445 +3330 62.19335585 57.58876492 60.18005969 63.59624752 63.59624752 +3340 63.57562654 60.92990719 64.71120016 65.4466435 65.4466435 +3350 65.85924224 63.69423168 67.35251467 66.45609568 66.45609568 +3360 67.28642999 64.67397841 67.45564126 66.35819478 66.35819478 +3370 68.07642356 64.91050751 66.33306071 66.57661989 66.57661989 +3380 69.15057892 65.35327222 65.02453446 67.63982725 67.63982725 +3390 70.82938193 66.09791748 63.73320609 69.27878802 69.27878802 +3400 72.64757556 66.55837729 62.67325265 70.77317349 70.77317349 +3410 73.22202199 65.48372525 62.56309172 70.87309295 70.87309295 +3420 72.27957597 62.89461549 62.82242683 69.75497434 69.75497434 +3430 70.97111465 60.30322854 62.83522074 68.90507182 68.90507182 +3440 69.81129326 59.35055236 62.87100616 68.54261899 68.54261899 +3450 68.64315915 59.59479063 62.78677744 68.78640435 68.78640435 +3460 67.26792754 59.96079911 62.41977232 69.87624348 69.87624348 +3470 65.66649052 60.39907881 61.79602584 71.47904438 71.47904438 +3480 65.41076558 61.63405545 61.89369459 72.6688742 72.6688742 +3490 67.54605944 63.53725787 63.44780804 72.06777595 72.06777595 +3500 68.93352946 65.10050498 64.77948399 69.8084282 69.8084282 \ No newline at end of file diff --git a/tests/data/VRX_Waterfall_2024R2_20241203.xml b/tests/data/VRX_Waterfall_2024R2_20241203.xml new file mode 100644 index 000000000..1cf9e6a73 --- /dev/null +++ b/tests/data/VRX_Waterfall_2024R2_20241203.xml @@ -0,0 +1,1562 @@ + + + + 22.222 + 44.445 + 66.667 + 88.889 + 111.11 + 133.33 + 155.56 + 177.78 + 200. + 222.22 + 244.44 + 266.67 + 288.89 + 311.11 + 333.33 + 355.56 + 377.78 + 400. + 422.22 + 444.45 + 466.67 + 488.89 + 511.11 + 533.33 + 555.56 + 577.78 + 600. + 622.22 + 644.45 + 666.67 + 688.89 + 711.11 + 733.33 + 755.56 + 777.78 + 800. + 822.22 + 844.45 + 866.67 + 888.89 + 911.11 + 933.34 + 955.56 + 977.78 + 1000. + 1022.2 + 1044.4 + 1066.7 + 1088.9 + 1111.1 + 1133.3 + 1155.6 + 1177.8 + 1200. + 1222.2 + 1244.4 + 1266.7 + 1288.9 + 1311.1 + 1333.3 + 1355.6 + 1377.8 + 1400. + 1422.2 + 1444.4 + 1466.7 + 1488.9 + 1511.1 + 1533.3 + 1555.6 + 1577.8 + 1600. + 1622.2 + 1644.4 + 1666.7 + + + -103.56 + -76.967 + 31.014 + -91.524 + -77.076 + 21.209 + -81.575 + -66.488 + 38.55 + -83.568 + -69.502 + 18.812 + -81.29 + -60.036 + 30.033 + -79.487 + -44.637 + 48.208 + -77.992 + -65.162 + 20.58 + -76.713 + -68.407 + 14.98 + -75.594 + -68.362 + 20.385 + -74.595 + -66.74 + 18.534 + -73.691 + -66.067 + 13.772 + -72.862 + -48.635 + 35.73 + -72.092 + -59.933 + 21.894 + -71.371 + -68.092 + 10.615 + -70.689 + -63.862 + 13.247 + -70.04 + -55.803 + 15.286 + -69.415 + -71.718 + 5.9473 + -71.354 + -69.883 + 19.696 + -68.222 + -55.782 + 13.826 + -67.645 + -63.97 + 11.838 + -67.056 + -67.357 + 8.142 + -66.509 + -54.771 + 12.853 + -65.944 + -57.49 + 14.448 + -62.193 + -62.95 + 16.163 + -64.805 + -53.111 + 13.892 + + + + + 44.444 + 88.889 + 133.33 + 177.78 + 222.22 + 266.67 + 311.11 + 355.56 + 400. + 444.44 + 488.89 + 533.33 + 577.78 + 622.22 + 666.67 + 711.11 + 755.55 + 800. + 844.44 + 888.89 + 933.33 + 977.78 + 1022.2 + 1066.7 + 1111.1 + 1155.6 + 1200. + 1244.4 + 1288.9 + 1333.3 + 1377.8 + 1422.2 + 1466.7 + 1511.1 + 1555.6 + 1600. + 1644.4 + 1688.9 + 1733.3 + 1777.8 + 1822.2 + 1866.7 + 1911.1 + 1955.6 + 2000. + 2044.4 + 2088.9 + 2133.3 + 2177.8 + 2222.2 + 2266.7 + 2311.1 + 2355.6 + 2400. + 2444.4 + 2488.9 + 2533.3 + 2577.8 + 2622.2 + 2666.7 + 2711.1 + 2755.6 + 2800. + 2844.4 + 2888.9 + 2933.3 + 2977.8 + 3022.2 + 3066.7 + 3111.1 + 3155.6 + 3200. + 3244.4 + 3288.9 + 3333.3 + + + -95.587 + -89.566 + 37.04 + -61.466 + -81.601 + 27.246 + -77.093 + -77.507 + 44.653 + -75.556 + -74.72 + 24.916 + -67.904 + -72.59 + 36.181 + -59.729 + -70.85 + 54.577 + -45.64 + -69.359 + 26.982 + -64.894 + -64.002 + 21.695 + -67.218 + -66.824 + 27.219 + -66.059 + -65.685 + 25.629 + -58.843 + -62.662 + 21.111 + -62.882 + -63.507 + 43.464 + -62.783 + -62.418 + 29.646 + -52.455 + -61.254 + 19.186 + -60.365 + -60.114 + 22.342 + -59.274 + -58.834 + 25.163 + -53.735 + -57.408 + 16.215 + -57.126 + -55.764 + 31.737 + -54.491 + -53.784 + 26.321 + -48.096 + -51.263 + 26.976 + -49.698 + -47.784 + 26.7 + -44.47 + -42.291 + 37.71 + -31.326 + -33.911 + 42.16 + -35.963 + -40.469 + 37.159 + -43.905 + -45.019 + 32.009 + + + + + 66.667 + 133.33 + 200. + 266.67 + 333.33 + 400. + 466.67 + 533.33 + 600. + 666.67 + 733.33 + 800. + 866.67 + 933.33 + 1000. + 1066.7 + 1133.3 + 1200. + 1266.7 + 1333.3 + 1400. + 1466.7 + 1533.3 + 1600. + 1666.7 + 1733.3 + 1800. + 1866.7 + 1933.3 + 2000. + 2066.7 + 2133.3 + 2200. + 2266.7 + 2333.3 + 2400. + 2466.7 + 2533.3 + 2600. + 2666.7 + 2733.3 + 2800. + 2866.7 + 2933.3 + 3000. + 3066.7 + 3133.3 + 3200. + 3266.7 + 3333.3 + 3400. + 3466.7 + 3533.3 + 3600. + 3666.7 + 3733.3 + 3800. + 3866.7 + 3933.3 + 4000. + 4066.7 + 4133.3 + 4200. + 4266.7 + 4333.3 + 4400. + 4466.7 + 4533.3 + 4600. + 4666.7 + 4733.3 + 4800. + 4866.7 + 4933.3 + 5000. + + + -71.36 + -69.344 + 40.57 + -63.296 + -76.231 + 30.795 + -73.207 + -58.351 + 48.316 + -56.285 + -69.307 + 28.586 + -67.837 + -63.064 + 39.924 + -45.191 + -27.889 + 58.738 + -26.649 + -55.543 + 31.226 + -54.491 + -56.845 + 26.544 + -55.733 + -54.903 + 32.511 + -53.777 + -57.737 + 31.606 + -56.623 + -54.032 + 27.921 + -52.564 + -34.784 + 51.923 + -32.806 + -49.876 + 39.453 + -47.857 + -49.32 + 33.582 + -44.766 + -36.258 + 47.322 + -31.643 + -38.138 + 41.578 + -42.778 + -47.075 + 33.72 + -44.067 + -42.285 + 44.18 + -41.838 + -35.786 + 46.883 + -29.786 + -35.087 + 48.341 + -37.041 + -33.514 + 40.215 + -35.07 + -33.986 + 41.801 + -33.763 + -29.926 + 52.771 + -25.884 + -28.116 + 47.857 + -30.863 + -31.474 + 44.16 + + + + + 88.889 + 177.78 + 266.67 + 355.56 + 444.44 + 533.33 + 622.22 + 711.11 + 800. + 888.89 + 977.78 + 1066.7 + 1155.6 + 1244.4 + 1333.3 + 1422.2 + 1511.1 + 1600. + 1688.9 + 1777.8 + 1866.7 + 1955.6 + 2044.4 + 2133.3 + 2222.2 + 2311.1 + 2400. + 2488.9 + 2577.8 + 2666.7 + 2755.6 + 2844.4 + 2933.3 + 3022.2 + 3111.1 + 3200. + 3288.9 + 3377.8 + 3466.7 + 3555.6 + 3644.4 + 3733.3 + 3822.2 + 3911.1 + 4000. + 4088.9 + 4177.8 + 4266.7 + 4355.6 + 4444.4 + 4533.3 + 4622.2 + 4711.1 + 4800. + 4888.9 + 4977.8 + 5066.7 + 5155.6 + 5244.4 + 5333.3 + 5422.2 + 5511.1 + 5600. + 5688.9 + 5777.8 + 5866.7 + 5955.6 + 6044.4 + 6133.3 + 6222.2 + 6311.1 + 6400. + 6488.9 + 6577.8 + 6666.7 + + + -84.557 + -78.537 + 43.078 + -65.42 + -69.198 + 33.333 + -67.661 + -55.495 + 51.019 + -64.551 + -63.218 + 31.307 + -53.478 + -42.448 + 42.755 + -60.296 + -32.015 + 62.286 + -46.837 + -57.992 + 34.984 + -50.412 + -51.702 + 31.422 + -54.938 + -52.991 + 39.154 + -52.505 + -51.437 + 41.201 + -43.996 + -43.703 + 45.642 + -36.348 + -21.759 + 64.902 + -43.187 + -41.388 + 54.954 + -33.599 + -30.764 + 45.536 + -29.379 + -25.104 + 48.675 + -29.245 + -28.303 + 44.823 + -31.677 + -32.535 + 43.592 + -24.224 + -28.271 + 51.258 + -29.966 + -30.676 + 47.238 + -28.612 + -30.498 + 53.502 + -25.143 + -25.588 + 40.992 + -30.5 + -33.393 + 39.584 + -36.762 + -35.568 + 36.022 + -38.681 + -36.547 + 38.794 + -36.653 + -36.085 + 39.645 + + + + + 111.11 + 222.22 + 333.33 + 444.44 + 555.56 + 666.67 + 777.78 + 888.89 + 1000. + 1111.1 + 1222.2 + 1333.3 + 1444.4 + 1555.6 + 1666.7 + 1777.8 + 1888.9 + 2000. + 2111.1 + 2222.2 + 2333.3 + 2444.4 + 2555.6 + 2666.7 + 2777.8 + 2888.9 + 3000. + 3111.1 + 3222.2 + 3333.3 + 3444.4 + 3555.6 + 3666.7 + 3777.8 + 3888.9 + 4000. + 4111.1 + 4222.2 + 4333.3 + 4444.4 + 4555.6 + 4666.7 + 4777.8 + 4888.9 + 5000. + 5111.1 + 5222.2 + 5333.3 + 5444.4 + 5555.6 + 5666.7 + 5777.8 + 5888.9 + 6000. + 6111.1 + 6222.2 + 6333.3 + 6444.4 + 6555.6 + 6666.7 + 6777.8 + 6888.9 + 7000. + 7111.1 + 7222.2 + 7333.3 + 7444.4 + 7555.6 + 7666.7 + 7777.8 + 7888.9 + 8000. + 8111.1 + 8222.2 + 8333.3 + + + -76.752 + -70.92 + 45.029 + -64.664 + -62.697 + 35.324 + -59.614 + -58.474 + 53.233 + -56.385 + -53.984 + 33.559 + -53.75 + -52.938 + 45.17 + -44.049 + -50.519 + 65.962 + -48.768 + -46.775 + 39.243 + -45.417 + -43.875 + 38.686 + -41.01 + -34.809 + 59.727 + -30.883 + -34.848 + 46.777 + -32.84 + -29.031 + 47.29 + -25.145 + -21.283 + 70.243 + -24.121 + -24.556 + 61.9 + -28.121 + -23.54 + 50.815 + -22.69 + -25.734 + 46.708 + -25.678 + -23.136 + 50.722 + -21.065 + -21.574 + 41.089 + -30.236 + -32.551 + 45.379 + -35.607 + -35.471 + 41.35 + -34.142 + -33.817 + 41.246 + -33.257 + -28.369 + 34.002 + -28.953 + -32.361 + 36.548 + -36.718 + -38.476 + 31.617 + -40.252 + -42.199 + 32.862 + -42. + -42.065 + 33.588 + + + + + 133.33 + 266.67 + 400. + 533.33 + 666.67 + 800. + 933.33 + 1066.7 + 1200. + 1333.3 + 1466.7 + 1600. + 1733.3 + 1866.7 + 2000. + 2133.3 + 2266.7 + 2400. + 2533.3 + 2666.7 + 2800. + 2933.3 + 3066.7 + 3200. + 3333.3 + 3466.7 + 3600. + 3733.3 + 3866.7 + 4000. + 4133.3 + 4266.7 + 4400. + 4533.3 + 4666.7 + 4800. + 4933.3 + 5066.7 + 5200. + 5333.3 + 5466.7 + 5600. + 5733.3 + 5866.7 + 6000. + 6133.3 + 6266.7 + 6400. + 6533.3 + 6666.7 + 6800. + 6933.3 + 7066.7 + 7200. + 7333.3 + 7466.7 + 7600. + 7733.3 + 7866.7 + 8000. + 8133.3 + 8266.7 + 8400. + 8533.3 + 8666.7 + 8800. + 8933.3 + 9066.7 + 9200. + 9333.3 + 9466.7 + 9600. + 9733.3 + 9866.7 + 10000 + + + -70.186 + -64.144 + 46.628 + -58.037 + -56.03 + 36.975 + -52.914 + -51.623 + 55.176 + -49.336 + -48.279 + 35.574 + -46.216 + -45.163 + 47.432 + -42.864 + -41.529 + 70.732 + -38.057 + -35.53 + 46.989 + -25.423 + -21.02 + 46.423 + -30.502 + -26.885 + 48.709 + -23.878 + -18.244 + 56.136 + -21.284 + -23.133 + 49.351 + -21.37 + -16.89 + 70.299 + -22.415 + -22.343 + 60.276 + -16.437 + -16.602 + 48.346 + -24.198 + -27.85 + 40.58 + -31.284 + -31.668 + 37.754 + -30.522 + -29.543 + 38.747 + -23.918 + -24.241 + 48.298 + -31.755 + -33.838 + 38.077 + -37.907 + -39.014 + 32.525 + -39.527 + -38.784 + 29.228 + -39.756 + -40.99 + 36.561 + -41.231 + -41.332 + 38.056 + -42.523 + -42.832 + 33.823 + -42.588 + -42.299 + 26.914 + + + + + 155.56 + 311.11 + 466.67 + 622.22 + 777.78 + 933.34 + 1088.9 + 1244.4 + 1400. + 1555.6 + 1711.1 + 1866.7 + 2022.2 + 2177.8 + 2333.3 + 2488.9 + 2644.5 + 2800. + 2955.6 + 3111.1 + 3266.7 + 3422.2 + 3577.8 + 3733.3 + 3888.9 + 4044.5 + 4200. + 4355.6 + 4511.1 + 4666.7 + 4822.2 + 4977.8 + 5133.3 + 5288.9 + 5444.5 + 5600. + 5755.6 + 5911.1 + 6066.7 + 6222.2 + 6377.8 + 6533.4 + 6688.9 + 6844.5 + 7000. + 7155.6 + 7311.1 + 7466.7 + 7622.2 + 7777.8 + 7933.4 + 8088.9 + 8244.5 + 8400. + 8555.6 + 8711.1 + 8866.7 + 9022.2 + 9177.8 + 9333.4 + 9488.9 + 9644.5 + 9800. + 9955.6 + 10111 + 10267 + 10422 + 10578 + 10733 + 10889 + 11044 + 11200 + 11356 + 11511 + 11667 + + + -64.788 + -57.061 + 47.984 + -52.567 + -50.253 + 38.398 + -47.265 + -30.372 + 56.975 + -43.328 + -41.049 + 37.509 + -39.45 + -36.73 + 49.767 + -34.092 + -6.9659 + 79.821 + -18.899 + -17.097 + 52.683 + -24.778 + -19.526 + 55.647 + -13.853 + -15.527 + 55.294 + -20.195 + -18.394 + 60.089 + -17.583 + -17.676 + 51.846 + -13.571 + -0.99237 + 74.811 + -20.978 + -19.274 + 53.165 + -27.872 + -26.768 + 40.381 + -25.913 + -22.368 + 48.383 + -23.787 + -27.224 + 34.57 + -32.931 + -35.368 + 27.587 + -35.357 + -29.218 + 44.167 + -34.618 + -31.634 + 39.23 + -32.603 + -30.218 + 35.628 + -38.248 + -39.829 + 25.618 + -39.614 + -37.72 + 27.904 + -38.416 + -37.163 + 29.859 + -35.516 + -27.555 + 36.985 + -30.069 + -28.632 + 30.863 + + + + + 177.78 + 355.55 + 533.33 + 711.11 + 888.89 + 1066.7 + 1244.4 + 1422.2 + 1600. + 1777.8 + 1955.6 + 2133.3 + 2311.1 + 2488.9 + 2666.7 + 2844.4 + 3022.2 + 3200. + 3377.8 + 3555.5 + 3733.3 + 3911.1 + 4088.9 + 4266.7 + 4444.4 + 4622.2 + 4800. + 4977.8 + 5155.5 + 5333.3 + 5511.1 + 5688.9 + 5866.7 + 6044.4 + 6222.2 + 6400. + 6577.8 + 6755.5 + 6933.3 + 7111.1 + 7288.9 + 7466.6 + 7644.4 + 7822.2 + 8000. + 8177.8 + 8355.5 + 8533.3 + 8711.1 + 8888.9 + 9066.6 + 9244.4 + 9422.2 + 9600. + 9777.8 + 9955.5 + 10133 + 10311 + 10489 + 10667 + 10844 + 11022 + 11200 + 11378 + 11556 + 11733 + 11911 + 12089 + 12267 + 12444 + 12622 + 12800 + 12978 + 13156 + 13333 + + + -43.756 + -54.178 + 49.164 + -46.164 + -45.84 + 39.66 + -42.425 + -40.92 + 58.723 + -28.198 + -36.461 + 39.508 + -32.537 + -30.352 + 52.552 + -21.537 + -10.883 + 83.737 + -4.7172 + -17.676 + 63.293 + -8.3037 + -15.203 + 58.522 + -16.834 + -11.15 + 53.697 + -14.937 + -14.228 + 61.382 + -8.3498 + -15.202 + 45.575 + -22.766 + -24.426 + 63.085 + -14.785 + -21.802 + 55.726 + -16.925 + -24.486 + 37.147 + -29.224 + -31.285 + 35.016 + -30.502 + -28.535 + 39.763 + -26.256 + -26.854 + 33.247 + -28.357 + -31.515 + 41.437 + -31.207 + -35.705 + 35.461 + -36.348 + -35.318 + 30.592 + -33.46 + -31.714 + 27.056 + -29.207 + -28.244 + 30.945 + -26.735 + -25.837 + 36.081 + -24.434 + -23.67 + 40.407 + -23.04 + -27.302 + 32.116 + + + + + 200. + 400. + 600. + 800. + 1000. + 1200. + 1400. + 1600. + 1800. + 2000. + 2200. + 2400. + 2600. + 2800. + 3000. + 3200. + 3400. + 3600. + 3800. + 4000. + 4200. + 4400. + 4600. + 4800. + 5000. + 5200. + 5400. + 5600. + 5800. + 6000. + 6200. + 6400. + 6600. + 6800. + 7000. + 7200. + 7400. + 7600. + 7800. + 8000. + 8200. + 8400. + 8600. + 8800. + 9000. + 9200. + 9400. + 9600. + 9800. + 10000 + 10200 + 10400 + 10600 + 10800 + 11000 + 11200 + 11400 + 11600 + 11800 + 12000 + 12200 + 12400 + 12600 + 12800 + 13000 + 13200 + 13400 + 13600 + 13800 + 14000 + 14200 + 14400 + 14600 + 14800 + 15000 + + + -56.348 + -50.258 + 50.21 + -43.949 + -41.779 + 40.806 + -38.162 + -36.497 + 60.501 + -33.035 + -31.021 + 41.782 + -25.232 + -19.871 + 58.861 + -16.086 + -18.721 + 80.647 + -12.055 + -10.311 + 70.487 + -14.47 + -9.5162 + 62.183 + -13.423 + -10.204 + 61.86 + -8.6215 + -15.508 + 49.062 + -21.199 + -21.763 + 43.884 + -18.217 + -14.444 + 66.472 + -23.608 + -26.248 + 47.414 + -27.895 + -26.034 + 37.029 + -24.835 + -23.162 + 44.084 + -22.538 + -26.129 + 38.098 + -30.809 + -31.806 + 24.782 + -32.261 + -31.809 + 38.705 + -29.239 + -27.009 + 41.839 + -25.661 + -25.246 + 35.653 + -23.635 + -22.621 + 33.593 + -22.431 + -24.16 + 35.427 + -26.325 + -26.776 + 34.402 + -26.202 + -26.857 + 34.736 + -27.122 + -28.028 + 32.801 + + + + + 222.22 + 444.45 + 666.67 + 888.89 + 1111.1 + 1333.3 + 1555.6 + 1777.8 + 2000. + 2222.2 + 2444.4 + 2666.7 + 2888.9 + 3111.1 + 3333.3 + 3555.6 + 3777.8 + 4000. + 4222.2 + 4444.5 + 4666.7 + 4888.9 + 5111.1 + 5333.3 + 5555.6 + 5777.8 + 6000. + 6222.2 + 6444.5 + 6666.7 + 6888.9 + 7111.1 + 7333.3 + 7555.6 + 7777.8 + 8000. + 8222.2 + 8444.5 + 8666.7 + 8888.9 + 9111.1 + 9333.4 + 9555.6 + 9777.8 + 10000 + 10222 + 10444 + 10667 + 10889 + 11111 + 11333 + 11556 + 11778 + 12000 + 12222 + 12444 + 12667 + 12889 + 13111 + 13333 + 13556 + 13778 + 14000 + 14222 + 14444 + 14667 + 14889 + 15111 + 15333 + 15556 + 15778 + 16000 + 16222 + 16444 + 16667 + + + -52.936 + -46.848 + 51.151 + -40.429 + -38.094 + 41.869 + -34.269 + -32.595 + 62.404 + -28.15 + -25.058 + 44.846 + -13.204 + -9.2023 + 65.066 + -12.357 + -8.4824 + 85.245 + -11.125 + -10.766 + 72.396 + -10.49 + -8.7117 + 65.773 + -4.3637 + -12.039 + 50.496 + -18.559 + -18.775 + 48.695 + -13.723 + -13.598 + 42.796 + -22.96 + -24.558 + 59.015 + -22.255 + -19.539 + 49.042 + -17.945 + -17.895 + 38.373 + -24.5 + -26.91 + 34.021 + -28.868 + -27.043 + 33.007 + -27.487 + -25.865 + 33.206 + -23.429 + -22.772 + 39.823 + -21.067 + -20.259 + 47.702 + -20.257 + -21.577 + 35.747 + -24.23 + -24.231 + 29.27 + -25.004 + -24.741 + 32.966 + -26.334 + -25.777 + 36.955 + -24.978 + -24.025 + 36.9 + -20.915 + -20.122 + 37.579 + + + diff --git a/tests/tests_sound_composer/test_sound_composer_source_harmonics.py b/tests/tests_sound_composer/test_sound_composer_source_harmonics.py new file mode 100644 index 000000000..b1110b15e --- /dev/null +++ b/tests/tests_sound_composer/test_sound_composer_source_harmonics.py @@ -0,0 +1,521 @@ +# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +from unittest.mock import patch + +from ansys.dpf.core import ( + Field, + FieldsContainer, + TimeFreqSupport, + fields_container_factory, + fields_factory, + locations, +) +import numpy as np +import pytest + +from ansys.sound.core._pyansys_sound import PyAnsysSoundException, PyAnsysSoundWarning +from ansys.sound.core.sound_composer import SourceControlTime, SourceHarmonics +from ansys.sound.core.spectral_processing import PowerSpectralDensity + +REF_ACOUSTIC_POWER = 4e-10 + +EXP_LEVEL_OCTAVE_BAND = [58.2, 74.5280270133186, 60.3] +EXP_ORDERS = [12.0, 36.0, 60.0] +EXP_RPMS = [ + 500.0, + 570.0, + 600.0, +] +EXP_ORDER_LEVEL03_REF = 3.041734453290701e-05 +EXP_ORDER_LEVEL03_PA = 3.041734453290701e-05 +EXP_ORDER_LEVEL03_XML = 5.632353957971172e-19 +EXP_STR_NOT_SET = "Harmonics source: Not set\nSource control: Not set/valid" +EXP_STR_ALL_SET = ( + "Harmonics source: ''\n" + "\tNumber of orders: 5\n" + "\t\t[12. 24. 36. 48. 60.]\n" + "\tControl parameter: RPM, 500.0 - 3500.0 rpm\n" + "\t\t[500. 510. 520. 530. 540. ... 3460. 3470. 3480. 3490. 3500.]" + "\nSource control: \n" + "\tMin: 750.0\n" + "\tMax: 3500.0\n" + "\tDuration: 3.0 s" +) +EXP_STR_ALL_SET_10_40_VALUES = ( + "Harmonics source: ''\n" + "\tNumber of orders: 40\n" + "\t\t[1. 2. 3. 4. 5. ... 36. 37. 38. 39. 40.]\n" + "\tControl parameter: RPM, 500.0 - 590.0 rpm\n" + "\t\t[500. 510. 520. 530. 540. 550. 560. 570. 580. 590.]" + "\nSource control: \n" + "\tMin: 750.0\n" + "\tMax: 3500.0\n" + "\tDuration: 3.0 s" +) + + +def test_source_harmonics_instantiation_no_arg(): + """Test SourceHarmonics instantiation without arguments.""" + source_harmonics_obj = SourceHarmonics() + assert isinstance(source_harmonics_obj, SourceHarmonics) + assert source_harmonics_obj.source_harmonics is None + + +def test_source_harmonics_instantiation_file_arg(): + """Test SourceHarmonics instantiation with file argument.""" + source_harmonics_obj = SourceHarmonics( + file=pytest.data_path_sound_composer_harmonics_source_in_container + ) + assert isinstance(source_harmonics_obj, SourceHarmonics) + assert source_harmonics_obj.source_harmonics is not None + + +def test_source_harmonics___str___not_set(): + """Test SourceHarmonics __str__ method when nothing is set.""" + source_harmonics_obj = SourceHarmonics() + assert str(source_harmonics_obj) == EXP_STR_NOT_SET + + +def test_source_harmonics___str___all_set(): + """Test SourceHarmonics __str__ method when all data are set.""" + # Create a field to use in a SourceControlTime object. + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([750, 1250, 3000, 3500], 1) + support = TimeFreqSupport() + f_time = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + f_time.append([0, 1, 2, 3], 1) + support.time_frequencies = f_time + f_source_control.time_freq_support = support + + # Create a SourceControlTime object. + source_control = SourceControlTime() + source_control.control = f_source_control + + # Create a SourceHarmonics object. + source_harmonics_obj = SourceHarmonics( + pytest.data_path_sound_composer_harmonics_source_in_container, + source_control, + ) + assert str(source_harmonics_obj) == EXP_STR_ALL_SET + + # Replace the source file with another that has 10 rpm values and 40 orders. + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_10rpm_40orders_in_container + ) + assert str(source_harmonics_obj) == EXP_STR_ALL_SET_10_40_VALUES + + +def test_source_harmonics_properties(): + """Test SourceHarmonics properties.""" + source_harmonics_obj = SourceHarmonics() + + # Test source_control property. + source_harmonics_obj.source_control = SourceControlTime() + assert isinstance(source_harmonics_obj.source_control, SourceControlTime) + + # Test source_harmonics property. + # Create a second object and then reuse its source_harmonics property. + source_harmonics_obj_tmp = SourceHarmonics() + source_harmonics_obj_tmp.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_in_container + ) + harmonics_fieldscontainer = source_harmonics_obj_tmp.source_harmonics + source_harmonics_obj.source_harmonics = harmonics_fieldscontainer + assert isinstance(source_harmonics_obj.source_harmonics, FieldsContainer) + + +def test_source_harmonics_properties_exceptions(): + """Test SourceHarmonics properties' exceptions.""" + source_harmonics_obj = SourceHarmonics() + + # Test source_control setter exception (str instead of SourceControlTime). + with pytest.raises( + PyAnsysSoundException, + match="Specified source control object must be of type SourceControlTime.", + ): + source_harmonics_obj.source_control = "InvalidType" + + # Test source_harmonics setter exception 1 (str instead of FieldsContainer). + with pytest.raises( + PyAnsysSoundException, + match="Specified harmonics source must be provided as a DPF fields container.", + ): + source_harmonics_obj.source_harmonics = "InvalidType" + + # Test source_harmonics setter exception 2 (less than 1 order level). + fc_source_harmonics = FieldsContainer() + with pytest.raises( + PyAnsysSoundException, + match=( + "Specified harmonics source must contain at least one order level \\(the provided DPF " + "fields container must contain at least one field with at least one data point\\)." + ), + ): + source_harmonics_obj.source_harmonics = fc_source_harmonics + + # Test source_harmonics setter exception 3 (within-field order level number mismatch). + field = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + field.append([1.0, 2.0, 3.0, 4.0, 5.0], 1) + support = TimeFreqSupport() + f_time = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + f_time.append([1.0, 2.0], 1) + support.time_frequencies = f_time + field.time_freq_support = support + fc_source_harmonics = fields_container_factory.over_time_freq_fields_container([field]) + with pytest.raises( + PyAnsysSoundException, + match=( + "Each set of order levels in the specified harmonics source must contain as many " + "level values as the number of orders \\(in the provided DPF fields container, each " + "field must contain the same number of data points and support values\\)." + ), + ): + source_harmonics_obj.source_harmonics = fc_source_harmonics + + # Test source_harmonics setter exception 4 (between-field order level number mismatch). + field2 = field.deep_copy() + field.data = [1.0, 2.0] + field2.data = [1.0, 2.0, 3.0, 4.0, 5.0] + field2.time_freq_support.time_frequencies.data = [1.0, 2.0, 3.0, 4.0, 5.0] + fc_source_harmonics = fields_container_factory.over_time_freq_fields_container([field, field2]) + with pytest.raises( + PyAnsysSoundException, + match=( + "Each set of order levels in the specified harmonics source must contain the same " + "number of level values \\(in the provided DPF fields container, each field must " + "contain the same number of data points\\)." + ), + ): + source_harmonics_obj.source_harmonics = fc_source_harmonics + + # Test source_harmonics setter exception 5 (empty harmonics source's control data). + # For this, we use a valid dataset, and then remove the control data. + source_harmonics_obj = SourceHarmonics() + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_in_container + ) + support_data = source_harmonics_obj.source_harmonics.get_support("control_parameter_1") + support_properties = support_data.available_field_supported_properties() + support_values = support_data.field_support_by_property(support_properties[0]) + support_values.data = [] + fc_source_harmonics = source_harmonics_obj.source_harmonics + with pytest.raises( + PyAnsysSoundException, + match=( + "The specified harmonics source must contain as many sets of order levels as the " + "number of values in the associated control parameter \\(in the provided DPF fields " + "container, the number of fields should be the same as the number of values in the " + "fields container support\\)." + ), + ): + source_harmonics_obj.source_harmonics = fc_source_harmonics + + +def test_source_harmonics_is_source_control_valid(): + """Test SourceHarmonics is_source_control_valid method.""" + source_harmonics_obj = SourceHarmonics() + + # Test is_source_control_valid method (attribute not set). + assert source_harmonics_obj.is_source_control_valid() is False + + # Test is_source_control_valid method (attribute set, but attribute's field not set). + source_control_obj = SourceControlTime() + source_harmonics_obj.source_control = source_control_obj + assert source_harmonics_obj.is_source_control_valid() is False + + # Test is_source_control_valid method (attribute and attribute's field set, but empty). + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([1.0, 2.0, 3.0, 4.0, 5.0], 1) + source_harmonics_obj.source_control.control = f_source_control + # Control data must be emptied out after assignment, otherwise it triggers an exception from + # SourceControlTime's setter. + source_harmonics_obj.source_control.control.data = [] + assert source_harmonics_obj.is_source_control_valid() is False + + # Test is_source_control_valid method (all set). + f_source_control.append([1.0, 2.0, 3.0, 4.0, 5.0], 1) + source_harmonics_obj.source_control.control = f_source_control + assert source_harmonics_obj.is_source_control_valid() is True + + +def test_source_harmonics_load_source_harmonics(): + """Test SourceHarmonics load_source_harmonics method.""" + source_harmonics_obj = SourceHarmonics() + + # Load reference source file (dBSPL). + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_in_container + ) + assert isinstance(source_harmonics_obj.source_harmonics, FieldsContainer) + assert source_harmonics_obj.source_harmonics[0].data[3] == pytest.approx(EXP_ORDER_LEVEL03_REF) + + # Load source file in Pa. + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_Pa_in_container + ) + assert isinstance(source_harmonics_obj.source_harmonics, FieldsContainer) + assert source_harmonics_obj.source_harmonics[0].data[3] == pytest.approx(EXP_ORDER_LEVEL03_PA) + + # Load wrong-header file (DPF error). + with pytest.raises(Exception): + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_wrong_type_in_container + ) + + # Load xml file. + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_xml_in_container + ) + assert isinstance(source_harmonics_obj.source_harmonics, FieldsContainer) + assert source_harmonics_obj.source_harmonics[0].data[3] == pytest.approx(EXP_ORDER_LEVEL03_XML) + + +def test_source_harmonics_process(): + """Test SourceHarmonics process method.""" + # Create a field to use in a SourceControlTime object. + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([500, 2000, 3000, 3500], 1) + support = TimeFreqSupport() + f_time = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + f_time.append([0, 1, 2, 3], 1) + support.time_frequencies = f_time + f_source_control.time_freq_support = support + + # Create a SourceControlTime object. + source_control_obj = SourceControlTime() + source_control_obj.control = f_source_control + + source_harmonics_obj = SourceHarmonics( + pytest.data_path_sound_composer_harmonics_source_in_container, + source_control_obj, + ) + source_harmonics_obj.process() + assert source_harmonics_obj._output is not None + + +def test_source_harmonics_process_exceptions(): + """Test SourceHarmonics process method exceptions.""" + # Test process method exception1 (missing control). + source_harmonics_obj = SourceHarmonics( + pytest.data_path_sound_composer_harmonics_source_in_container + ) + with pytest.raises( + PyAnsysSoundException, + match="Harmonics source control is not set. Use ``SourceHarmonics.source_control``.", + ): + source_harmonics_obj.process() + + # Test process method exception2 (missing harmonics source data). + source_harmonics_obj.source_harmonics = None + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([500, 2000, 3000, 3500], 1) + source_control_obj = SourceControlTime() + source_control_obj.control = f_source_control + source_harmonics_obj.source_control = source_control_obj + with pytest.raises( + PyAnsysSoundException, + match=( + "Harmonics source data is not set. Use ``SourceHarmonics.source_harmonics`` " + "or method ``SourceHarmonics.load_source_harmonics\\(\\)``." + ), + ): + source_harmonics_obj.process() + + # Test process method exception3 (invalid sampling frequency value). + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_in_container + ) + with pytest.raises( + PyAnsysSoundException, match="Sampling frequency must be strictly positive." + ): + source_harmonics_obj.process(sampling_frequency=0.0) + + +def test_source_harmonics_get_output(): + """Test SourceHarmonics get_output method.""" + # Create a field to use in a SourceControlTime object. + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([500, 2000, 3000, 3500], 1) + support = TimeFreqSupport() + f_time = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + f_time.append([0, 1, 2, 3], 1) + support.time_frequencies = f_time + f_source_control.time_freq_support = support + + # Create a SourceControlTime object. + source_control_obj = SourceControlTime() + source_control_obj.control = f_source_control + + source_harmonics_obj = SourceHarmonics( + pytest.data_path_sound_composer_harmonics_source_in_container, + source_control_obj, + ) + source_harmonics_obj.process(sampling_frequency=44100.0) + f_output = source_harmonics_obj.get_output() + assert isinstance(f_output, Field) + assert len(f_output.data) / 44100.0 == pytest.approx(3.0, abs=1e-2) + + # Compute the power spectral density over the output signal. + psd = PowerSpectralDensity( + input_signal=f_output, + fft_size=8192, + window_type="HANN", + window_length=8192, + overlap=0.75, + ) + psd.process() + psd_squared, psd_freq = psd.get_PSD_squared_linear_as_nparray() + delat_f = psd_freq[1] - psd_freq[0] + + # Check the sound power level in the octave bands centered at 250, 1000 and 4000 Hz. + # Due to the non-deterministic nature of the produced signal, tolerance is set to 1 dB. + psd_squared_band = psd_squared[ + (psd_freq >= 250 * 2 ** (-1 / 2)) & (psd_freq < 250 * 2 ** (1 / 2)) + ] + level = 10 * np.log10(psd_squared_band.sum() * delat_f / REF_ACOUSTIC_POWER) + assert level == pytest.approx(EXP_LEVEL_OCTAVE_BAND[0], abs=1.0) + + psd_squared_band = psd_squared[ + (psd_freq >= 1000 * 2 ** (-1 / 2)) & (psd_freq < 1000 * 2 ** (1 / 2)) + ] + level = 10 * np.log10(psd_squared_band.sum() * delat_f / REF_ACOUSTIC_POWER) + assert level == pytest.approx(EXP_LEVEL_OCTAVE_BAND[1], abs=1.0) + + psd_squared_band = psd_squared[ + (psd_freq >= 4000 * 2 ** (-1 / 2)) & (psd_freq < 4000 * 2 ** (1 / 2)) + ] + level = 10 * np.log10(psd_squared_band.sum() * delat_f / REF_ACOUSTIC_POWER) + assert level == pytest.approx(EXP_LEVEL_OCTAVE_BAND[2], abs=1.0) + + +def test_source_harmonics_get_output_unprocessed(): + """Test SourceHarmonics get_output method's exception.""" + source_harmonics_obj = SourceHarmonics() + with pytest.warns( + PyAnsysSoundWarning, + match="Output is not processed yet. Use the ``SourceHarmonics.process\\(\\)`` method.", + ): + f_output = source_harmonics_obj.get_output() + assert f_output is None + + +def test_source_harmonics_get_output_as_nparray(): + """Test SourceHarmonics get_output_as_nparray method.""" + # Create a field to use in a SourceControlTime object. + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([500, 2000, 3000, 3500], 1) + support = TimeFreqSupport() + f_time = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + f_time.append([0, 1, 2, 3], 1) + support.time_frequencies = f_time + f_source_control.time_freq_support = support + + # Create a SourceControlTime object. + source_control_obj = SourceControlTime() + source_control_obj.control = f_source_control + + source_harmonics_obj = SourceHarmonics( + pytest.data_path_sound_composer_harmonics_source_in_container, + source_control_obj, + ) + source_harmonics_obj.process(sampling_frequency=44100.0) + output_nparray = source_harmonics_obj.get_output_as_nparray() + assert isinstance(output_nparray, np.ndarray) + assert len(output_nparray) / 44100.0 == pytest.approx(3.0, abs=1e-2) + + +def test_source_harmonics_get_output_as_nparray_unprocessed(): + """Test SourceHarmonics get_output_as_nparray method's exception.""" + source_harmonics_obj = SourceHarmonics() + with pytest.warns( + PyAnsysSoundWarning, + match="Output is not processed yet. Use the ``SourceHarmonics.process\\(\\)`` method.", + ): + output_nparray = source_harmonics_obj.get_output_as_nparray() + assert len(output_nparray) == 0 + + +@patch("matplotlib.pyplot.show") +def test_source_harmonics_plot(mock_show): + """Test SourceHarmonics plot method.""" + # Create a field to use in a SourceControlTime object. + f_source_control = fields_factory.create_scalar_field( + num_entities=1, location=locations.time_freq + ) + f_source_control.append([500, 2000, 3000, 3500], 1) + support = TimeFreqSupport() + f_time = fields_factory.create_scalar_field(num_entities=1, location=locations.time_freq) + f_time.append([0, 1, 2, 3], 1) + support.time_frequencies = f_time + f_source_control.time_freq_support = support + + # Create a SourceControlTime object. + source_control_obj = SourceControlTime() + source_control_obj.control = f_source_control + + source_harmonics_obj = SourceHarmonics( + pytest.data_path_sound_composer_harmonics_source_in_container, + source_control_obj, + ) + source_harmonics_obj.process() + source_harmonics_obj.plot() + + +def test_source_harmonics_plot_exceptions(): + """Test SourceHarmonics plot method's exception.""" + source_harmonics_obj = SourceHarmonics() + with pytest.raises( + PyAnsysSoundException, + match="Output is not processed yet. Use the 'SourceHarmonics.process\\(\\)' method.", + ): + source_harmonics_obj.plot() + + +def test_source_harmonics___extract_harmonics_info(): + """Test SourceHarmonics __extract_harmonics_info method.""" + source_harmonics_obj = SourceHarmonics() + assert source_harmonics_obj._SourceHarmonics__extract_harmonics_info() == ([], "", []) + + source_harmonics_obj.load_source_harmonics( + pytest.data_path_sound_composer_harmonics_source_in_container + ) + orders, name, rpms = source_harmonics_obj._SourceHarmonics__extract_harmonics_info() + assert orders[0] == pytest.approx(EXP_ORDERS[0]) + assert orders[2] == pytest.approx(EXP_ORDERS[1]) + assert orders[4] == pytest.approx(EXP_ORDERS[2]) + assert name == "RPM" + assert rpms[0] == pytest.approx(EXP_RPMS[0]) + assert rpms[7] == pytest.approx(EXP_RPMS[1]) + assert rpms[10] == pytest.approx(EXP_RPMS[2])