Pylint Report

Score: 9.46/10

Summary

Your code has been rated at 9.46/10
808
Total Issues
70
Conventions
31
Warnings
0
Errors
707
Refactors

Full Report

Click to view complete pylint output
************* Module rattlesnake.cicd.badge_color_coverage
src/rattlesnake/cicd/badge_color_coverage.py:26:11: W0718: Catching too general exception Exception (broad-exception-caught)
************* Module rattlesnake.cicd.badge_color_pylint
src/rattlesnake/cicd/badge_color_pylint.py:13:0: C0116: Missing function or method docstring (missing-function-docstring)
src/rattlesnake/cicd/badge_color_pylint.py:16:4: C0103: Variable name "COLOR" doesn't conform to snake_case naming style (invalid-name)
************* Module rattlesnake.cicd.report_pylint
src/rattlesnake/cicd/report_pylint.py:134:9: W0511: TODO: exactly match to "refactor" via r"R\d{4}:" and add an "unknown" (fixme)
src/rattlesnake/cicd/report_pylint.py:150:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/cicd/report_pylint.py:150:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/cicd/report_pylint.py:339:0: R0913: Too many arguments (7/5) (too-many-arguments)
src/rattlesnake/cicd/report_pylint.py:339:0: R0917: Too many positional arguments (7/5) (too-many-positional-arguments)
src/rattlesnake/cicd/report_pylint.py:475:11: W0718: Catching too general exception Exception (broad-exception-caught)
************* Module rattlesnake.cicd.report_pytest
src/rattlesnake/cicd/report_pytest.py:80:0: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/cicd/report_pytest.py:80:0: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/cicd/report_pytest.py:187:0: R0913: Too many arguments (7/5) (too-many-arguments)
src/rattlesnake/cicd/report_pytest.py:187:0: R0917: Too many positional arguments (7/5) (too-many-positional-arguments)
src/rattlesnake/cicd/report_pytest.py:309:11: W0718: Catching too general exception Exception (broad-exception-caught)
************* Module rattlesnake.cicd.reports_main_page
src/rattlesnake/cicd/reports_main_page.py:187:11: W0718: Catching too general exception Exception (broad-exception-caught)
************* Module rattlesnake.cicd.utilities
src/rattlesnake/cicd/utilities.py:24:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/cicd/utilities.py:48:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/cicd/utilities.py:92:0: R0914: Too many local variables (21/15) (too-many-locals)
************* Module rattlesnake.components.abstract_control_law
src/rattlesnake/components/abstract_control_law.py:33:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/abstract_control_law.py:33:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.abstract_environment
src/rattlesnake/components/abstract_environment.py:403:0: C0301: Line too long (106/100) (line-too-long)
src/rattlesnake/components/abstract_environment.py:523:0: C0301: Line too long (105/100) (line-too-long)
src/rattlesnake/components/abstract_environment.py:565:0: C0301: Line too long (111/100) (line-too-long)
src/rattlesnake/components/abstract_environment.py:44:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/abstract_environment.py:338:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes)
src/rattlesnake/components/abstract_environment.py:368:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/abstract_environment.py:381:4: R0913: Too many arguments (10/5) (too-many-arguments)
src/rattlesnake/components/abstract_environment.py:381:4: R0917: Too many positional arguments (10/5) (too-many-positional-arguments)
src/rattlesnake/components/abstract_environment.py:565:76: R1721: Unnecessary use of a comprehension, use list(self.command_map) instead. (unnecessary-comprehension)
src/rattlesnake/components/abstract_environment.py:617:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/abstract_environment.py:617:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.abstract_interactive_control_law
src/rattlesnake/components/abstract_interactive_control_law.py:147:4: R0913: Too many arguments (7/5) (too-many-arguments)
src/rattlesnake/components/abstract_interactive_control_law.py:147:4: R0917: Too many positional arguments (7/5) (too-many-positional-arguments)
************* Module rattlesnake.components.abstract_sysid_data_analysis
src/rattlesnake/components/abstract_sysid_data_analysis.py:49:0: R0902: Too many instance attributes (15/7) (too-many-instance-attributes)
src/rattlesnake/components/abstract_sysid_data_analysis.py:53:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/abstract_sysid_data_analysis.py:53:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/abstract_sysid_data_analysis.py:318:0: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/abstract_sysid_data_analysis.py:318:0: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
************* Module rattlesnake.components.abstract_sysid_environment
src/rattlesnake/components/abstract_sysid_environment.py:1948:0: C0301: Line too long (102/100) (line-too-long)
src/rattlesnake/components/abstract_sysid_environment.py:1949:0: C0301: Line too long (104/100) (line-too-long)
src/rattlesnake/components/abstract_sysid_environment.py:2001:0: C0301: Line too long (101/100) (line-too-long)
src/rattlesnake/components/abstract_sysid_environment.py:1:0: C0302: Too many lines in module (2654/1000) (too-many-lines)
src/rattlesnake/components/abstract_sysid_environment.py:1564:13: W0511: TODO: error checking to make sure relevant info matches current controller state (fixme)
src/rattlesnake/components/abstract_sysid_environment.py:1603:17: W0511: TODO: in the case that a time history file was chosen, should FRF be (fixme)
src/rattlesnake/components/abstract_sysid_environment.py:1620:13: W0511: TODO: pull coordinate out to verify matching info (fixme)
src/rattlesnake/components/abstract_sysid_environment.py:85:0: R0902: Too many instance attributes (16/7) (too-many-instance-attributes)
src/rattlesnake/components/abstract_sysid_environment.py:298:0: R0902: Too many instance attributes (28/7) (too-many-instance-attributes)
src/rattlesnake/components/abstract_sysid_environment.py:305:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/abstract_sysid_environment.py:305:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/abstract_sysid_environment.py:305:4: R0915: Too many statements (68/50) (too-many-statements)
src/rattlesnake/components/abstract_sysid_environment.py:758:4: R0914: Too many local variables (27/15) (too-many-locals)
src/rattlesnake/components/abstract_sysid_environment.py:879:27: W0718: Catching too general exception Exception (broad-exception-caught)
src/rattlesnake/components/abstract_sysid_environment.py:887:27: W0718: Catching too general exception Exception (broad-exception-caught)
src/rattlesnake/components/abstract_sysid_environment.py:758:4: R0912: Too many branches (20/12) (too-many-branches)
src/rattlesnake/components/abstract_sysid_environment.py:758:4: R0915: Too many statements (60/50) (too-many-statements)
src/rattlesnake/components/abstract_sysid_environment.py:955:4: R0915: Too many statements (53/50) (too-many-statements)
src/rattlesnake/components/abstract_sysid_environment.py:1272:4: R0914: Too many local variables (18/15) (too-many-locals)
src/rattlesnake/components/abstract_sysid_environment.py:1272:4: R0912: Too many branches (20/12) (too-many-branches)
src/rattlesnake/components/abstract_sysid_environment.py:1272:4: R0915: Too many statements (99/50) (too-many-statements)
src/rattlesnake/components/abstract_sysid_environment.py:1556:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/abstract_sysid_environment.py:1532:4: R0912: Too many branches (13/12) (too-many-branches)
src/rattlesnake/components/abstract_sysid_environment.py:1532:4: R0915: Too many statements (60/50) (too-many-statements)
src/rattlesnake/components/abstract_sysid_environment.py:298:0: R0904: Too many public methods (28/20) (too-many-public-methods)
src/rattlesnake/components/abstract_sysid_environment.py:1763:0: R0902: Too many instance attributes (12/7) (too-many-instance-attributes)
src/rattlesnake/components/abstract_sysid_environment.py:1791:4: R0913: Too many arguments (14/5) (too-many-arguments)
src/rattlesnake/components/abstract_sysid_environment.py:1791:4: R0917: Too many positional arguments (14/5) (too-many-positional-arguments)
src/rattlesnake/components/abstract_sysid_environment.py:1894:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/abstract_sysid_environment.py:2006:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/abstract_sysid_environment.py:2004:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
src/rattlesnake/components/abstract_sysid_environment.py:2577:12: R0916: Too many boolean expressions in if statement (8/5) (too-many-boolean-expressions)
src/rattlesnake/components/abstract_sysid_environment.py:1763:0: R0904: Too many public methods (22/20) (too-many-public-methods)
************* Module rattlesnake.components.acquisition
src/rattlesnake/components/acquisition.py:46:0: R0902: Too many instance attributes (21/7) (too-many-instance-attributes)
src/rattlesnake/components/acquisition.py:163:12: C0415: Import outside toplevel (nidaqmx_hardware_multitask.NIDAQmxAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:170:12: C0415: Import outside toplevel (lanxi_hardware_multiprocessing.LanXIAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:176:12: C0415: Import outside toplevel (data_physics_hardware.DataPhysicsAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:183:12: C0415: Import outside toplevel (data_physics_dp900_hardware.DataPhysicsDP900Acquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:190:12: C0415: Import outside toplevel (exodus_modal_solution_hardware.ExodusAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:197:12: C0415: Import outside toplevel (state_space_virtual_hardware.StateSpaceAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:204:12: C0415: Import outside toplevel (sdynpy_system_virtual_hardware.SDynPySystemAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:211:12: C0415: Import outside toplevel (sdynpy_frf_virtual_hardware.SDynPyFRFAcquisition) (import-outside-toplevel)
src/rattlesnake/components/acquisition.py:143:4: R0912: Too many branches (13/12) (too-many-branches)
src/rattlesnake/components/acquisition.py:304:4: R0914: Too many local variables (18/15) (too-many-locals)
src/rattlesnake/components/acquisition.py:348:16: R1723: Unnecessary "else" after "break", remove the "else" and de-indent the code inside it (no-else-break)
src/rattlesnake/components/acquisition.py:363:16: R1729: Use a generator instead 'all(not flag for (environment, flag) in self.environment_active_flags.items())' (use-a-generator)
src/rattlesnake/components/acquisition.py:366:16: R1729: Use a generator instead 'all(flag is None for (environment, flag) in self.environment_first_data.items())' (use-a-generator)
src/rattlesnake/components/acquisition.py:369:16: R1729: Use a generator instead 'all(not flag for (environment, flag) in self.environment_last_data.items())' (use-a-generator)
src/rattlesnake/components/acquisition.py:304:4: R0912: Too many branches (30/12) (too-many-branches)
src/rattlesnake/components/acquisition.py:304:4: R0915: Too many statements (111/50) (too-many-statements)
************* Module rattlesnake.components.data_collector
src/rattlesnake/components/data_collector.py:44:0: R0902: Too many instance attributes (18/7) (too-many-instance-attributes)
src/rattlesnake/components/data_collector.py:48:4: R0913: Too many arguments (17/5) (too-many-arguments)
src/rattlesnake/components/data_collector.py:48:4: R0917: Too many positional arguments (17/5) (too-many-positional-arguments)
src/rattlesnake/components/data_collector.py:48:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/data_collector.py:220:12: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/data_collector.py:157:4: R0912: Too many branches (13/12) (too-many-branches)
src/rattlesnake/components/data_collector.py:423:0: R0902: Too many instance attributes (22/7) (too-many-instance-attributes)
src/rattlesnake/components/data_collector.py:426:4: R0913: Too many arguments (23/5) (too-many-arguments)
src/rattlesnake/components/data_collector.py:426:4: R0917: Too many positional arguments (23/5) (too-many-positional-arguments)
src/rattlesnake/components/data_collector.py:426:4: R0914: Too many local variables (23/15) (too-many-locals)
src/rattlesnake/components/data_collector.py:423:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/data_collector.py:534:0: R0902: Too many instance attributes (16/7) (too-many-instance-attributes)
src/rattlesnake/components/data_collector.py:541:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/data_collector.py:541:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/data_collector.py:606:4: R0912: Too many branches (14/12) (too-many-branches)
src/rattlesnake/components/data_collector.py:705:4: R0912: Too many branches (14/12) (too-many-branches)
src/rattlesnake/components/data_collector.py:705:4: R0915: Too many statements (51/50) (too-many-statements)
src/rattlesnake/components/data_collector.py:887:0: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/data_collector.py:887:0: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
************* Module rattlesnake.components.data_physics_dp900_hardware
src/rattlesnake/components/data_physics_dp900_hardware.py:349:9: W0511: TODO: Uncomment this (fixme)
src/rattlesnake/components/data_physics_dp900_hardware.py:426:9: W0511: TODO: Remove this (fixme)
src/rattlesnake/components/data_physics_dp900_hardware.py:66:8: C0103: Attribute name "DP900Coupling" doesn't conform to snake_case naming style (invalid-name)
src/rattlesnake/components/data_physics_dp900_hardware.py:67:8: C0103: Attribute name "DP900Status" doesn't conform to snake_case naming style (invalid-name)
src/rattlesnake/components/data_physics_dp900_hardware.py:38:0: R0902: Too many instance attributes (15/7) (too-many-instance-attributes)
src/rattlesnake/components/data_physics_dp900_hardware.py:64:8: C0415: Import outside toplevel (data_physics_dp900_interface.DP900, data_physics_dp900_interface.DP900Coupling, data_physics_dp900_interface.DP900Status) (import-outside-toplevel)
src/rattlesnake/components/data_physics_dp900_hardware.py:82:4: R0914: Too many local variables (21/15) (too-many-locals)
src/rattlesnake/components/data_physics_dp900_hardware.py:112:12: R1714: Consider merging these comparisons with 'in' by using 'self.dp900.status in (self.DP900Status.STOPPED, self.DP900Status.INIT)'. Use a set instead if elements are hashable. (consider-using-in)
src/rattlesnake/components/data_physics_dp900_hardware.py:82:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/data_physics_dp900_hardware.py:82:4: R0915: Too many statements (84/50) (too-many-statements)
************* Module rattlesnake.components.data_physics_dp900_interface
src/rattlesnake/components/data_physics_dp900_interface.py:1:0: C0302: Too many lines in module (1004/1000) (too-many-lines)
src/rattlesnake/components/data_physics_dp900_interface.py:80:4: R0915: Too many statements (67/50) (too-many-statements)
src/rattlesnake/components/data_physics_dp900_interface.py:418:12: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
src/rattlesnake/components/data_physics_dp900_interface.py:489:12: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
src/rattlesnake/components/data_physics_dp900_interface.py:77:0: R0904: Too many public methods (34/20) (too-many-public-methods)
src/rattlesnake/components/data_physics_dp900_interface.py:40:19: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
************* Module rattlesnake.components.data_physics_hardware
src/rattlesnake/components/data_physics_hardware.py:39:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/data_physics_hardware.py:109:12: R1714: Consider merging these comparisons with 'in' by using 'self.quattro.status in (QuattroStatus.STOPPED, QuattroStatus.INIT)'. Use a set instead if elements are hashable. (consider-using-in)
************* Module rattlesnake.components.data_physics_interface
src/rattlesnake/components/data_physics_interface.py:57:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes)
src/rattlesnake/components/data_physics_interface.py:75:28: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
src/rattlesnake/components/data_physics_interface.py:270:8: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
src/rattlesnake/components/data_physics_interface.py:350:12: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
src/rattlesnake/components/data_physics_interface.py:396:12: R1720: Unnecessary "elif" after "raise", remove the leading "el" from "elif" (no-else-raise)
src/rattlesnake/components/data_physics_interface.py:57:0: R0904: Too many public methods (21/20) (too-many-public-methods)
************* Module rattlesnake.components.environments
src/rattlesnake/components/environments.py:115:0: C0103: Constant name "environment_UIs" doesn't conform to UPPER_CASE naming style (invalid-name)
************* Module rattlesnake.components.exodus_modal_solution_hardware
src/rattlesnake/components/exodus_modal_solution_hardware.py:548:9: W0511: TODO Add error checking (fixme)
src/rattlesnake/components/exodus_modal_solution_hardware.py:31:0: R0402: Use 'from scipy import signal' instead (consider-using-from-import)
src/rattlesnake/components/exodus_modal_solution_hardware.py:57:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/exodus_modal_solution_hardware.py:507:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
************* Module rattlesnake.components.lanxi_hardware_multiprocessing
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1:0: C0302: Too many lines in module (1177/1000) (too-many-lines)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:56:1: W0511: TODO Get responses each time a get or put is done so we know if it was successful (fixme)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:57:1: W0511: TODO Shut down the data acquisition more quickly (fixme)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1031:68: W0511: TODO: Re-evaluate this number (fixme)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1128:40: W0511: TODO: Might need to increase buffer (fixme)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:98:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:64:0: R0912: Too many branches (13/12) (too-many-branches)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:148:17: C0209: Formatting a regular string which could be an f-string (consider-using-f-string)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:167:23: R1729: Use a generator instead 'all(data_type == socket_data_types[0] for data_type in socket_data_types)' (use-a-generator)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:125:0: R1711: Useless return at end of function or method (useless-return)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:356:0: R1711: Useless return at end of function or method (useless-return)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:391:0: R0902: Too many instance attributes (14/7) (too-many-instance-attributes)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:453:31: R1718: Consider using a set comprehension (consider-using-set-comprehension)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:470:4: R0912: Too many branches (14/12) (too-many-branches)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:562:4: R0914: Too many local variables (16/15) (too-many-locals)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:619:16: R1728: Consider using a generator instead 'sum(1 for (acquisition_device, acquisition_dict) in self.acquisition_map.items() for channel_number in acquisition_dict)' (consider-using-generator)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:678:0: R0902: Too many instance attributes (16/7) (too-many-instance-attributes)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:705:4: R0914: Too many local variables (22/15) (too-many-locals)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:724:31: R1718: Consider using a set comprehension (consider-using-set-comprehension)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:865:39: R1719: The if expression can be replaced with 'not test' (simplifiable-if-expression)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:705:4: R0912: Too many branches (43/12) (too-many-branches)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:705:4: R0915: Too many statements (124/50) (too-many-statements)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1001:4: R0912: Too many branches (13/12) (too-many-branches)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1115:40: R1721: Unnecessary use of a comprehension, use list(self.slave_addresses) instead. (unnecessary-comprehension)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1126:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/lanxi_hardware_multiprocessing.py:1126:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
************* Module rattlesnake.components.modal_environment
src/rattlesnake/components/modal_environment.py:534:0: C0301: Line too long (107/100) (line-too-long)
src/rattlesnake/components/modal_environment.py:848:0: C0301: Line too long (115/100) (line-too-long)
src/rattlesnake/components/modal_environment.py:1036:0: C0301: Line too long (105/100) (line-too-long)
src/rattlesnake/components/modal_environment.py:1689:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/modal_environment.py:2131:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/modal_environment.py:1:0: C0302: Too many lines in module (2822/1000) (too-many-lines)
src/rattlesnake/components/modal_environment.py:81:0: R0902: Too many instance attributes (12/7) (too-many-instance-attributes)
src/rattlesnake/components/modal_environment.py:84:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/modal_environment.py:84:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/modal_environment.py:81:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/modal_environment.py:132:0: R0902: Too many instance attributes (29/7) (too-many-instance-attributes)
src/rattlesnake/components/modal_environment.py:142:4: R0913: Too many arguments (29/5) (too-many-arguments)
src/rattlesnake/components/modal_environment.py:142:4: R0917: Too many positional arguments (29/5) (too-many-positional-arguments)
src/rattlesnake/components/modal_environment.py:142:4: R0914: Too many local variables (29/15) (too-many-locals)
src/rattlesnake/components/modal_environment.py:565:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/modal_environment.py:599:0: R0902: Too many instance attributes (23/7) (too-many-instance-attributes)
src/rattlesnake/components/modal_environment.py:605:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/modal_environment.py:605:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/modal_environment.py:1113:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/modal_environment.py:1111:4: R0912: Too many branches (16/12) (too-many-branches)
src/rattlesnake/components/modal_environment.py:1642:4: R0915: Too many statements (62/50) (too-many-statements)
src/rattlesnake/components/modal_environment.py:1818:4: R0914: Too many local variables (18/15) (too-many-locals)
src/rattlesnake/components/modal_environment.py:1818:4: R0912: Too many branches (35/12) (too-many-branches)
src/rattlesnake/components/modal_environment.py:1818:4: R0915: Too many statements (94/50) (too-many-statements)
src/rattlesnake/components/modal_environment.py:1968:4: R0915: Too many statements (56/50) (too-many-statements)
src/rattlesnake/components/modal_environment.py:2092:4: R0915: Too many statements (52/50) (too-many-statements)
src/rattlesnake/components/modal_environment.py:599:0: R0904: Too many public methods (45/20) (too-many-public-methods)
src/rattlesnake/components/modal_environment.py:2341:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/modal_environment.py:2724:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/modal_environment.py:2724:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.nidaqmx_hardware_multitask
src/rattlesnake/components/nidaqmx_hardware_multitask.py:40:0: R0902: Too many instance attributes (12/7) (too-many-instance-attributes)
src/rattlesnake/components/nidaqmx_hardware_multitask.py:271:22: R1728: Consider using a generator instead 'max(data.shape[-1] for data in remaining_data)' (consider-using-generator)
src/rattlesnake/components/nidaqmx_hardware_multitask.py:300:4: R0912: Too many branches (24/12) (too-many-branches)
src/rattlesnake/components/nidaqmx_hardware_multitask.py:300:4: R0915: Too many statements (64/50) (too-many-statements)
src/rattlesnake/components/nidaqmx_hardware_multitask.py:454:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes)
src/rattlesnake/components/nidaqmx_hardware_multitask.py:502:4: R0912: Too many branches (13/12) (too-many-branches)
src/rattlesnake/components/nidaqmx_hardware_multitask.py:502:4: R0915: Too many statements (54/50) (too-many-statements)
************* Module rattlesnake.components.output
src/rattlesnake/components/output.py:43:0: R0902: Too many instance attributes (17/7) (too-many-instance-attributes)
src/rattlesnake/components/output.py:134:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/output.py:156:12: C0415: Import outside toplevel (nidaqmx_hardware_multitask.NIDAQmxOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:163:12: C0415: Import outside toplevel (lanxi_hardware_multiprocessing.LanXIOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:169:12: C0415: Import outside toplevel (data_physics_hardware.DataPhysicsOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:173:12: C0415: Import outside toplevel (data_physics_dp900_hardware.DataPhysicsDP900Output) (import-outside-toplevel)
src/rattlesnake/components/output.py:179:12: C0415: Import outside toplevel (exodus_modal_solution_hardware.ExodusOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:183:12: C0415: Import outside toplevel (state_space_virtual_hardware.StateSpaceOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:187:12: C0415: Import outside toplevel (sdynpy_system_virtual_hardware.SDynPySystemOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:191:12: C0415: Import outside toplevel (sdynpy_frf_virtual_hardware.SDynPyFRFOutput) (import-outside-toplevel)
src/rattlesnake/components/output.py:309:16: R1724: Unnecessary "elif" after "continue", remove the leading "el" from "elif" (no-else-continue)
src/rattlesnake/components/output.py:386:16: R1729: Use a generator instead 'all(not flag for (environment, flag) in self.environment_active_flags.items())' (use-a-generator)
src/rattlesnake/components/output.py:389:16: R1729: Use a generator instead 'all(not flag for (environment, flag) in self.environment_starting_up_flags.items())' (use-a-generator)
src/rattlesnake/components/output.py:392:16: R1729: Use a generator instead 'all(remainder.shape[-1] == 0 for (environment, remainder) in self.environment_data_out_remainders.items())' (use-a-generator)
src/rattlesnake/components/output.py:216:4: R0912: Too many branches (23/12) (too-many-branches)
src/rattlesnake/components/output.py:216:4: R0915: Too many statements (75/50) (too-many-statements)
************* Module rattlesnake.components.random_vibration_sys_id_data_analysis
src/rattlesnake/components/random_vibration_sys_id_data_analysis.py:61:0: R0902: Too many instance attributes (15/7) (too-many-instance-attributes)
src/rattlesnake/components/random_vibration_sys_id_data_analysis.py:64:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/random_vibration_sys_id_data_analysis.py:64:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/random_vibration_sys_id_data_analysis.py:540:0: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/random_vibration_sys_id_data_analysis.py:540:0: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
************* Module rattlesnake.components.random_vibration_sys_id_environment
src/rattlesnake/components/random_vibration_sys_id_environment.py:1249:0: C0301: Line too long (121/100) (line-too-long)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2714:0: C0301: Line too long (102/100) (line-too-long)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2715:0: C0301: Line too long (104/100) (line-too-long)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2725:0: C0301: Line too long (101/100) (line-too-long)
src/rattlesnake/components/random_vibration_sys_id_environment.py:1:0: C0302: Too many lines in module (3079/1000) (too-many-lines)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2483:16: W0511: TODO: sigma clipping and bandwidths should get (fixme)
src/rattlesnake/components/random_vibration_sys_id_environment.py:88:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/random_vibration_sys_id_environment.py:91:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:91:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:88:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/random_vibration_sys_id_environment.py:156:0: R0902: Too many instance attributes (30/7) (too-many-instance-attributes)
src/rattlesnake/components/random_vibration_sys_id_environment.py:159:4: R0913: Too many arguments (27/5) (too-many-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:159:4: R0917: Too many positional arguments (27/5) (too-many-positional-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:159:4: R0914: Too many local variables (27/15) (too-many-locals)
src/rattlesnake/components/random_vibration_sys_id_environment.py:450:0: R0902: Too many instance attributes (31/7) (too-many-instance-attributes)
src/rattlesnake/components/random_vibration_sys_id_environment.py:460:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:460:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:827:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/random_vibration_sys_id_environment.py:840:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/random_vibration_sys_id_environment.py:939:20: R1729: Use a generator instead 'all(method in function[1].__dict__ and not (hasattr(function[1].__dict__[method], '__isabstractmethod__') and function[1].__dict__[method].__isabstractmethod__) for method in ['system_id_update', 'control'])' (use-a-generator)
src/rattlesnake/components/random_vibration_sys_id_environment.py:1122:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/random_vibration_sys_id_environment.py:1805:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/random_vibration_sys_id_environment.py:1805:4: R0915: Too many statements (60/50) (too-many-statements)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2091:4: R0914: Too many local variables (19/15) (too-many-locals)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2091:4: R0912: Too many branches (35/12) (too-many-branches)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2091:4: R0915: Too many statements (84/50) (too-many-statements)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2270:4: R0915: Too many statements (59/50) (too-many-statements)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2402:4: R0914: Too many local variables (16/15) (too-many-locals)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2402:4: R0912: Too many branches (16/12) (too-many-branches)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2402:4: R0915: Too many statements (68/50) (too-many-statements)
src/rattlesnake/components/random_vibration_sys_id_environment.py:450:0: R0904: Too many public methods (47/20) (too-many-public-methods)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2675:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2963:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/random_vibration_sys_id_environment.py:2963:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.random_vibration_sys_id_utilities
src/rattlesnake/components/random_vibration_sys_id_utilities.py:63:0: R0914: Too many local variables (22/15) (too-many-locals)
************* Module rattlesnake.components.sdynpy_frf_virtual_hardware
src/rattlesnake/components/sdynpy_frf_virtual_hardware.py:87:0: R0902: Too many instance attributes (18/7) (too-many-instance-attributes)
src/rattlesnake/components/sdynpy_frf_virtual_hardware.py:169:4: R0914: Too many local variables (16/15) (too-many-locals)
************* Module rattlesnake.components.sdynpy_system_virtual_hardware
src/rattlesnake/components/sdynpy_system_virtual_hardware.py:29:0: R0402: Use 'from scipy import signal' instead (consider-using-from-import)
src/rattlesnake/components/sdynpy_system_virtual_hardware.py:77:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/sdynpy_system_virtual_hardware.py:114:34: R1721: Unnecessary use of a comprehension, use dict(np.load(system_file).items()) instead. (unnecessary-comprehension)
src/rattlesnake/components/sdynpy_system_virtual_hardware.py:130:12: R1728: Consider using a generator instead 'tuple(abs(v) for v in val)' (consider-using-generator)
src/rattlesnake/components/sdynpy_system_virtual_hardware.py:159:4: R0914: Too many local variables (39/15) (too-many-locals)
src/rattlesnake/components/sdynpy_system_virtual_hardware.py:159:4: R0915: Too many statements (68/50) (too-many-statements)
************* Module rattlesnake.components.signal_generation
src/rattlesnake/components/signal_generation.py:175:5: W0511: TODO: update the parameters passing approach to take one argument (like a dictionary) (fixme)
src/rattlesnake/components/signal_generation.py:635:24: W0511: TODO: This is deprecated, fix to use Trapezoid (fixme)
src/rattlesnake/components/signal_generation.py:186:0: R0902: Too many instance attributes (11/7) (too-many-instance-attributes)
src/rattlesnake/components/signal_generation.py:189:4: R0913: Too many arguments (11/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:189:4: R0917: Too many positional arguments (11/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:265:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:265:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:305:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes)
src/rattlesnake/components/signal_generation.py:308:4: R0913: Too many arguments (10/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:308:4: R0917: Too many positional arguments (10/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:381:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:381:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:411:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes)
src/rattlesnake/components/signal_generation.py:414:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:414:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:450:4: W0221: Number of parameters was 1 in 'SignalGenerator.update_parameters' and is now 4 in overriding 'SineSignalGenerator.update_parameters' method (arguments-differ)
src/rattlesnake/components/signal_generation.py:482:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
src/rattlesnake/components/signal_generation.py:485:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:485:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:523:4: W0221: Number of parameters was 1 in 'SignalGenerator.update_parameters' and is now 3 in overriding 'SquareSignalGenerator.update_parameters' method (arguments-differ)
src/rattlesnake/components/signal_generation.py:563:0: R0902: Too many instance attributes (15/7) (too-many-instance-attributes)
src/rattlesnake/components/signal_generation.py:566:4: R0913: Too many arguments (10/5) (too-many-arguments)
src/rattlesnake/components/signal_generation.py:566:4: R0917: Too many positional arguments (10/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation.py:619:4: W0221: Number of parameters was 1 in 'SignalGenerator.update_parameters' and is now 2 in overriding 'CPSDSignalGenerator.update_parameters' method (arguments-differ)
src/rattlesnake/components/signal_generation.py:657:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
src/rattlesnake/components/signal_generation.py:753:4: W0221: Number of parameters was 1 in 'SignalGenerator.update_parameters' and is now 3 in overriding 'ContinuousTransientSignalGenerator.update_parameters' method (arguments-differ)
src/rattlesnake/components/signal_generation.py:792:4: W0221: Number of parameters was 1 in 'SignalGenerator.update_parameters' and is now 3 in overriding 'TransientSignalGenerator.update_parameters' method (arguments-differ)
************* Module rattlesnake.components.signal_generation_process
src/rattlesnake/components/signal_generation_process.py:58:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/signal_generation_process.py:58:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation_process.py:55:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/signal_generation_process.py:85:0: R0902: Too many instance attributes (17/7) (too-many-instance-attributes)
src/rattlesnake/components/signal_generation_process.py:92:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/signal_generation_process.py:92:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/signal_generation_process.py:439:0: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/signal_generation_process.py:439:0: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
************* Module rattlesnake.components.sine_sys_id_environment
src/rattlesnake/components/sine_sys_id_environment.py:1166:0: C0301: Line too long (120/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:1643:0: C0301: Line too long (105/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:1803:0: C0301: Line too long (101/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:2795:0: C0301: Line too long (109/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3169:0: C0301: Line too long (101/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3281:0: C0301: Line too long (102/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3358:0: C0301: Line too long (119/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3362:0: C0301: Line too long (119/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3367:0: C0301: Line too long (119/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3372:0: C0301: Line too long (119/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3593:0: C0301: Line too long (108/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3612:0: C0301: Line too long (102/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3625:0: C0301: Line too long (102/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:3644:0: C0301: Line too long (101/100) (line-too-long)
src/rattlesnake/components/sine_sys_id_environment.py:1:0: C0302: Too many lines in module (3929/1000) (too-many-lines)
src/rattlesnake/components/sine_sys_id_environment.py:104:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_environment.py:107:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:107:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:104:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/sine_sys_id_environment.py:169:0: R0902: Too many instance attributes (28/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_environment.py:172:4: R0913: Too many arguments (25/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:172:4: R0914: Too many local variables (25/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_environment.py:340:4: R0915: Too many statements (55/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:493:0: R0902: Too many instance attributes (37/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_environment.py:496:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:496:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:496:4: R0915: Too many statements (68/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:873:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/sine_sys_id_environment.py:979:4: R0914: Too many local variables (19/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_environment.py:979:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
src/rattlesnake/components/sine_sys_id_environment.py:1129:20: R1729: Use a generator instead 'all(method in function[1].__dict__ for method in ['system_id_update', 'control'])' (use-a-generator)
src/rattlesnake/components/sine_sys_id_environment.py:1186:4: R0912: Too many branches (15/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_environment.py:1186:4: R0915: Too many statements (58/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:1367:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_environment.py:1795:12: R1704: Redefining argument with the local name 'tone_index' (redefined-argument-from-local)
src/rattlesnake/components/sine_sys_id_environment.py:1796:16: R1704: Redefining argument with the local name 'channel_index' (redefined-argument-from-local)
src/rattlesnake/components/sine_sys_id_environment.py:1806:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:1806:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:1919:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_environment.py:1999:4: R0914: Too many local variables (16/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_environment.py:1999:4: R0912: Too many branches (18/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_environment.py:1999:4: R0915: Too many statements (53/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:2077:4: R0912: Too many branches (18/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_environment.py:2077:4: R0915: Too many statements (74/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:2215:4: R0915: Too many statements (73/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:493:0: R0904: Too many public methods (54/20) (too-many-public-methods)
src/rattlesnake/components/sine_sys_id_environment.py:2376:0: R0902: Too many instance attributes (69/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_environment.py:2379:4: R0915: Too many statements (76/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:2507:16: R1729: Use a generator instead 'all(spec1 == spec2 for (spec1, spec2) in zip(self.environment_parameters.specifications, environment_parameters.specifications))' (use-a-generator)
src/rattlesnake/components/sine_sys_id_environment.py:2670:4: R0914: Too many local variables (35/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_environment.py:2670:4: R0915: Too many statements (51/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:3172:4: R0914: Too many local variables (74/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_environment.py:3226:16: R1731: Consider using 'self.control_start_index = max(self.control_start_index, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_environment.py:3253:16: R1731: Consider using 'self.control_start_index = max(self.control_start_index, first_nonzero_index)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_environment.py:3376:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
src/rattlesnake/components/sine_sys_id_environment.py:3172:4: R0912: Too many branches (48/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_environment.py:3172:4: R0915: Too many statements (226/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_environment.py:3813:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_environment.py:3813:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.sine_sys_id_utilities
src/rattlesnake/components/sine_sys_id_utilities.py:1:0: C0302: Too many lines in module (3376/1000) (too-many-lines)
src/rattlesnake/components/sine_sys_id_utilities.py:36:0: R0912: Too many branches (16/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_utilities.py:117:0: R0913: Too many arguments (12/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:117:0: R0917: Too many positional arguments (12/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:117:0: R0914: Too many local variables (43/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:117:0: R0912: Too many branches (26/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_utilities.py:117:0: R0915: Too many statements (92/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_utilities.py:309:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/sine_sys_id_utilities.py:332:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/sine_sys_id_utilities.py:343:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:343:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:392:4: R0915: Too many statements (87/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_utilities.py:506:8: R1703: The if statement can be replaced with 'var = bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/sine_sys_id_utilities.py:510:8: R1703: The if statement can be replaced with 'var = bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/sine_sys_id_utilities.py:498:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_utilities.py:601:4: R0913: Too many arguments (11/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:601:4: R0917: Too many positional arguments (11/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:601:4: R0914: Too many local variables (22/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:601:4: R0912: Too many branches (38/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_utilities.py:601:4: R0915: Too many statements (155/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_utilities.py:875:0: R0914: Too many local variables (22/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:980:0: R0902: Too many instance attributes (48/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_utilities.py:1001:4: R0913: Too many arguments (17/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1001:4: R0917: Too many positional arguments (17/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1001:4: R0914: Too many local variables (22/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:1001:4: R0915: Too many statements (65/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_utilities.py:1179:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1179:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1179:4: R0914: Too many local variables (25/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:1179:4: R0915: Too many statements (55/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_utilities.py:1413:8: R1731: Consider using 'ramp_down_start = max(ramp_down_start, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1416:8: R1731: Consider using 'ramp_down_end = max(ramp_down_end, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1419:8: R1731: Consider using 'middle_start = max(middle_start, self.ramp_samples)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1421:8: R1730: Consider using 'middle_start = min(middle_start, self.end_index - self.start_index - self.ramp_samples)' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1424:8: R1731: Consider using 'middle_end = max(middle_end, self.ramp_samples)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1426:8: R1730: Consider using 'middle_end = min(middle_end, self.end_index - self.start_index - self.ramp_samples)' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1478:8: R1731: Consider using 'ramp_down_start = max(ramp_down_start, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1481:8: R1731: Consider using 'ramp_down_end = max(ramp_down_end, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1484:8: R1731: Consider using 'middle_start = max(middle_start, self.ramp_samples)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1486:8: R1730: Consider using 'middle_start = min(middle_start, self.end_index - self.start_index - self.ramp_samples)' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1489:8: R1731: Consider using 'middle_end = max(middle_end, self.ramp_samples)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1491:8: R1730: Consider using 'middle_end = min(middle_end, self.end_index - self.start_index - self.ramp_samples)' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/sine_sys_id_utilities.py:1627:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1627:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1627:4: R0914: Too many local variables (18/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:1807:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1807:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:1807:0: R0914: Too many local variables (38/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:2036:4: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/sine_sys_id_utilities.py:1807:0: R0912: Too many branches (22/12) (too-many-branches)
src/rattlesnake/components/sine_sys_id_utilities.py:1807:0: R0915: Too many statements (67/50) (too-many-statements)
src/rattlesnake/components/sine_sys_id_utilities.py:2042:0: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2042:0: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2042:0: R0914: Too many local variables (28/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:2208:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_utilities.py:2214:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2214:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2349:4: R0913: Too many arguments (12/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2349:4: R0917: Too many positional arguments (12/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2465:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2465:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2465:4: R0914: Too many local variables (32/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:2529:16: R1704: Redefining argument with the local name 'control_index' (redefined-argument-from-local)
src/rattlesnake/components/sine_sys_id_utilities.py:2738:4: R0914: Too many local variables (29/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:2853:0: R0902: Too many instance attributes (18/7) (too-many-instance-attributes)
src/rattlesnake/components/sine_sys_id_utilities.py:2857:4: R0913: Too many arguments (14/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2857:4: R0917: Too many positional arguments (14/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2857:4: R0914: Too many local variables (23/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:2963:4: R0913: Too many arguments (15/5) (too-many-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2963:4: R0917: Too many positional arguments (15/5) (too-many-positional-arguments)
src/rattlesnake/components/sine_sys_id_utilities.py:2963:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:3117:4: R0914: Too many local variables (22/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:3189:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:3267:4: R0914: Too many local variables (25/15) (too-many-locals)
src/rattlesnake/components/sine_sys_id_utilities.py:3264:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module rattlesnake.components.spectral_processing
src/rattlesnake/components/spectral_processing.py:448:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/spectral_processing.py:468:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/spectral_processing.py:495:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/spectral_processing.py:515:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/spectral_processing.py:542:0: C0301: Line too long (103/100) (line-too-long)
src/rattlesnake/components/spectral_processing.py:64:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/spectral_processing.py:67:4: R0913: Too many arguments (14/5) (too-many-arguments)
src/rattlesnake/components/spectral_processing.py:67:4: R0917: Too many positional arguments (14/5) (too-many-positional-arguments)
src/rattlesnake/components/spectral_processing.py:108:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/spectral_processing.py:108:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/spectral_processing.py:119:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/spectral_processing.py:119:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/spectral_processing.py:131:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/spectral_processing.py:131:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/spectral_processing.py:144:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/spectral_processing.py:144:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/spectral_processing.py:153:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement)
src/rattlesnake/components/spectral_processing.py:153:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/spectral_processing.py:159:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/spectral_processing.py:162:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/spectral_processing.py:162:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/spectral_processing.py:280:4: R0914: Too many local variables (31/15) (too-many-locals)
src/rattlesnake/components/spectral_processing.py:309:42: R1721: Unnecessary use of a comprehension, use list(zip(*data)) instead. (unnecessary-comprehension)
src/rattlesnake/components/spectral_processing.py:280:4: R0912: Too many branches (45/12) (too-many-branches)
src/rattlesnake/components/spectral_processing.py:280:4: R0915: Too many statements (159/50) (too-many-statements)
src/rattlesnake/components/spectral_processing.py:724:21: R1704: Redefining argument with the local name 'data' (redefined-argument-from-local)
src/rattlesnake/components/spectral_processing.py:733:0: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/spectral_processing.py:733:0: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
************* Module rattlesnake.components.state_space_virtual_hardware
src/rattlesnake/components/state_space_virtual_hardware.py:31:0: R0402: Use 'from scipy import signal' instead (consider-using-from-import)
src/rattlesnake/components/state_space_virtual_hardware.py:38:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
************* Module rattlesnake.components.streaming
src/rattlesnake/components/streaming.py:71:4: R0914: Too many local variables (17/15) (too-many-locals)
************* Module rattlesnake.components.time_environment
src/rattlesnake/components/time_environment.py:1:0: C0302: Too many lines in module (1074/1000) (too-many-lines)
src/rattlesnake/components/time_environment.py:61:4: R0913: Too many arguments (7/5) (too-many-arguments)
src/rattlesnake/components/time_environment.py:61:4: R0917: Too many positional arguments (7/5) (too-many-positional-arguments)
src/rattlesnake/components/time_environment.py:58:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/time_environment.py:183:0: R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
src/rattlesnake/components/time_environment.py:193:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/time_environment.py:193:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/time_environment.py:598:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/time_environment.py:733:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/time_environment.py:1025:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/time_environment.py:1025:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.transient_sys_id_environment
src/rattlesnake/components/transient_sys_id_environment.py:2106:0: C0301: Line too long (101/100) (line-too-long)
src/rattlesnake/components/transient_sys_id_environment.py:1:0: C0302: Too many lines in module (2437/1000) (too-many-lines)
src/rattlesnake/components/transient_sys_id_environment.py:89:0: R0902: Too many instance attributes (13/7) (too-many-instance-attributes)
src/rattlesnake/components/transient_sys_id_environment.py:92:4: R0913: Too many arguments (8/5) (too-many-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:92:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:89:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/transient_sys_id_environment.py:157:0: R0902: Too many instance attributes (16/7) (too-many-instance-attributes)
src/rattlesnake/components/transient_sys_id_environment.py:160:4: R0913: Too many arguments (13/5) (too-many-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:160:4: R0917: Too many positional arguments (13/5) (too-many-positional-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:338:0: R0902: Too many instance attributes (21/7) (too-many-instance-attributes)
src/rattlesnake/components/transient_sys_id_environment.py:341:4: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:341:4: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:546:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/transient_sys_id_environment.py:560:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/transient_sys_id_environment.py:710:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/transient_sys_id_environment.py:809:20: R1729: Use a generator instead 'all(method in function[1].__dict__ and not (hasattr(function[1].__dict__[method], '__isabstractmethod__') and function[1].__dict__[method].__isabstractmethod__) for method in ['system_id_update', 'control'])' (use-a-generator)
src/rattlesnake/components/transient_sys_id_environment.py:1153:4: R0914: Too many local variables (16/15) (too-many-locals)
src/rattlesnake/components/transient_sys_id_environment.py:1153:4: R0915: Too many statements (64/50) (too-many-statements)
src/rattlesnake/components/transient_sys_id_environment.py:1385:4: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/transient_sys_id_environment.py:1398:20: R1731: Consider using 'max_y = max(max_y, np.max(y))' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/transient_sys_id_environment.py:1400:20: R1730: Consider using 'min_y = min(min_y, np.min(y))' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/transient_sys_id_environment.py:1385:4: R0912: Too many branches (40/12) (too-many-branches)
src/rattlesnake/components/transient_sys_id_environment.py:1385:4: R0915: Too many statements (103/50) (too-many-statements)
src/rattlesnake/components/transient_sys_id_environment.py:1559:4: R0912: Too many branches (15/12) (too-many-branches)
src/rattlesnake/components/transient_sys_id_environment.py:1559:4: R0915: Too many statements (58/50) (too-many-statements)
src/rattlesnake/components/transient_sys_id_environment.py:338:0: R0904: Too many public methods (46/20) (too-many-public-methods)
src/rattlesnake/components/transient_sys_id_environment.py:1762:0: R0902: Too many instance attributes (29/7) (too-many-instance-attributes)
src/rattlesnake/components/transient_sys_id_environment.py:2109:4: R0912: Too many branches (14/12) (too-many-branches)
src/rattlesnake/components/transient_sys_id_environment.py:2109:4: R0915: Too many statements (58/50) (too-many-statements)
src/rattlesnake/components/transient_sys_id_environment.py:2317:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/transient_sys_id_environment.py:2317:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
************* Module rattlesnake.components.ui_utilities
src/rattlesnake/components/ui_utilities.py:1:0: C0302: Too many lines in module (2318/1000) (too-many-lines)
src/rattlesnake/components/ui_utilities.py:1749:9: W0511: TODO Need to get the values from the bars before deleting them so we (fixme)
src/rattlesnake/components/ui_utilities.py:58:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/ui_utilities.py:208:0: R0913: Too many arguments (9/5) (too-many-arguments)
src/rattlesnake/components/ui_utilities.py:208:0: R0917: Too many positional arguments (9/5) (too-many-positional-arguments)
src/rattlesnake/components/ui_utilities.py:249:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/ui_utilities.py:273:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/ui_utilities.py:480:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/ui_utilities.py:512:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/ui_utilities.py:539:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/ui_utilities.py:609:4: R0913: Too many arguments (11/5) (too-many-arguments)
src/rattlesnake/components/ui_utilities.py:609:4: R0917: Too many positional arguments (11/5) (too-many-positional-arguments)
src/rattlesnake/components/ui_utilities.py:723:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/ui_utilities.py:751:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/ui_utilities.py:751:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/ui_utilities.py:823:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/ui_utilities.py:823:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/ui_utilities.py:1022:4: R0912: Too many branches (14/12) (too-many-branches)
src/rattlesnake/components/ui_utilities.py:1187:4: R0912: Too many branches (14/12) (too-many-branches)
src/rattlesnake/components/ui_utilities.py:1328:0: R0902: Too many instance attributes (20/7) (too-many-instance-attributes)
src/rattlesnake/components/ui_utilities.py:1480:19: R1729: Use a generator instead 'any(val is None for val in self.reciprocal_responses)' (use-a-generator)
src/rattlesnake/components/ui_utilities.py:1438:4: R0912: Too many branches (26/12) (too-many-branches)
src/rattlesnake/components/ui_utilities.py:1438:4: R0915: Too many statements (81/50) (too-many-statements)
src/rattlesnake/components/ui_utilities.py:1575:13: R1714: Consider merging these comparisons with 'in' by using 'current_index in (4, 6)'. Use a set instead if elements are hashable. (consider-using-in)
src/rattlesnake/components/ui_utilities.py:1554:4: R0912: Too many branches (24/12) (too-many-branches)
src/rattlesnake/components/ui_utilities.py:1554:4: R0915: Too many statements (64/50) (too-many-statements)
src/rattlesnake/components/ui_utilities.py:1653:0: R0902: Too many instance attributes (26/7) (too-many-instance-attributes)
src/rattlesnake/components/ui_utilities.py:1747:4: R0914: Too many local variables (19/15) (too-many-locals)
src/rattlesnake/components/ui_utilities.py:1747:4: R0915: Too many statements (58/50) (too-many-statements)
src/rattlesnake/components/ui_utilities.py:1940:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/ui_utilities.py:2209:19: W0718: Catching too general exception Exception (broad-exception-caught)
src/rattlesnake/components/ui_utilities.py:2308:12: W0612: Unused variable 'reply' (unused-variable)
************* Module rattlesnake.components.user_interface
src/rattlesnake/components/user_interface.py:1:0: C0302: Too many lines in module (1976/1000) (too-many-lines)
src/rattlesnake/components/user_interface.py:301:21: W0511: TODO: maybe uncomment this later (auto-load FRF matrix to system id (fixme)
src/rattlesnake/components/user_interface.py:1129:9: W0511: TODO: I don't think the check for equality does anything here.  Show isn't blocking, so (fixme)
src/rattlesnake/components/user_interface.py:1976:19: W0511: TODO Need to raise the window to the front, or close and reopen (fixme)
src/rattlesnake/components/user_interface.py:78:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/user_interface.py:110:8: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
src/rattlesnake/components/user_interface.py:94:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/user_interface.py:130:0: R0902: Too many instance attributes (23/7) (too-many-instance-attributes)
src/rattlesnake/components/user_interface.py:133:4: R0914: Too many local variables (32/15) (too-many-locals)
src/rattlesnake/components/user_interface.py:163:12: R1725: Consider using Python 3 style super() without arguments (super-with-arguments)
src/rattlesnake/components/user_interface.py:374:37: R1721: Unnecessary use of a comprehension, use list(self.command_map) instead. (unnecessary-comprehension)
src/rattlesnake/components/user_interface.py:379:37: R1721: Unnecessary use of a comprehension, use list(self.environment_uis[environment_name].command_map) instead. (unnecessary-comprehension)
src/rattlesnake/components/user_interface.py:133:4: R0912: Too many branches (29/12) (too-many-branches)
src/rattlesnake/components/user_interface.py:133:4: R0915: Too many statements (130/50) (too-many-statements)
src/rattlesnake/components/user_interface.py:551:4: R0914: Too many local variables (27/15) (too-many-locals)
src/rattlesnake/components/user_interface.py:596:13: R1714: Consider merging these comparisons with 'in' by using 'file_type in ('.csv', '.txt')'. Use a set instead if elements are hashable. (consider-using-in)
src/rattlesnake/components/user_interface.py:600:20: R1724: Unnecessary "elif" after "continue", remove the leading "el" from "elif" (no-else-continue)
src/rattlesnake/components/user_interface.py:551:4: R0912: Too many branches (20/12) (too-many-branches)
src/rattlesnake/components/user_interface.py:717:13: R1714: Consider merging these comparisons with 'in' by using 'file_type in ('.csv', '.txt')'. Use a set instead if elements are hashable. (consider-using-in)
src/rattlesnake/components/user_interface.py:720:4: R0914: Too many local variables (16/15) (too-many-locals)
src/rattlesnake/components/user_interface.py:720:4: R0912: Too many branches (33/12) (too-many-branches)
src/rattlesnake/components/user_interface.py:720:4: R0915: Too many statements (80/50) (too-many-statements)
src/rattlesnake/components/user_interface.py:971:16: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/user_interface.py:992:16: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/user_interface.py:1014:16: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/user_interface.py:1036:16: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/user_interface.py:1056:16: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/user_interface.py:1077:16: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/user_interface.py:940:4: R0912: Too many branches (27/12) (too-many-branches)
src/rattlesnake/components/user_interface.py:940:4: R0915: Too many statements (124/50) (too-many-statements)
src/rattlesnake/components/user_interface.py:1205:4: R0914: Too many local variables (19/15) (too-many-locals)
src/rattlesnake/components/user_interface.py:1584:4: R0913: Too many arguments (6/5) (too-many-arguments)
src/rattlesnake/components/user_interface.py:1584:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/rattlesnake/components/user_interface.py:1681:25: R1721: Unnecessary use of a comprehension, use list(self.command_map) instead. (unnecessary-comprehension)
src/rattlesnake/components/user_interface.py:1684:25: R1721: Unnecessary use of a comprehension, use list(self.environment_uis[environment_name].command_map) instead. (unnecessary-comprehension)
src/rattlesnake/components/user_interface.py:1708:12: R1731: Consider using 'max_time = max(max_time, time_val)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/user_interface.py:1731:23: R1721: Unnecessary use of a comprehension, use list(enumerate(['Global'] + self.environments)) instead. (unnecessary-comprehension)
src/rattlesnake/components/user_interface.py:1804:8: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
src/rattlesnake/components/user_interface.py:1791:4: R0912: Too many branches (17/12) (too-many-branches)
src/rattlesnake/components/user_interface.py:1914:15: R1729: Use a generator instead 'all(flag for (environment, flag) in self.complete_system_ids.items())' (use-a-generator)
src/rattlesnake/components/user_interface.py:1845:4: R0912: Too many branches (19/12) (too-many-branches)
src/rattlesnake/components/user_interface.py:130:0: R0904: Too many public methods (43/20) (too-many-public-methods)
************* Module rattlesnake.components.utilities
src/rattlesnake/components/utilities.py:1:0: C0302: Too many lines in module (1264/1000) (too-many-lines)
src/rattlesnake/components/utilities.py:84:4: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
src/rattlesnake/components/utilities.py:95:0: R0902: Too many instance attributes (22/7) (too-many-instance-attributes)
src/rattlesnake/components/utilities.py:98:4: R0913: Too many arguments (23/5) (too-many-arguments)
src/rattlesnake/components/utilities.py:98:4: R0917: Too many positional arguments (23/5) (too-many-positional-arguments)
src/rattlesnake/components/utilities.py:98:4: R0914: Too many local variables (23/15) (too-many-locals)
src/rattlesnake/components/utilities.py:197:4: R0914: Too many local variables (25/15) (too-many-locals)
src/rattlesnake/components/utilities.py:95:0: R0903: Too few public methods (1/2) (too-few-public-methods)
src/rattlesnake/components/utilities.py:264:0: R0902: Too many instance attributes (10/7) (too-many-instance-attributes)
src/rattlesnake/components/utilities.py:267:4: R0913: Too many arguments (10/5) (too-many-arguments)
src/rattlesnake/components/utilities.py:267:4: R0917: Too many positional arguments (10/5) (too-many-positional-arguments)
src/rattlesnake/components/utilities.py:484:0: R0902: Too many instance attributes (11/7) (too-many-instance-attributes)
src/rattlesnake/components/utilities.py:487:4: R0913: Too many arguments (12/5) (too-many-arguments)
src/rattlesnake/components/utilities.py:487:4: R0917: Too many positional arguments (12/5) (too-many-positional-arguments)
src/rattlesnake/components/utilities.py:484:0: R0903: Too few public methods (0/2) (too-few-public-methods)
src/rattlesnake/components/utilities.py:653:0: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/utilities.py:747:30: R1719: The if expression can be replaced with 'not test' (simplifiable-if-expression)
src/rattlesnake/components/utilities.py:752:44: R1719: The if expression can be replaced with 'not test' (simplifiable-if-expression)
src/rattlesnake/components/utilities.py:983:0: R0914: Too many local variables (17/15) (too-many-locals)
src/rattlesnake/components/utilities.py:1160:21: R1728: Consider using a generator instead 'tuple(slice(-self.buffer_data.shape[self.buffer_axis], None) if i == self.buffer_axis else slice(None) for i in range(self.buffer_data.ndim))' (consider-using-generator)
src/rattlesnake/components/utilities.py:1173:25: R1728: Consider using a generator instead 'tuple(slice(new_data_size, None) if i == self.buffer_axis else slice(None) for i in range(self.buffer_data.ndim))' (consider-using-generator)
src/rattlesnake/components/utilities.py:1199:21: R1728: Consider using a generator instead 'tuple(slice(data_start, None if data_end == 0 else data_end) if i == self.buffer_axis else slice(None) for i in range(self.buffer_data.ndim))' (consider-using-generator)
src/rattlesnake/components/utilities.py:1223:8: R1731: Consider using 'self._buffer_position = max(self._buffer_position, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/utilities.py:1225:8: R1730: Consider using 'self._buffer_position = min(self._buffer_position, self.buffer_data.shape[self.buffer_axis])' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/utilities.py:1231:8: R1731: Consider using 'self._buffer_position = max(self._buffer_position, 0)' instead of unnecessary if block (consider-using-max-builtin)
src/rattlesnake/components/utilities.py:1233:8: R1730: Consider using 'self._buffer_position = min(self._buffer_position, self.buffer_data.shape[self.buffer_axis])' instead of unnecessary if block (consider-using-min-builtin)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1807:1911]
==rattlesnake.components.transient_sys_id_environment:[1154:1260]
            filename, _ = QtWidgets.QFileDialog.getSaveFileName(
                self.definition_widget,
                "Select File to Save Spectral Data",
                filter="NetCDF File (*.nc4)",
            )
        if filename == "":
            return
        labels = [
            ["node_number", str],
            ["node_direction", str],
            ["comment", str],
            ["serial_number", str],
            ["triax_dof", str],
            ["sensitivity", str],
            ["unit", str],
            ["make", str],
            ["model", str],
            ["expiration", str],
            ["physical_device", str],
            ["physical_channel", str],
            ["channel_type", str],
            ["minimum_value", str],
            ["maximum_value", str],
            ["coupling", str],
            ["excitation_source", str],
            ["excitation", str],
            ["feedback_device", str],
            ["feedback_channel", str],
            ["warning_level", str],
            ["abort_level", str],
        ]
        global_data_parameters: DataAcquisitionParameters
        global_data_parameters = self.data_acquisition_parameters
        netcdf_handle = nc4.Dataset(  # pylint: disable=no-member
            filename, "w", format="NETCDF4", clobber=True
        )
        # Create dimensions
        netcdf_handle.createDimension("response_channels", len(global_data_parameters.channel_list))
        netcdf_handle.createDimension(
            "output_channels",
            len(
                [
                    channel
                    for channel in global_data_parameters.channel_list
                    if channel.feedback_device is not None
                ]
            ),
        )
        netcdf_handle.createDimension("time_samples", None)
        netcdf_handle.createDimension(
            "num_environments", len(global_data_parameters.environment_names)
        )
        # Create attributes
        netcdf_handle.file_version = "3.0.0"
        netcdf_handle.sample_rate = global_data_parameters.sample_rate
        netcdf_handle.time_per_write = (
            global_data_parameters.samples_per_write / global_data_parameters.output_sample_rate
        )
        netcdf_handle.time_per_read = (
            global_data_parameters.samples_per_read / global_data_parameters.sample_rate
        )
        netcdf_handle.hardware = global_data_parameters.hardware
        netcdf_handle.hardware_file = (
            "None"
            if global_data_parameters.hardware_file is None
            else global_data_parameters.hardware_file
        )
        netcdf_handle.output_oversample = global_data_parameters.output_oversample
        for key, value in global_data_parameters.extra_parameters.items():
            setattr(netcdf_handle, key, value)
        # Create Variables
        var = netcdf_handle.createVariable("environment_names", str, ("num_environments",))
        this_environment_index = None
        for i, name in enumerate(global_data_parameters.environment_names):
            var[i] = name
            if name == self.environment_name:
                this_environment_index = i
        var = netcdf_handle.createVariable(
            "environment_active_channels",
            "i1",
            ("response_channels", "num_environments"),
        )
        var[...] = global_data_parameters.environment_active_channels.astype("int8")[
            global_data_parameters.environment_active_channels[:, this_environment_index],
            :,
        ]
        # Create channel table variables
        for label, netcdf_datatype in labels:
            var = netcdf_handle.createVariable(
                "/channels/" + label, netcdf_datatype, ("response_channels",)
            )
            channel_data = [
                getattr(channel, label) for channel in global_data_parameters.channel_list
            ]
            if netcdf_datatype == "i1":
                channel_data = np.array([1 if val else 0 for val in channel_data])
            else:
                channel_data = ["" if val is None else val for val in channel_data]
            for i, cd in enumerate(channel_data):
                var[i] = cd
        group_handle = netcdf_handle.createGroup(self.environment_name)
        self.environment_parameters.store_to_netcdf(group_handle)
        # Create Variables for Spectral Data
        group_handle.createDimension("drive_channels", self.last_transfer_function.shape[2]) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1911:1971]
==rattlesnake.components.transient_sys_id_environment:[1263:1323]
        var = group_handle.createVariable(
            "frf_data_real",
            "f8",
            ("fft_lines", "specification_channels", "drive_channels"),
        )
        var[...] = self.last_transfer_function.real
        var = group_handle.createVariable(
            "frf_data_imag",
            "f8",
            ("fft_lines", "specification_channels", "drive_channels"),
        )
        var[...] = self.last_transfer_function.imag
        var = group_handle.createVariable(
            "frf_coherence", "f8", ("fft_lines", "specification_channels")
        )
        var[...] = self.last_coherence.real
        var = group_handle.createVariable(
            "response_cpsd_real",
            "f8",
            ("fft_lines", "specification_channels", "specification_channels"),
        )
        var[...] = self.last_response_cpsd.real
        var = group_handle.createVariable(
            "response_cpsd_imag",
            "f8",
            ("fft_lines", "specification_channels", "specification_channels"),
        )
        var[...] = self.last_response_cpsd.imag
        var = group_handle.createVariable(
            "drive_cpsd_real", "f8", ("fft_lines", "drive_channels", "drive_channels")
        )
        var[...] = self.last_reference_cpsd.real
        var = group_handle.createVariable(
            "drive_cpsd_imag", "f8", ("fft_lines", "drive_channels", "drive_channels")
        )
        var[...] = self.last_reference_cpsd.imag
        var = group_handle.createVariable(
            "response_noise_cpsd_real",
            "f8",
            ("fft_lines", "specification_channels", "specification_channels"),
        )
        var[...] = self.last_response_noise.real
        var = group_handle.createVariable(
            "response_noise_cpsd_imag",
            "f8",
            ("fft_lines", "specification_channels", "specification_channels"),
        )
        var[...] = self.last_response_noise.imag
        var = group_handle.createVariable(
            "drive_noise_cpsd_real",
            "f8",
            ("fft_lines", "drive_channels", "drive_channels"),
        )
        var[...] = self.last_reference_noise.real
        var = group_handle.createVariable(
            "drive_noise_cpsd_imag",
            "f8",
            ("fft_lines", "drive_channels", "drive_channels"),
        )
        var[...] = self.last_reference_noise.imag (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[3850:3912]
==rattlesnake.components.transient_sys_id_environment:[2358:2420]
            environment_name,
            input_queue,
            gui_update_queue,
            controller_communication_queue,
            data_in_queue,
            data_out_queue,
            log_file_queue,
        )

        spectral_proc = mp.Process(
            target=spectral_processing_process,
            args=(
                environment_name,
                queue_container.spectral_command_queue,
                queue_container.data_for_spectral_computation_queue,
                queue_container.updated_spectral_quantities_queue,
                queue_container.environment_command_queue,
                queue_container.gui_update_queue,
                queue_container.log_file_queue,
            ),
        )
        spectral_proc.start()
        analysis_proc = mp.Process(
            target=sysid_data_analysis_process,
            args=(
                environment_name,
                queue_container.data_analysis_command_queue,
                queue_container.updated_spectral_quantities_queue,
                queue_container.time_history_to_generate_queue,
                queue_container.environment_command_queue,
                queue_container.gui_update_queue,
                queue_container.log_file_queue,
            ),
        )
        analysis_proc.start()
        siggen_proc = mp.Process(
            target=signal_generation_process,
            args=(
                environment_name,
                queue_container.signal_generation_command_queue,
                queue_container.time_history_to_generate_queue,
                queue_container.data_out_queue,
                queue_container.environment_command_queue,
                queue_container.log_file_queue,
                queue_container.gui_update_queue,
            ),
        )
        siggen_proc.start()
        collection_proc = mp.Process(
            target=data_collector_process,
            args=(
                environment_name,
                queue_container.collector_command_queue,
                queue_container.data_in_queue,
                [queue_container.data_for_spectral_computation_queue],
                queue_container.environment_command_queue,
                queue_container.log_file_queue,
                queue_container.gui_update_queue,
            ),
        )
        collection_proc.start()
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[1370:1425]
==rattlesnake.components.transient_sys_id_environment:[713:769]
        if dialog:
            (response_transformation, output_transformation, result) = (
                TransformationMatrixWindow.define_transformation_matrices(
                    self.response_transformation_matrix,
                    self.definition_widget.control_channels_display.value(),
                    self.output_transformation_matrix,
                    self.definition_widget.output_channels_display.value(),
                    self.definition_widget,
                )
            )
        else:
            response_transformation = self.response_transformation_matrix
            output_transformation = self.output_transformation_matrix
            result = True
        if result:
            # Update the control names
            for widget in self.control_selector_widgets:
                widget.blockSignals(True)
                widget.clear()
            if response_transformation is None:
                for i, control_name in enumerate(self.physical_control_names):
                    for widget in self.control_selector_widgets:
                        widget.addItem(f"{i + 1}: {control_name}")
                self.definition_widget.transform_channels_display.setValue(
                    len(self.physical_control_names)
                )
            else:
                for i in range(response_transformation.shape[0]):
                    for widget in self.control_selector_widgets:
                        widget.addItem(f"{i + 1}: Virtual Response")
                self.definition_widget.transform_channels_display.setValue(
                    response_transformation.shape[0]
                )
            for widget in self.control_selector_widgets:
                widget.blockSignals(False)
            # Update the output names
            for widget in self.output_selector_widgets:
                widget.blockSignals(True)
                widget.clear()
            if output_transformation is None:
                for i, drive_name in enumerate(self.physical_output_names):
                    for widget in self.output_selector_widgets:
                        widget.addItem(f"{i + 1}: {drive_name}")
                self.definition_widget.transform_outputs_display.setValue(
                    len(self.physical_output_names)
                )
            else:
                for i in range(output_transformation.shape[0]):
                    for widget in self.output_selector_widgets:
                        widget.addItem(f"{i + 1}: Virtual Drive")
                self.definition_widget.transform_outputs_display.setValue(
                    output_transformation.shape[0]
                )
            for widget in self.output_selector_widgets:
                widget.blockSignals(False)
            # Clear the signals (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[934:985]
==rattlesnake.components.transient_sys_id_environment:[804:854]
            )
            or inspect.isgeneratorfunction(function[1])
            or (
                inspect.isclass(function[1])
                and all(
                    [
                        (
                            method in function[1].__dict__
                            and not (
                                hasattr(function[1].__dict__[method], "__isabstractmethod__")
                                and function[1].__dict__[method].__isabstractmethod__
                            )
                        )
                        for method in ["system_id_update", "control"]
                    ]
                )
            )
        ]
        self.log(
            f"Loaded module {self.python_control_module.__name__} with "
            f"functions {[function[0] for function in functions]}"
        )
        self.definition_widget.control_function_input.clear()
        self.definition_widget.control_script_file_path_input.setText(filename)
        for function in functions:
            self.definition_widget.control_function_input.addItem(function[0])

    def update_generator_selector(self):
        """Updates the function/generator selector based on the function selected"""
        if self.python_control_module is None:
            return
        try:
            function = getattr(
                self.python_control_module,
                self.definition_widget.control_function_input.itemText(
                    self.definition_widget.control_function_input.currentIndex()
                ),
            )
        except AttributeError:
            return
        if inspect.isgeneratorfunction(function):
            self.definition_widget.control_function_generator_selector.setCurrentIndex(1)
        elif inspect.isclass(function) and issubclass(function, AbstractControlLawComputation):
            self.definition_widget.control_function_generator_selector.setCurrentIndex(3)
        elif inspect.isclass(function):
            self.definition_widget.control_function_generator_selector.setCurrentIndex(2)
        else:
            self.definition_widget.control_function_generator_selector.setCurrentIndex(0)

    def initialize_environment(self): (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.ui_utilities:[303:342]
==rattlesnake.components.user_interface:[661:699]
            worksheet.cell(row=1, column=2, value="Test Article Definition")
            worksheet.merge_cells(start_row=1, start_column=2, end_row=1, end_column=4)
            worksheet.cell(row=1, column=5, value="Instrument Definition")
            worksheet.merge_cells(start_row=1, start_column=5, end_row=1, end_column=11)
            worksheet.cell(row=1, column=12, value="Channel Definition")
            worksheet.merge_cells(start_row=1, start_column=12, end_row=1, end_column=19)
            worksheet.cell(row=1, column=20, value="Output Feedback")
            worksheet.merge_cells(start_row=1, start_column=20, end_row=1, end_column=21)
            worksheet.cell(row=1, column=22, value="Limits")
            worksheet.merge_cells(start_row=1, start_column=22, end_row=1, end_column=23)
            for col_idx, val in enumerate(
                [
                    "Channel Index",
                    "Node Number",
                    "Node Direction",
                    "Comment",
                    "Serial Number",
                    "Triax DoF",
                    "Sensitivity  (mV/EU)",
                    "Engineering Unit",
                    "Make",
                    "Model",
                    "Calibration Exp Date",
                    "Physical Device",
                    "Physical Channel",
                    "Type",
                    "Minimum Value (V)",
                    "Maximum Value (V)",
                    "Coupling",
                    "Current Excitation Source",
                    "Current Excitation Value",
                    "Physical Device",
                    "Physical Channel",
                    "Warning Level (EU)",
                    "Abort Level (EU)",
                ]
            ):
                worksheet.cell(row=2, column=1 + col_idx, value=val) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sdynpy_frf_virtual_hardware:[50:86]
==rattlesnake.components.sdynpy_system_virtual_hardware:[33:68]
_direction_map = {
    "X+": 1,
    "X": 1,
    "+X": 1,
    "Y+": 2,
    "Y": 2,
    "+Y": 2,
    "Z+": 3,
    "Z": 3,
    "+Z": 3,
    "RX+": 4,
    "RX": 4,
    "+RX": 4,
    "RY+": 5,
    "RY": 5,
    "+RY": 5,
    "RZ+": 6,
    "RZ": 6,
    "+RZ": 6,
    "X-": -1,
    "-X": -1,
    "Y-": -2,
    "-Y": -2,
    "Z-": -3,
    "-Z": -3,
    "RX-": -4,
    "-RX": -4,
    "RY-": -5,
    "-RY": -5,
    "RZ-": -6,
    "-RZ": -6,
    "": 0,
    None: 0,
}

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[395:431]
==rattlesnake.components.transient_sys_id_environment:[275:337]
        var = netcdf_group_handle.createVariable(
            "control_channel_indices", "i4", ("control_channels")
        )
        var[...] = self.control_channel_indices
        # Transformation matrices
        if self.response_transformation_matrix is not None:
            netcdf_group_handle.createDimension(
                "response_transformation_rows",
                self.response_transformation_matrix.shape[0],
            )
            netcdf_group_handle.createDimension(
                "response_transformation_cols",
                self.response_transformation_matrix.shape[1],
            )
            var = netcdf_group_handle.createVariable(
                "response_transformation_matrix",
                "f8",
                ("response_transformation_rows", "response_transformation_cols"),
            )
            var[...] = self.response_transformation_matrix
        if self.reference_transformation_matrix is not None:
            netcdf_group_handle.createDimension(
                "reference_transformation_rows",
                self.reference_transformation_matrix.shape[0],
            )
            netcdf_group_handle.createDimension(
                "reference_transformation_cols",
                self.reference_transformation_matrix.shape[1],
            )
            var = netcdf_group_handle.createVariable(
                "reference_transformation_matrix",
                "f8",
                ("reference_transformation_rows", "reference_transformation_cols"),
            )
            var[...] = self.reference_transformation_matrix
        # Specification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.report_pylint:[188:220]
==rattlesnake.cicd.report_pytest:[121:153]
    <style>
        body {{
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            margin: 0; padding: 20px; background: #f6f8fa; line-height: 1.6;
            background: lightgray;
        }}
        .container {{
            max-width: 1200px; margin: 0 auto;
        }}
        .header {{
            background: white; padding: 30px; border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px;
        }}
        .score {{
            font-size: 2.5em; font-weight: bold; color: {score_color};
        }}
        .metadata {{
            color: #6a737d; font-size: 0.9em; margin-top: 10px;
        }}
        .nav {{
            background: white; padding: 20px; border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1); margin-bottom: 20px;
        }}
        .nav a {{
            background: #0366d6; color: white; padding: 10px 20px;
            text-decoration: none; border-radius: 6px; margin-right: 10px;
            display: inline-block; margin-bottom: 5px;
        }}
        .nav a:hover {{
            background: #0256cc;
        }}
        .section {{ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_utilities:[27:59]
==rattlesnake.components.sdynpy_frf_virtual_hardware:[50:82]
_direction_map = {
    "X+": 1,
    "X": 1,
    "+X": 1,
    "Y+": 2,
    "Y": 2,
    "+Y": 2,
    "Z+": 3,
    "Z": 3,
    "+Z": 3,
    "RX+": 4,
    "RX": 4,
    "+RX": 4,
    "RY+": 5,
    "RY": 5,
    "+RY": 5,
    "RZ+": 6,
    "RZ": 6,
    "+RZ": 6,
    "X-": -1,
    "-X": -1,
    "Y-": -2,
    "-Y": -2,
    "Z-": -3,
    "-Z": -3,
    "RX-": -4,
    "-RX": -4,
    "RY-": -5,
    "-RY": -5,
    "RZ-": -6,
    "-RZ": -6,
    "": 0, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[376:407]
==rattlesnake.components.sine_sys_id_environment:[400:431]
        if self.response_transformation_matrix is not None:
            netcdf_group_handle.createDimension(
                "response_transformation_rows",
                self.response_transformation_matrix.shape[0],
            )
            netcdf_group_handle.createDimension(
                "response_transformation_cols",
                self.response_transformation_matrix.shape[1],
            )
            var = netcdf_group_handle.createVariable(
                "response_transformation_matrix",
                "f8",
                ("response_transformation_rows", "response_transformation_cols"),
            )
            var[...] = self.response_transformation_matrix
        if self.reference_transformation_matrix is not None:
            netcdf_group_handle.createDimension(
                "reference_transformation_rows",
                self.reference_transformation_matrix.shape[0],
            )
            netcdf_group_handle.createDimension(
                "reference_transformation_cols",
                self.reference_transformation_matrix.shape[1],
            )
            var = netcdf_group_handle.createVariable(
                "reference_transformation_matrix",
                "f8",
                ("reference_transformation_rows", "reference_transformation_cols"),
            )
            var[...] = self.reference_transformation_matrix
        # Control channels (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1376:1405]
==rattlesnake.components.streaming:[145:174]
        labels = [
            ["node_number", str],
            ["node_direction", str],
            ["comment", str],
            ["serial_number", str],
            ["triax_dof", str],
            ["sensitivity", str],
            ["unit", str],
            ["make", str],
            ["model", str],
            ["expiration", str],
            ["physical_device", str],
            ["physical_channel", str],
            ["channel_type", str],
            ["minimum_value", str],
            ["maximum_value", str],
            ["coupling", str],
            ["excitation_source", str],
            ["excitation", str],
            ["feedback_device", str],
            ["feedback_channel", str],
            ["warning_level", str],
            ["abort_level", str],
        ]
        for label, netcdf_datatype in labels:
            var = self.netcdf_handle.createVariable(
                "/channels/" + label, netcdf_datatype, ("response_channels",)
            )
            channel_data = [ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1938:1992]
==rattlesnake.components.time_environment:[637:691]
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Disable Widget {data}: not found in UI")
            widget.setEnabled(False)
        else:
            widget = None
            for parent in [self.definition_widget, self.run_widget]:
                try:
                    widget = getattr(parent, message)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Update Widget {message}: not found in UI")
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    @staticmethod
    def create_environment_template(
        environment_name: str, workbook: openpyxl.workbook.workbook.Workbook
    ):
        """Creates a template worksheet in an Excel workbook defining the
        environment.

        This function creates a template worksheet in an Excel workbook that
        when filled out could be read by the controller to re-create the
        environment.

        This function is the "write" counterpart to the
        ``set_parameters_from_template`` function in the ``ModalUI`` class,
        which reads the values from the template file to populate the user
        interface.

        Parameters
        ----------
        environment_name : str :
            The name of the environment that will specify the worksheet's name
        workbook : openpyxl.workbook.workbook.Workbook :
            A reference to an ``openpyxl`` workbook.

        """
        worksheet = workbook.create_sheet(environment_name)
        worksheet.cell(1, 1, "Control Type") (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1125:1154]
==rattlesnake.components.sine_sys_id_environment:[1370:1399]
        if dialog:
            (response_transformation, output_transformation, result) = (
                TransformationMatrixWindow.define_transformation_matrices(
                    self.response_transformation_matrix,
                    self.definition_widget.control_channels_display.value(),
                    self.output_transformation_matrix,
                    self.definition_widget.output_channels_display.value(),
                    self.definition_widget,
                )
            )
        else:
            response_transformation = self.response_transformation_matrix
            output_transformation = self.output_transformation_matrix
            result = True
        if result:
            # Update the control names
            for widget in self.control_selector_widgets:
                widget.blockSignals(True)
                widget.clear()
            if response_transformation is None:
                for i, control_name in enumerate(self.physical_control_names):
                    for widget in self.control_selector_widgets:
                        widget.addItem(f"{i + 1}: {control_name}")
                self.definition_widget.transform_channels_display.setValue(
                    len(self.physical_control_names)
                )
            else:
                for i in range(response_transformation.shape[0]):
                    for widget in self.control_selector_widgets: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1285:1309]
==rattlesnake.components.modal_environment:[1376:1400]
        labels = [
            ["node_number", str],
            ["node_direction", str],
            ["comment", str],
            ["serial_number", str],
            ["triax_dof", str],
            ["sensitivity", str],
            ["unit", str],
            ["make", str],
            ["model", str],
            ["expiration", str],
            ["physical_device", str],
            ["physical_channel", str],
            ["channel_type", str],
            ["minimum_value", str],
            ["maximum_value", str],
            ["coupling", str],
            ["excitation_source", str],
            ["excitation", str],
            ["feedback_device", str],
            ["feedback_channel", str],
            ["warning_level", str],
            ["abort_level", str],
        ] (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1814:1838]
==rattlesnake.components.streaming:[145:169]
        labels = [
            ["node_number", str],
            ["node_direction", str],
            ["comment", str],
            ["serial_number", str],
            ["triax_dof", str],
            ["sensitivity", str],
            ["unit", str],
            ["make", str],
            ["model", str],
            ["expiration", str],
            ["physical_device", str],
            ["physical_channel", str],
            ["channel_type", str],
            ["minimum_value", str],
            ["maximum_value", str],
            ["coupling", str],
            ["excitation_source", str],
            ["excitation", str],
            ["feedback_device", str],
            ["feedback_channel", str],
            ["warning_level", str],
            ["abort_level", str],
        ] (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[806:859]
==rattlesnake.components.transient_sys_id_environment:[524:569]
        return [self.physical_channel_names[i] for i in self.physical_output_indices]

    # %% Environment

    @property
    def physical_control_indices(self):
        """Indices of the control channels"""
        return [
            i
            for i in range(self.definition_widget.control_channels_selector.count())
            if self.definition_widget.control_channels_selector.item(i).checkState() == Qt.Checked
        ]

    @property
    def physical_control_names(self):
        """Names of the selected control channels"""
        return [self.physical_channel_names[i] for i in self.physical_control_indices]

    @property
    def initialized_control_names(self):
        """Names of the control channels that have been initialized"""
        if self.environment_parameters.response_transformation_matrix is None:
            return [
                self.physical_channel_names[i]
                for i in self.environment_parameters.control_channel_indices
            ]
        else:
            return [
                f"Transformed Response {i + 1}"
                for i in range(self.environment_parameters.response_transformation_matrix.shape[0])
            ]

    @property
    def initialized_output_names(self):
        """Names of the drive channels that have been initialized"""
        if self.environment_parameters.reference_transformation_matrix is None:
            return self.physical_output_names
        else:
            return [
                f"Transformed Drive {i + 1}"
                for i in range(self.environment_parameters.reference_transformation_matrix.shape[0])
            ]

    def update_control_channels(self):
        """Callback called when control channels are updated in the UI""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2515:2538]
==rattlesnake.components.sine_sys_id_environment:[2175:2200]
            self.response_transformation_matrix = np.array(response_transformation)
        if (
            isinstance(worksheet.cell(output_transform_row, 2).value, str)
            and worksheet.cell(output_transform_row, 2).value.lower() == "none"
        ):
            self.output_transformation_matrix = None
        else:
            output_transformation = []
            i = 0
            while True:
                if worksheet.cell(output_transform_row + i, 2).value is None or (
                    isinstance(worksheet.cell(output_transform_row + i, 2).value, str)
                    and worksheet.cell(output_transform_row + i, 2).value.strip() == ""
                ):
                    break
                output_transformation.append([])
                for j in range(output_channels):
                    output_transformation[-1].append(
                        float(worksheet.cell(output_transform_row + i, 2 + j).value)
                    )
                i += 1
            self.output_transformation_matrix = np.array(output_transformation)
        self.define_transformation_matrices(None, dialog=False) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[3002:3025]
==rattlesnake.components.sine_sys_id_environment:[3850:3873]
            environment_name,
            input_queue,
            gui_update_queue,
            controller_communication_queue,
            data_in_queue,
            data_out_queue,
            log_file_queue,
        )

        spectral_proc = mp.Process(
            target=spectral_processing_process,
            args=(
                environment_name,
                queue_container.spectral_command_queue,
                queue_container.data_for_spectral_computation_queue,
                queue_container.updated_spectral_quantities_queue,
                queue_container.environment_command_queue,
                queue_container.gui_update_queue,
                queue_container.log_file_queue,
            ),
        )
        spectral_proc.start()
        analysis_proc = mp.Process( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1928:1953]
==rattlesnake.components.random_vibration_sys_id_environment:[2694:2719]
        kurtosis_buffer_length = self.environment_parameters.sysid_averages

        return CollectorMetadata(
            num_channels,
            response_channel_indices,
            reference_channel_indices,
            acquisition_type,
            acceptance,
            acceptance_function,
            overlap_fraction,
            trigger_channel_index,
            trigger_slope,
            trigger_level,
            trigger_hysteresis,
            trigger_hysteresis_samples,
            pretrigger_fraction,
            frame_size,
            window,
            kurtosis_buffer_length=kurtosis_buffer_length,
            response_transformation_matrix=self.environment_parameters.response_transformation_matrix,
            reference_transformation_matrix=self.environment_parameters.reference_transformation_matrix,
        )

    def get_sysid_spectral_processing_metadata(self, is_noise=False) -> SpectralProcessingMetadata:
        """Collects metadata to send to the spectral processing process""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2316:2342]
==rattlesnake.components.random_vibration_sys_id_environment:[2613:2637]
        self.queue_container.collector_command_queue.put(
            self.environment_name,
            (
                DataCollectorCommands.INITIALIZE_COLLECTOR,
                self.get_data_collector_metadata(),
            ),
        )
        # Set up the signal generation
        self.queue_container.signal_generation_command_queue.put(
            self.environment_name,
            (
                SignalGenerationCommands.INITIALIZE_PARAMETERS,
                self.get_signal_generation_metadata(),
            ),
        )
        # Set up the spectral processing
        self.queue_container.spectral_command_queue.put(
            self.environment_name,
            (
                SpectralProcessingCommands.INITIALIZE_PARAMETERS,
                self.get_spectral_processing_metadata(),
            ),
        )
        # Set up the data analysis (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2759:2781]
==rattlesnake.components.random_vibration_sys_id_environment:[3002:3024]
        environment_name,
        input_queue,
        gui_update_queue,
        controller_communication_queue,
        data_in_queue,
        data_out_queue,
        log_file_queue,
    )

    spectral_proc = mp.Process(
        target=spectral_processing_process,
        args=(
            environment_name,
            queue_container.spectral_command_queue,
            queue_container.data_for_spectral_computation_queue,
            queue_container.updated_spectral_quantities_queue,
            queue_container.environment_command_queue,
            queue_container.gui_update_queue,
            queue_container.log_file_queue,
        ),
    )
    spectral_proc.start() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1971:2033]
==rattlesnake.components.transient_sys_id_environment:[1331:1360]
        netcdf_handle.close()

    # %% Miscellaneous

    def retrieve_metadata(
        self,
        netcdf_handle: nc4._netCDF4.Dataset = None,  # pylint: disable=c-extension-no-member
        environment_name: str = None,
    ):
        """Collects environment parameters from a netCDF dataset.

        This function retrieves parameters from a netCDF dataset that was written
        by the controller during streaming.  It must populate the widgets
        in the user interface with the proper information.

        This function is the "read" counterpart to the store_to_netcdf
        function in the AbstractMetadata class, which will write parameters to
        the netCDF file to document the metadata.

        Note that the entire dataset is passed to this function, so the function
        should collect parameters pertaining to the environment from a Group
        in the dataset sharing the environment's name, e.g.

        ``group = netcdf_handle.groups[self.environment_name]``
        ``self.definition_widget.parameter_selector.setValue(group.parameter)``

        Parameters
        ----------
        netcdf_handle : nc4._netCDF4.Dataset
            The netCDF dataset from which the data will be read.  It should have
            a group name with the enviroment's name.
        environment_name : str (optional)
            name of environment from which to retrieve metadata. Only needed if
            different from current environment.

        """
        group = super().retrieve_metadata(netcdf_handle, environment_name)

        # Control channels
        try:
            for i in group.variables["control_channel_indices"][...]:
                item = self.definition_widget.control_channels_selector.item(i)
                item.setCheckState(Qt.Checked)
        except KeyError:
            print("no variable control_channel_indices, please select control channels manually")
        # Other data
        try:
            self.response_transformation_matrix = group.variables["response_transformation_matrix"][
                ...
            ].data
        except KeyError:
            self.response_transformation_matrix = None
        try:
            self.output_transformation_matrix = group.variables["reference_transformation_matrix"][
                ...
            ].data
        except KeyError:
            self.output_transformation_matrix = None
        self.define_transformation_matrices(None, dialog=False)

        # environment_name is passed when the saved environment doesn't match the
        # current environment (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[144:168]
==rattlesnake.components.transient_sys_id_environment:[130:156]
        self.environment_command_queue = environment_command_queue
        self.gui_update_queue = gui_update_queue
        self.data_analysis_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Data Analysis Command Queue"
        )
        self.signal_generation_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Signal Generation Command Queue"
        )
        self.spectral_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Spectral Computation Command Queue"
        )
        self.collector_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Data Collector Command Queue"
        )
        self.controller_communication_queue = controller_communication_queue
        self.data_in_queue = data_in_queue
        self.data_out_queue = data_out_queue
        self.data_for_spectral_computation_queue = mp.Queue()
        self.updated_spectral_quantities_queue = mp.Queue()
        self.time_history_to_generate_queue = mp.Queue()
        self.log_file_queue = log_file_queue


# %% Metadata

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2787:2809]
==rattlesnake.components.random_vibration_sys_id_environment:[3043:3064]
            queue_container.data_out_queue,
            queue_container.environment_command_queue,
            queue_container.log_file_queue,
            queue_container.gui_update_queue,
        ),
    )
    siggen_proc.start()
    collection_proc = mp.Process(
        target=data_collector_process,
        args=(
            environment_name,
            queue_container.collector_command_queue,
            queue_container.data_in_queue,
            [queue_container.data_for_spectral_computation_queue],
            queue_container.environment_command_queue,
            queue_container.log_file_queue,
            queue_container.gui_update_queue,
        ),
    )

    collection_proc.start() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.signal_generation_process:[291:321]
==rattlesnake.components.time_environment:[934:961]
        if self.test_level_change == 0.0:
            test_level = self.current_test_level
            self.log(f"Test Level at {test_level}")
        else:
            test_level = (
                self.current_test_level
                + (np.arange(write_data.shape[-1]) + 1) * self.test_level_change
            )
            # Compute distance in steps from the target
            # test_level and find where it is near the target
            full_level_index = np.nonzero(
                abs(test_level - self.test_level_target) / abs(self.test_level_change)
                < TEST_LEVEL_THRESHOLD
            )[0]
            # Check if any are
            if len(full_level_index) > 0:
                # If so, set all test_levels after that one to the target test_level
                test_level[full_level_index[0] + 1 :] = self.test_level_target
                # And update that our current test_level is now the target test_level
                self.current_test_level = self.test_level_target
                self.test_level_change = 0.0
            else:
                # Otherwise, our current test_level is the last entry in the test_level scaling
                self.current_test_level = test_level[-1]
            self.log(f"Test level from {test_level[0]} to {test_level[-1]}")
        # Write the test level-scaled data to the task
        self.log("Sending data to data_out queue")
        # self.write_index += 1
        # np.savez('signal_generation_output_data_check_{:}.npz'.format(self.write_index),
        #          write_data = write_data,test_level = test_level) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2723:2744]
==rattlesnake.components.sine_sys_id_utilities:[3157:3178]
                    amps = []
                    phss = []
                    for arg, freq, gen in zip(block_arguments, block_frequencies, generator):
                        amp, phs = gen.send((block, freq, arg))
                        amps.append(amp)
                        phss.append(phs)
                    reconstructed_amplitudes.append(np.array(amps))
                    reconstructed_phases.append(np.array(phss))
                    reconstructed_signals.append(
                        np.array(amps) * np.cos(block_arguments + np.array(phss))
                    )
                else:
                    vk_signals, vk_amplitudes, vk_phases = generator.send(
                        (block, block_arguments, last_data)
                    )
                    if vk_signals is not None:
                        reconstructed_signals.append(vk_signals)
                        reconstructed_amplitudes.append(vk_amplitudes)
                        reconstructed_phases.append(vk_phases)
                start_index += block_size
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[129:148]
==rattlesnake.components.sine_sys_id_environment:[144:163]
        self.environment_command_queue = environment_command_queue
        self.gui_update_queue = gui_update_queue
        self.data_analysis_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Data Analysis Command Queue"
        )
        self.signal_generation_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Signal Generation Command Queue"
        )
        self.spectral_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Spectral Computation Command Queue"
        )
        self.collector_command_queue = VerboseMessageQueue(
            log_file_queue, environment_name + " Data Collector Command Queue"
        )
        self.controller_communication_queue = controller_communication_queue
        self.data_in_queue = data_in_queue
        self.data_out_queue = data_out_queue
        self.data_for_spectral_computation_queue = mp.Queue()
        self.updated_spectral_quantities_queue = mp.Queue() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.signal_generation:[137:167]
==rattlesnake.components.utilities:[627:681]
    [U, S, Vh] = np.linalg.svd(cpsd_matrix, full_matrices=False)
    # svd_end = time()
    # print('SVD Time: {:0.4f}'.format(svd_end-svd_start))
    # Reform using the sqrt of the S matrix
    Lsvd = U * np.sqrt(S[:, np.newaxis, :]) @ Vh
    # Compute Random Process
    W = np.sqrt(0.5) * (
        np.random.randn(*cpsd_matrix.shape[:-1], 1)
        + 1j * np.random.randn(*cpsd_matrix.shape[:-1], 1)
    )
    Xv = 1 / np.sqrt(df) * Lsvd @ W
    # Ensure that the signal is real by setting the nyquist and DC component to 0
    Xv[[0, -1], :, :] = 0
    # Compute the IFFT, using the real version makes it so you don't need negative frequencies
    zero_padding = np.zeros(
        [(output_oversample - 1) * (Xv.shape[0] - 1)] + list(Xv.shape[1:]),
        dtype=Xv.dtype,
    )
    # ifft_start = time()
    xv = (
        np.fft.irfft(np.concatenate((Xv, zero_padding), axis=0) / np.sqrt(2), axis=0)
        * output_oversample
        * sample_rate
    )
    # ifft_end = time()
    # print('FFT Time: {:0.4f}'.format(ifft_end-ifft_start))
    output = xv[:, :, 0].T
    return output

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1155:1174]
==rattlesnake.components.sine_sys_id_environment:[1400:1419]
                self.definition_widget.transform_channels_display.setValue(
                    response_transformation.shape[0]
                )
            for widget in self.control_selector_widgets:
                widget.blockSignals(False)
            # Update the output names
            for widget in self.output_selector_widgets:
                widget.blockSignals(True)
                widget.clear()
            if output_transformation is None:
                for i, drive_name in enumerate(self.physical_output_names):
                    for widget in self.output_selector_widgets:
                        widget.addItem(f"{i + 1}: {drive_name}")
                self.definition_widget.transform_outputs_display.setValue(
                    len(self.physical_output_names)
                )
            else:
                for i in range(output_transformation.shape[0]):
                    for widget in self.output_selector_widgets: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1930:1946]
==rattlesnake.components.modal_environment:[2390:2406]
        return CollectorMetadata(
            num_channels,
            response_channel_indices,
            reference_channel_indices,
            acquisition_type,
            acceptance,
            acceptance_function,
            overlap_fraction,
            trigger_channel_index,
            trigger_slope,
            trigger_level,
            trigger_hysteresis,
            trigger_hysteresis_samples,
            pretrigger_fraction,
            frame_size,
            window, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[414:431]
==rattlesnake.components.data_physics_interface:[346:363]
        validated_range_array = []
        for rng in range_array:
            close_ranges = self._valid_input_ranges[np.isclose(self._valid_input_ranges, rng)]
            if len(close_ranges) == 0:
                raise ValueError(
                    f"Range {rng} is not valid.  Valid sample rates are "
                    f"{', '.join([f'{v:0.1f}' for v in self._valid_input_ranges])}"
                )
            elif len(close_ranges) > 1:
                raise ValueError(
                    f"Multiple Ranges are close to the specified rate ({rng}, {close_ranges}).  "
                    f"This shouldn't happen!"
                )
            validated_range_array.append(close_ranges[0])
        validated_range_array = np.array(validated_range_array, dtype=np.float32)
        # Call the API function
        if DEBUG: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[499:519]
==rattlesnake.components.sine_sys_id_environment:[531:551]
        super().__init__(
            environment_name,
            environment_command_queue,
            controller_communication_queue,
            log_file_queue,
            system_id_tabwidget,
        )
        # Add the page to the control definition tabwidget
        self.definition_widget = QtWidgets.QWidget()
        uic.loadUi(environment_definition_ui_paths[CONTROL_TYPE], self.definition_widget)
        definition_tabwidget.addTab(self.definition_widget, self.environment_name)
        # Add the page to the control prediction tabwidget
        self.prediction_widget = QtWidgets.QWidget()
        uic.loadUi(environment_prediction_ui_paths[CONTROL_TYPE], self.prediction_widget)
        test_predictions_tabwidget.addTab(self.prediction_widget, self.environment_name)
        # Add the page to the run tabwidget
        self.run_widget = QtWidgets.QWidget()
        uic.loadUi(environment_run_ui_paths[CONTROL_TYPE], self.run_widget)
        run_tabwidget.addTab(self.run_widget, self.environment_name)
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1221:1237]
==rattlesnake.components.transient_sys_id_environment:[578:594]
        if self.python_control_module is None:
            control_module = None
            control_function = None
            control_function_type = None
            control_function_parameters = None
        else:
            control_module = self.definition_widget.control_script_file_path_input.text()
            control_function = self.definition_widget.control_function_input.itemText(
                self.definition_widget.control_function_input.currentIndex()
            )
            control_function_type = (
                self.definition_widget.control_function_generator_selector.currentIndex()
            )
            control_function_parameters = (
                self.definition_widget.control_parameters_text_input.toPlainText()
            ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2565:2580]
==rattlesnake.components.sine_sys_id_environment:[2401:2416]
        super().__init__(
            environment_name,
            queue_container.environment_command_queue,
            queue_container.gui_update_queue,
            queue_container.controller_communication_queue,
            queue_container.log_file_queue,
            queue_container.collector_command_queue,
            queue_container.signal_generation_command_queue,
            queue_container.spectral_command_queue,
            queue_container.data_analysis_command_queue,
            queue_container.data_in_queue,
            queue_container.data_out_queue,
            acquisition_active,
            output_active,
        ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_interface:[120:134]
==rattlesnake.components.user_interface:[1160:1174]
                2048,
                2560,
                3200,
                4096,
                5120,
                6400,
                8192,
                10240,
                12800,
                20480,
                25600,
                40960,
                51200,
                102400, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1922:1936]
==rattlesnake.components.random_vibration_sys_id_environment:[2217:2231]
                self.run_widget,
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Enable Widget {data}: not found in UI")
            widget.setEnabled(True)
        elif message == "disable":
            widget = None
            for parent in [
                self.definition_widget, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1923:1937]
==rattlesnake.components.transient_sys_id_environment:[1508:1522]
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Enable Widget {data}: not found in UI")
            widget.setEnabled(True)
        elif message == "disable":
            widget = None
            for parent in [
                self.definition_widget,
                self.run_widget, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[771:786]
==rattlesnake.components.transient_sys_id_environment:[489:504]
        self.physical_channel_names = [
            (
                f"{'' if channel.channel_type is None else channel.channel_type} "
                f"{channel.node_number} "
                f"{'' if channel.node_direction is None else channel.node_direction}"
            )[:MAXIMUM_NAME_LENGTH]
            for channel in data_acquisition_parameters.channel_list
        ]
        self.physical_output_indices = [
            i
            for i, channel in enumerate(data_acquisition_parameters.channel_list)
            if channel.feedback_device
        ]
        # Set up widgets
        self.definition_widget.sample_rate_display.setValue(data_acquisition_parameters.sample_rate) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[3913:3929]
==rattlesnake.components.transient_sys_id_environment:[2421:2437]
            environment_name, queue_container, acquisition_active, output_active
        )
        process_class.run()

        # Rejoin all the processes
        process_class.log("Joining Subprocesses")
        process_class.log("Joining Spectral Computation")
        spectral_proc.join()
        process_class.log("Joining Data Analysis")
        analysis_proc.join()
        process_class.log("Joining Signal Generation")
        siggen_proc.join()
        process_class.log("Joining Data Collection")
        collection_proc.join()
    except Exception:  # pylint: disable=broad-exception-caught
        print(traceback.format_exc()) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2435:2448]
==rattlesnake.components.random_vibration_sys_id_environment:[2758:2771]
        frequency_spacing = self.environment_parameters.frequency_spacing
        sample_rate = self.environment_parameters.sample_rate
        num_frequency_lines = self.environment_parameters.fft_lines
        return SpectralProcessingMetadata(
            averaging_type,
            averages,
            exponential_averaging_coefficient,
            frf_estimator,
            num_response_channels,
            num_reference_channels,
            frequency_spacing,
            sample_rate,
            num_frequency_lines, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[920:933]
==rattlesnake.components.transient_sys_id_environment:[790:803]
            filename, _ = QtWidgets.QFileDialog.getOpenFileName(
                self.definition_widget,
                "Select Python Module",
                filter="Python Modules (*.py)",
            )
            if filename == "":
                return
        self.python_control_module = load_python_module(filename)
        functions = [
            function
            for function in inspect.getmembers(self.python_control_module)
            if (
                inspect.isfunction(function[1]) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1777:1797]
==rattlesnake.components.transient_sys_id_environment:[1117:1137]
        self.tile_windows()

    def tile_windows(self):
        """Tile subwindow equally across the screen"""
        screen_rect = QtWidgets.QApplication.desktop().screenGeometry()
        # Go through and remove any closed windows
        self.plot_windows = [window for window in self.plot_windows if window.isVisible()]
        num_windows = len(self.plot_windows)
        ncols = int(np.ceil(np.sqrt(num_windows)))
        nrows = int(np.ceil(num_windows / ncols))
        window_width = int(screen_rect.width() / ncols)
        window_height = int(screen_rect.height() / nrows)
        for index, window in enumerate(self.plot_windows):
            window.resize(window_width, window_height)
            row_ind = index // ncols
            col_ind = index % ncols
            window.move(col_ind * window_width, row_ind * window_height)

    def show_window(self, item):
        """Shows the currently selected control channel in a new subwindow""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2218:2231]
==rattlesnake.components.transient_sys_id_environment:[1508:1521]
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Enable Widget {data}: not found in UI")
            widget.setEnabled(True)
        elif message == "disable":
            widget = None
            for parent in [
                self.definition_widget, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2234:2247]
==rattlesnake.components.transient_sys_id_environment:[1524:1537]
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Disable Widget {data}: not found in UI")
            widget.setEnabled(False)
        else:
            widget = None
            for parent in [
                self.definition_widget, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sdynpy_system_virtual_hardware:[332:385]
==rattlesnake.components.state_space_virtual_hardware:[148:201]
        self.integration_oversample = test_data.output_oversample
        # Need to get one more sample than you would think because lsim doesn't bridge the gap
        # between integrations
        self.times = np.arange(test_data.samples_per_read * self.integration_oversample + 1) / (
            test_data.sample_rate * self.integration_oversample
        )
        self.frame_time = test_data.samples_per_read / test_data.sample_rate
        self.acquisition_delay = test_data.samples_per_write / test_data.output_oversample

    def start(self):
        """Method to start acquiring data.

        For the synthetic case, it simply initializes the state of the system to zero"""
        self.state[:] = 0

    def get_acquisition_delay(self) -> int:
        """
        Get the number of samples between output and acquisition.

        This function returns the number of samples that need to be read to
        ensure that the last output is read by the acquisition.  If there is
        buffering in the output, this delay should be adjusted accordingly.

        Returns
        -------
        int
            Number of samples between when a dataset is written to the output
            and when it has finished playing.

        """
        return self.acquisition_delay

    def read(self):
        """Method to read a frame of data from the hardware

        This function gets the force from the output queue and adds it to the
        buffer of time signals that represents the force.  It then integrates
        a frame of time and sends it to the acquisition.

        Returns
        -------
        read_data :
            2D Data read from the controller with shape ``n_channels`` x
            ``n_samples``

        """
        start_time = time.time()
        while self.force_buffer.shape[0] < self.times.size:
            try:
                forces = self.queue.get(timeout=self.frame_time)
            except mp.queues.Empty:
                # If we don't get an output in time, this likely means output
                # has stopped so just put zeros. (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[864:884]
==rattlesnake.components.transient_sys_id_environment:[551:571]
        return [
            f"Transformed Response {i + 1}"
            for i in range(self.environment_parameters.response_transformation_matrix.shape[0])
        ]

    @property
    def initialized_output_names(self):
        """Gets the names of the drive channels that have been initialized"""
        if self.environment_parameters.reference_transformation_matrix is None:
            return self.physical_output_names
        else:
            return [
                f"Transformed Drive {i + 1}"
                for i in range(self.environment_parameters.reference_transformation_matrix.shape[0])
            ]

    def update_control_channels(self):
        """Updates the control channels due to selection changes"""
        self.response_transformation_matrix = None
        self.output_transformation_matrix = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1966:1978]
==rattlesnake.components.random_vibration_sys_id_environment:[2746:2758]
        if self.environment_parameters.sysid_estimator == "H1":
            frf_estimator = Estimator.H1
        elif self.environment_parameters.sysid_estimator == "H2":
            frf_estimator = Estimator.H2
        elif self.environment_parameters.sysid_estimator == "H3":
            frf_estimator = Estimator.H3
        elif self.environment_parameters.sysid_estimator == "Hv":
            frf_estimator = Estimator.HV
        else:
            raise ValueError(f"Invalid FRF Estimator {self.environment_parameters.sysid_estimator}")
        num_response_channels = self.environment_parameters.num_response_channels
        num_reference_channels = self.environment_parameters.num_reference_channels (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1936:1948]
==rattlesnake.components.random_vibration_sys_id_environment:[2233:2245]
                self.run_widget,
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Disable Widget {data}: not found in UI")
            widget.setEnabled(False)
        else:
            widget = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[644:659]
==rattlesnake.components.time_environment:[234:250]
        super().__init__(
            environment_name,
            environment_command_queue,
            controller_communication_queue,
            log_file_queue,
        )
        # Add the page to the control definition tabwidget
        self.definition_widget = QtWidgets.QWidget()
        uic.loadUi(environment_definition_ui_paths[CONTROL_TYPE], self.definition_widget)
        definition_tabwidget.addTab(self.definition_widget, self.environment_name)
        # Add the page to the run tabwidget
        self.run_widget = QtWidgets.QWidget()
        uic.loadUi(environment_run_ui_paths[CONTROL_TYPE], self.run_widget)
        run_tabwidget.addTab(self.run_widget, self.environment_name)

        # Set up some persistent data (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[3065:3079]
==rattlesnake.components.sine_sys_id_environment:[3913:3927]
        environment_name, queue_container, acquisition_active, output_active
    )
    process_class.run()

    # Rejoin all the processes
    process_class.log("Joining Subprocesses")
    process_class.log("Joining Spectral Computation")
    spectral_proc.join()
    process_class.log("Joining Data Analysis")
    analysis_proc.join()
    process_class.log("Joining Signal Generation")
    siggen_proc.join()
    process_class.log("Joining Data Collection")
    collection_proc.join() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[3316:3328]
==rattlesnake.components.transient_sys_id_environment:[2113:2126]
            self.siggen_shutdown_achieved = False
            # Set up the signal generation
            self.queue_container.signal_generation_command_queue.put(
                self.environment_name,
                (
                    SignalGenerationCommands.INITIALIZE_PARAMETERS,
                    self.get_signal_generation_metadata(),
                ),
            )
            self.queue_container.signal_generation_command_queue.put(
                self.environment_name,
                (
                    SignalGenerationCommands.INITIALIZE_SIGNAL_GENERATOR, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_environment:[565:576]
==rattlesnake.components.abstract_message_process:[159:170]
                )
                continue
            try:
                halt_flag = function(data)
            except Exception:  # pylint: disable=broad-exception-caught
                tb = traceback.format_exc()
                self.log(f"ERROR\n\n {tb}")
                self.gui_update_queue.put(
                    (
                        "error",
                        ( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1134:1149]
==rattlesnake.components.random_vibration_sys_id_environment:[2170:2181]
            (
                frames,
                total_frames,
                self.frequencies,
                self.last_transfer_function,
                self.last_coherence,
                self.last_response_cpsd,
                self.last_reference_cpsd,
                self.last_condition,
            ) = data
            self.update_sysid_plots( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1981:1995]
==rattlesnake.components.random_vibration_sys_id_environment:[2761:2775]
        return SpectralProcessingMetadata(
            averaging_type,
            averages,
            exponential_averaging_coefficient,
            frf_estimator,
            num_response_channels,
            num_reference_channels,
            frequency_spacing,
            sample_rate,
            num_frequency_lines,
        )

    def recompute_prediction(self, data):  # pylint: disable=unused-argument
        """Sends a signal to the data analysis process to recompute test predictions""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[485:502]
==rattlesnake.components.data_physics_interface:[392:409]
        validated_range_array = []
        for rng in range_array:
            close_ranges = self._valid_output_ranges[np.isclose(self._valid_output_ranges, rng)]
            if len(close_ranges) == 0:
                raise ValueError(
                    f"Range {rng} is not valid.  Valid sample rates are "
                    f"{', '.join([f'{v:0.1f}' for v in self._valid_output_ranges])}"
                )
            elif len(close_ranges) > 1:
                raise ValueError(
                    f"Multiple Ranges are close to the specified rate ({rng}, {close_ranges}).  "
                    f"This shouldn't happen!"
                )
            validated_range_array.append(close_ranges[0])
        validated_range_array = np.array(validated_range_array, dtype=np.float32)
        # Call the API function
        if DEBUG: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[793:805]
==rattlesnake.components.data_physics_interface:[562:574]
        if output_data.ndim != 2:
            raise ValueError("`output_data` should have 2 dimensions (num_outputs x num_samples)")
        if output_data.shape[0] != self._num_outputs:
            raise ValueError(
                f"`output_data` must have number of rows equal to the number of "
                f"outputs ({self._num_outputs})"
            )
        num_samples = output_data.shape[-1]
        this_output_data = np.zeros(np.prod(output_data.shape), dtype=np.float32)
        this_output_data[:] = output_data.flatten().astype(np.float32)
        # self.log_file.write(this_output_data.shape, num_samples, self._num_outputs)
        if DEBUG: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.exodus_modal_solution_hardware:[199:252]
==rattlesnake.components.state_space_virtual_hardware:[161:211]
        self.state[:] = 0

    def get_acquisition_delay(self) -> int:
        """
        Get the number of samples between output and acquisition.

        This function returns the number of samples that need to be read to
        ensure that the last output is read by the acquisition.  If there is
        buffering in the output, this delay should be adjusted accordingly.

        Returns
        -------
        int
            Number of samples between when a dataset is written to the output
            and when it has finished playing.

        """
        return self.acquisition_delay

    def read(self):
        """Method to read a frame of data from the hardware

        This function gets the force from the output queue and adds it to the
        buffer of time signals that represents the force.  It then integrates
        a frame of time and sends it to the acquisition.

        Returns
        -------
        read_data :
            2D Data read from the controller with shape ``n_channels`` x
            ``n_samples``

        """
        start_time = time.time()
        while self.force_buffer.shape[0] < self.times.size:
            try:
                forces = self.queue.get(timeout=self.frame_time)
            except mp.queues.Empty:
                # If we don't get an output in time, this likely means output has stopped so
                # just put zeros.
                forces = np.zeros((self.force_buffer.shape[-1], self.times.size))
            self.force_buffer = np.concatenate((self.force_buffer, forces.T), axis=0)

        # Now extract a force that is the correct size
        this_force = self.force_buffer[: self.times.size]
        # And leave the rest for next time
        # Note we have to keep the last force sample still on the
        # buffer because it will be the next force sample we use
        self.force_buffer = self.force_buffer[self.times.size - 1 :]

        # print('Got Force')
        # print('this_force shape: {:}'.format(this_force.shape))
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1937:1948]
==rattlesnake.components.transient_sys_id_environment:[1524:1535]
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Disable Widget {data}: not found in UI")
            widget.setEnabled(False)
        else:
            widget = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2498:2510]
==rattlesnake.components.transient_sys_id_environment:[2115:2126]
        self.queue_container.signal_generation_command_queue.put(
            self.environment_name,
            (
                SignalGenerationCommands.INITIALIZE_PARAMETERS,
                self.get_signal_generation_metadata(),
            ),
        )

        self.queue_container.signal_generation_command_queue.put(
            self.environment_name,
            (
                SignalGenerationCommands.INITIALIZE_SIGNAL_GENERATOR, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[245:256]
==rattlesnake.components.transient_sys_id_environment:[2016:2027]
                                    self.sysid_response_noise,
                                    self.sysid_reference_noise,
                                    self.sysid_response_cpsd,
                                    self.sysid_reference_cpsd,
                                    self.sysid_coherence,
                                ),
                            ),
                        )
                    )
                    self.has_sent_interactive_control_transfer_function_results = True
            if ( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[832:859]
==rattlesnake.components.sine_sys_id_environment:[864:882]
            return [
                f"Transformed Response {i + 1}"
                for i in range(self.environment_parameters.response_transformation_matrix.shape[0])
            ]

    @property
    def initialized_output_names(self):
        if self.environment_parameters.reference_transformation_matrix is None:
            return self.physical_output_names
        else:
            return [
                f"Transformed Drive {i + 1}"
                for i in range(self.environment_parameters.reference_transformation_matrix.shape[0])
            ]

    def select_spec_file(self, clicked, filename=None):  # pylint: disable=unused-argument
        """Loads a specification using a dialog or the specified filename

        Parameters
        ----------
        clicked :
            The clicked event that triggered the callback.
        filename :
            File name defining the specification for bypassing the callback when
            loading from a file (Default value = None).

        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1785:1802]
==rattlesnake.components.sine_sys_id_environment:[1739:1756]
        ncols = int(np.ceil(np.sqrt(num_windows)))
        nrows = int(np.ceil(num_windows / ncols))
        window_width = int(screen_rect.width() / ncols)
        window_height = int(screen_rect.height() / nrows)
        for index, window in enumerate(self.plot_windows):
            window.resize(window_width, window_height)
            row_ind = index // ncols
            col_ind = index % ncols
            window.move(col_ind * window_width, row_ind * window_height)

    def close_windows(self):
        """Closes all the plot windows"""
        for window in self.plot_windows:
            window.close()

    def save_control_data_from_profile(self, filename):
        """Saves the current control data to the specified file name""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[3031:3042]
==rattlesnake.components.sine_sys_id_environment:[3879:3890]
                queue_container.environment_command_queue,
                queue_container.gui_update_queue,
                queue_container.log_file_queue,
            ),
        )
        analysis_proc.start()
        siggen_proc = mp.Process(
            target=signal_generation_process,
            args=(
                environment_name,
                queue_container.signal_generation_command_queue, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1896:1907]
==rattlesnake.components.streaming:[171:183]
                "/channels/" + label, netcdf_datatype, ("response_channels",)
            )
            channel_data = [
                getattr(channel, label) for channel in global_data_parameters.channel_list
            ]
            if netcdf_datatype == "i1":
                channel_data = np.array([1 if val else 0 for val in channel_data])
            else:
                channel_data = ["" if val is None else val for val in channel_data]
            for i, cd in enumerate(channel_data):
                var[i] = cd (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[772:784]
==rattlesnake.components.transient_sys_id_environment:[495:507]
            for channel in data_acquisition_parameters.channel_list
        ]
        self.physical_output_indices = [
            i
            for i, channel in enumerate(data_acquisition_parameters.channel_list)
            if channel.feedback_device
        ]
        # Set up widgets
        self.definition_widget.sample_rate_display.setValue(data_acquisition_parameters.sample_rate)
        self.system_id_widget.samplesPerFrameSpinBox.setValue(
            data_acquisition_parameters.sample_rate
        ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_data_analysis:[354:365]
==rattlesnake.components.random_vibration_sys_id_data_analysis:[572:583]
        environment_name + " Data Analysis" if process_name is None else process_name,
        command_queue,
        data_in_queue,
        data_out_queue,
        environment_command_queue,
        log_file_queue,
        gui_update_queue,
        environment_name,
    )

    data_analysis_instance.run() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1821:1831]
==rattlesnake.components.modal_environment:[2273:2298]
        self.map_command(
            SignalGenerationCommands.SHUTDOWN_ACHIEVED, self.siggen_shutdown_achieved_fn
        )
        self.map_command(
            DataCollectorCommands.SHUTDOWN_ACHIEVED, self.collector_shutdown_achieved_fn
        )
        self.map_command(
            SpectralProcessingCommands.SHUTDOWN_ACHIEVED,
            self.spectral_shutdown_achieved_fn,
        )

    def initialize_data_acquisition_parameters(
        self, data_acquisition_parameters: DataAcquisitionParameters
    ):
        """Initialize the data acquisition parameters in the environment.

        The environment will receive the global data acquisition parameters from
        the controller, and must set itself up accordingly.

        Parameters
        ----------
        data_acquisition_parameters : DataAcquisitionParameters :
            A container containing data acquisition parameters, including
            channels active in the environment as well as sampling parameters.
        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1981:1991]
==rattlesnake.components.modal_environment:[2438:2448]
        return SpectralProcessingMetadata(
            averaging_type,
            averages,
            exponential_averaging_coefficient,
            frf_estimator,
            num_response_channels,
            num_reference_channels,
            frequency_spacing,
            sample_rate,
            num_frequency_lines, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2530:2552]
==rattlesnake.components.random_vibration_sys_id_environment:[2854:2891]
        )

        # Set up the spectral processing
        self.queue_container.spectral_command_queue.put(
            self.environment_name,
            (
                SpectralProcessingCommands.INITIALIZE_PARAMETERS,
                self.get_spectral_processing_metadata(),
            ),
        )

        # Tell the spectral analysis to clear and start acquiring
        self.queue_container.spectral_command_queue.put(
            self.environment_name,
            (SpectralProcessingCommands.CLEAR_SPECTRAL_PROCESSING, None),
        )

        self.queue_container.spectral_command_queue.put(
            self.environment_name,
            (SpectralProcessingCommands.RUN_SPECTRAL_PROCESSING, None),
        )

    def stop_environment(self, data):
        """Stop the environment gracefully

        This function defines the operations to shut down the environment
        gracefully so there is no hard stop that might damage test equipment
        or parts.

        Parameters
        ----------
        data : Ignored
            This parameter is not used by the function but must be present
            due to the calling signature of functions called through the
            ``command_map``

        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1924:1934]
==rattlesnake.components.time_environment:[626:636]
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Enable Widget {data}: not found in UI")
            widget.setEnabled(True)
        elif message == "disable":
            widget = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[616:627]
==rattlesnake.components.sine_sys_id_environment:[641:651]
        )
        self.definition_widget.control_channels_selector.itemChanged.connect(
            self.update_control_channels
        )
        self.definition_widget.check_selected_button.clicked.connect(
            self.check_selected_control_channels
        )
        self.definition_widget.uncheck_selected_button.clicked.connect(
            self.uncheck_selected_control_channels
        )
        # Prediction (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2235:2245]
==rattlesnake.components.time_environment:[637:647]
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Disable Widget {data}: not found in UI")
            widget.setEnabled(False)
        else:
            widget = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2817:2828]
==rattlesnake.components.transient_sys_id_environment:[1958:1968]
            self.gui_update_queue.put(
                (
                    "error",
                    (
                        "Perform System Identification",
                        "Perform System ID before performing test predictions",
                    ),
                )
            )
            return
        # print('Computing Drive Signal') (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[3193:3204]
==rattlesnake.components.transient_sys_id_environment:[2138:2148]
            n_control_channels = (
                len(self.environment_parameters.control_channel_indices)
                if self.environment_parameters.response_transformation_matrix is None
                else self.environment_parameters.response_transformation_matrix.shape[0]
            )
            n_output_channels = (
                len(self.environment_parameters.output_channel_indices)
                if self.environment_parameters.reference_transformation_matrix is None
                else self.environment_parameters.reference_transformation_matrix.shape[0]
            ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.time_environment:[333:343]
==rattlesnake.components.transient_sys_id_environment:[653:663]
            item = QtWidgets.QTableWidgetItem()
            item.setText(name)
            item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEditable)
            self.definition_widget.signal_information_table.setItem(i, 1, item)
            checkbox = QtWidgets.QCheckBox()
            checkbox.setChecked(True)
            checkbox.stateChanged.connect(self.show_signal)
            self.show_signal_checkboxes.append(checkbox)
            self.definition_widget.signal_information_table.setCellWidget(i, 0, checkbox)
            item = QtWidgets.QTableWidgetItem() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1371:1380]
==rattlesnake.components.random_vibration_sys_id_environment:[1900:1910]
            ]
            if netcdf_datatype == "i1":
                channel_data = np.array([1 if val else 0 for val in channel_data])
            else:
                channel_data = ["" if val is None else val for val in channel_data]
            for i, cd in enumerate(channel_data):
                var[i] = cd
        group_handle = netcdf_handle.createGroup(self.environment_name)
        self.environment_parameters.store_to_netcdf(group_handle)
        # Create Variables for Spectral Data (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[370:406]
==rattlesnake.components.data_physics_interface:[313:341]
        else:
            raise RuntimeError(
                f"Hardware status must be IDLE to initialize.  "
                f"Current status is {self.status.name}."
            )

    def setup_input_parameters(self, coupling_array, sensitivity_array, range_array):
        """Sets up the acquisition channels for the data acquisition system

        Parameters
        ----------
        coupling_array : np.ndarray
            An array of coupling values for the data acquisition system
        sensitivity_array : np.ndarray
            An array of sensitivity values for the data acquisition system
        range_array : np.ndarray
            An array of ranges for the data acquisition system

        Raises
        ------
        ValueError
            if any invalid values are passed or the arrays are not the same size
        """
        # Set up the channel arrays
        if len(coupling_array) != len(sensitivity_array):
            raise ValueError("Coupling array must have same size as Sensitivity Array")
        if len(range_array) != len(sensitivity_array):
            raise ValueError("Range array must have same size as Sensitivity Array") (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[421:431]
==rattlesnake.components.data_physics_interface:[399:409]
                )
            elif len(close_ranges) > 1:
                raise ValueError(
                    f"Multiple Ranges are close to the specified rate ({rng}, {close_ranges}).  "
                    f"This shouldn't happen!"
                )
            validated_range_array.append(close_ranges[0])
        validated_range_array = np.array(validated_range_array, dtype=np.float32)
        # Call the API function
        if DEBUG: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[492:502]
==rattlesnake.components.data_physics_interface:[353:363]
                )
            elif len(close_ranges) > 1:
                raise ValueError(
                    f"Multiple Ranges are close to the specified rate ({rng}, {close_ranges}).  "
                    f"This shouldn't happen!"
                )
            validated_range_array.append(close_ranges[0])
        validated_range_array = np.array(validated_range_array, dtype=np.float32)
        # Call the API function
        if DEBUG: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2498:2510]
==rattlesnake.components.sine_sys_id_environment:[3317:3328]
            self.queue_container.signal_generation_command_queue.put(
                self.environment_name,
                (
                    SignalGenerationCommands.INITIALIZE_PARAMETERS,
                    self.get_signal_generation_metadata(),
                ),
            )
            self.queue_container.signal_generation_command_queue.put(
                self.environment_name,
                (
                    SignalGenerationCommands.INITIALIZE_SIGNAL_GENERATOR, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1956:1990]
==rattlesnake.components.user_interface:[1832:1855]
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    #        self.log('Update took {:} seconds'.format(time.time()-start_time))

    def handle_controller_instructions(self, queue_data):
        """Handler function for global controller instructions

        Parameters
        ----------
        queue_data :
            A 2-tuple consisting of ``(message,data)`` pairs where the message
            denotes what to change and the data contains the information needed
            to be displayed.

        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[919:928]
==rattlesnake.components.sine_sys_id_environment:[1114:1123]
        if filename is None:
            filename, _ = QtWidgets.QFileDialog.getOpenFileName(
                self.definition_widget,
                "Select Python Module",
                filter="Python Modules (*.py)",
            )
            if filename == "":
                return
        self.python_control_module = load_python_module(filename) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1846:1855]
==rattlesnake.components.streaming:[100:109]
            "output_channels",
            len(
                [
                    channel
                    for channel in global_data_parameters.channel_list
                    if channel.feedback_device is not None
                ]
            ),
        ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[638:647]
==rattlesnake.components.transient_sys_id_environment:[451:460]
        )
        self.prediction_widget.maximum_voltage_button.clicked.connect(
            self.show_max_voltage_prediction
        )
        self.prediction_widget.minimum_voltage_button.clicked.connect(
            self.show_min_voltage_prediction
        )
        self.prediction_widget.maximum_error_button.clicked.connect(self.show_max_error_prediction)
        self.prediction_widget.minimum_error_button.clicked.connect(self.show_min_error_prediction) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[787:796]
==rattlesnake.components.transient_sys_id_environment:[505:514]
            data_acquisition_parameters.sample_rate
        )
        self.definition_widget.control_channels_selector.clear()
        for channel_name in self.physical_channel_names:
            item = QtWidgets.QListWidgetItem()
            item.setText(channel_name)
            item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
            item.setCheckState(Qt.Unchecked)
            self.definition_widget.control_channels_selector.addItem(item) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sdynpy_frf_virtual_hardware:[180:192]
==rattlesnake.components.sdynpy_system_virtual_hardware:[172:185]
        self.response_channels = np.array(
            [
                channel.feedback_device is None or channel.feedback_device == ""
                for channel in channel_data
            ],
            dtype="bool",
        )
        self.output_channels = ~self.response_channels
        # Need to add a signal buffer in case the write size is not equal to
        # the read size
        self.force_buffer = np.zeros((0, np.sum(~self.response_channels)))

        # Figure out which channels go with which indices (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sdynpy_system_virtual_hardware:[155:179]
==rattlesnake.components.state_space_virtual_hardware:[108:133]
        self.create_response_channels(channel_data)
        self.set_parameters(test_data)

    def create_response_channels(self, channel_data: List[Channel]):
        """Method to set up response channels

        This function takes channels from the supplied list of channels and
        extracts the mode shape coefficients corresponding to those channels.

        Parameters
        ----------
        channel_data : List[Channel] :
            A list of ``Channel`` objects defining the channels in the test

        """
        #        print('{:} Channels'.format(len(channel_data)))
        self.response_channels = np.array(
            [
                channel.feedback_device is None or channel.feedback_device == ""
                for channel in channel_data
            ],
            dtype="bool",
        )
        # Need to add a signal buffer in case the write size is not equal to
        # the read size (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2704:2716]
==rattlesnake.components.sine_sys_id_utilities:[3139:3151]
            )
            generator.send(None)

        # print(f"{self.signal.shape=}")
        start_index = 0
        reconstructed_signals = []
        reconstructed_amplitudes = []
        reconstructed_phases = []

        last_data = False
        while not last_data:
            end_index = start_index + block_size (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[1739:1751]
==rattlesnake.components.transient_sys_id_environment:[1125:1137]
        ncols = int(np.ceil(np.sqrt(num_windows)))
        nrows = int(np.ceil(num_windows / ncols))
        window_width = int(screen_rect.width() / ncols)
        window_height = int(screen_rect.height() / nrows)
        for index, window in enumerate(self.plot_windows):
            window.resize(window_width, window_height)
            row_ind = index // ncols
            col_ind = index % ncols
            window.move(col_ind * window_width, row_ind * window_height)

    def show_window(self, item):
        """Shows the currently selected control channel in a new subwindow""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.time_environment:[408:417]
==rattlesnake.components.transient_sys_id_environment:[621:630]
        if filename is None:
            filename, _ = QtWidgets.QFileDialog.getOpenFileName(
                self.definition_widget,
                "Select Signal File",
                filter="Numpy or Mat (*.npy *.npz *.mat)",
            )
            if filename == "":
                return
        self.definition_widget.signal_file_name_display.setText(filename) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.report_pylint:[309:364]
==rattlesnake.cicd.report_pytest:[175:212]
        </div>
    </div>
    <footer style="text-align: center; margin: 40px 0; color: #6a737d;">
        <p>Generated by GitHub Actions</p>
    </footer>
</body>
</html>"""

    return html_content


# def write_report(html_content: str, output_file: str) -> None:
#     """
#     Write HTML content to file.
#
#     Args:
#         html_content: The HTML content to write
#         output_file: Path for the output HTML file
#
#     Raises:
#         IOError: If the file cannot be written.
#     """
#     try:
#         with open(output_file, "w", encoding="utf-8") as f:
#             f.write(html_content)
#     except IOError as e:
#         raise IOError(f'Error writing output file "{output_file}": {e}') from e


def run_pylint_report(
    input_file: str,
    output_file: str,
    timestamp: str,
    run_id: str,
    ref_name: str,
    github_sha: str,
    github_repo: str,
) -> Tuple[int, Dict[str, int], float]:
    """
    Main function to create HTML report from pylint output.

    Args:
        input_file: Path to the pylint output text file
        output_file: Path for the generated HTML report
        timestamp: The timestampe from bash when pylint ran, in format YYYYMMDD_HHMMSS_UTC
            e.g., 20250815_211112_UTC
        run_id: GitHub Actions run ID
        ref_name: Git reference name (branch)
        github_sha: GitHub commit SHA
        github_repo: GitHub repository name

    Returns:
        Tuple of (total_issues, issue_counts_dict)
    """
    # Read the pylint output (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_environment:[661:669]
==rattlesnake.components.abstract_sysid_environment:[1809:1817]
        gui_update_queue,
        controller_communication_queue,
        log_file_queue,
        data_in_queue,
        data_out_queue,
        acquisition_active,
        output_active,
    ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_data_analysis:[355:364]
==rattlesnake.components.random_vibration_sys_id_data_analysis:[76:84]
            command_queue,
            data_in_queue,
            data_out_queue,
            environment_command_queue,
            log_file_queue,
            gui_update_queue,
            environment_name,
        ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1349:1357]
==rattlesnake.components.random_vibration_sys_id_environment:[1881:1889]
                var[i] = name
                if name == self.environment_name:
                    this_environment_index = i
            var = netcdf_handle.createVariable(
                "environment_active_channels",
                "i1",
                ("response_channels", "num_environments"),
            ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1922:1930]
==rattlesnake.components.random_vibration_sys_id_environment:[2233:2241]
                self.run_widget,
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1936:1944]
==rattlesnake.components.random_vibration_sys_id_environment:[2217:2225]
                self.run_widget,
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2685:2693]
==rattlesnake.components.random_vibration_sys_id_environment:[2898:2906]
        )
        self.queue_container.signal_generation_command_queue.put(
            self.environment_name, (SignalGenerationCommands.START_SHUTDOWN, None)
        )
        self.queue_container.spectral_command_queue.put(
            self.environment_name,
            (SpectralProcessingCommands.STOP_SPECTRAL_PROCESSING, None),
        ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[573:582]
==rattlesnake.components.signal_generation_process:[462:471]
        command_queue,
        data_in_queue,
        data_out_queue,
        environment_command_queue,
        log_file_queue,
        gui_update_queue,
        environment_name,
    )
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[225:258]
==rattlesnake.components.sine_sys_id_environment:[302:362]
        return self._number_of_channels

    @number_of_channels.setter
    def number_of_channels(self, value):
        """Sets the stored value of the number of channels in the environment"""
        self._number_of_channels = value

    @property
    def reference_channel_indices(self):
        """Indices corresponding to the drive channels"""
        return self.output_channel_indices

    @property
    def response_channel_indices(self):
        """Indices corresponding to the control channels"""
        return self.control_channel_indices

    @property
    def response_transformation_matrix(self):
        """Transformation matrix applied to the control channels"""
        return self._response_transformation_matrix

    @response_transformation_matrix.setter
    def response_transformation_matrix(self, value):
        """Sets the transformation matrix applied to the control channels"""
        self._response_transformation_matrix = value

    @property
    def reference_transformation_matrix(self):
        """Transformation matrix applied to the drive channels"""
        return self._reference_transformation_matrix

    @reference_transformation_matrix.setter
    def reference_transformation_matrix(self, value):
        """Sets the transformation matrix applied to the drive channels"""
        self._reference_transformation_matrix = value

    def store_to_netcdf(
        self,
        netcdf_group_handle: nc4._netCDF4.Group,  # pylint: disable=c-extension-no-member
    ):
        """Store parameters to a group in a netCDF streaming file.

        This function stores parameters from the environment into the netCDF
        file in a group with the environment's name as its name.  The function
        will receive a reference to the group within the dataset and should
        store the environment's parameters into that group in the form of
        attributes, dimensions, or variables.

        This function is the "write" counterpart to the retrieve_metadata
        function in the AbstractUI class, which will read parameters from
        the netCDF file to populate the parameters in the user interface.

        Parameters
        ----------
        netcdf_group_handle : nc4._netCDF4.Group
            A reference to the Group within the netCDF dataset where the
            environment's metadata is stored.

        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[771:779]
==rattlesnake.components.sine_sys_id_environment:[762:770]
        self.physical_channel_names = [
            (
                f"{'' if channel.channel_type is None else channel.channel_type} "
                f"{channel.node_number} "
                f"{'' if channel.node_direction is None else channel.node_direction}"
            )[:MAXIMUM_NAME_LENGTH]
            for channel in data_acquisition_parameters.channel_list
        ] (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[777:786]
==rattlesnake.components.sine_sys_id_environment:[772:781]
            for channel in data_acquisition_parameters.channel_list
        ]
        self.physical_output_indices = [
            i
            for i, channel in enumerate(data_acquisition_parameters.channel_list)
            if channel.feedback_device
        ]
        # Set up widgets
        self.definition_widget.sample_rate_display.setValue(data_acquisition_parameters.sample_rate) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1555:1568]
==rattlesnake.components.transient_sys_id_environment:[1028:1041]
        )

    # %% Run Control

    def start_control(self):
        """Runs the corresponding environment in the controller"""
        self.enable_control(False)
        self.controller_communication_queue.put(
            self.log_name, (GlobalCommands.START_ENVIRONMENT, self.environment_name)
        )
        self.environment_command_queue.put(
            self.log_name,
            ( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2715:2729]
==rattlesnake.components.transient_sys_id_environment:[2096:2110]
        )

    def get_signal_generation_metadata(self):
        """Gets relevant metadata for the signal generation process"""
        return SignalGenerationMetadata(
            samples_per_write=self.data_acquisition_parameters.samples_per_write,
            level_ramp_samples=self.environment_parameters.test_level_ramp_time
            * self.environment_parameters.sample_rate
            * self.data_acquisition_parameters.output_oversample,
            output_transformation_matrix=self.environment_parameters.reference_transformation_matrix,
        )

    def get_signal_generator(self):
        """Gets the signal generator object that will generate signals for the environment""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[1987:1995]
==rattlesnake.components.sine_sys_id_utilities:[104:112]
                frequency,
                amplitude,
                phase,
                sweep_type,
                sweep_rate,
                warning,
                abort,
                start_time, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[803:811]
==rattlesnake.components.transient_sys_id_environment:[512:524]
            item.setCheckState(Qt.Unchecked)
            self.definition_widget.control_channels_selector.addItem(item)
        self.response_transformation_matrix = None
        self.output_transformation_matrix = None
        self.define_transformation_matrices(None, False)
        self.definition_widget.input_channels_display.setValue(len(self.physical_channel_names))
        self.definition_widget.output_channels_display.setValue(len(self.physical_output_indices))
        self.definition_widget.control_channels_display.setValue(0)

    @property
    def physical_output_names(self):
        """Names of the physical drive channels""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[1115:1123]
==rattlesnake.components.transient_sys_id_environment:[790:798]
            filename, _ = QtWidgets.QFileDialog.getOpenFileName(
                self.definition_widget,
                "Select Python Module",
                filter="Python Modules (*.py)",
            )
            if filename == "":
                return
        self.python_control_module = load_python_module(filename) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[1188:1196]
==rattlesnake.components.transient_sys_id_environment:[861:869]
        for widget in [
            self.prediction_widget.response_selector,
            self.run_widget.control_channel_selector,
        ]:
            widget.blockSignals(True)
            widget.clear()
            for i, control_name in enumerate(self.initialized_control_names):
                widget.addItem(f"{i + 1}: {control_name}") (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2052:2060]
==rattlesnake.components.transient_sys_id_environment:[1502:1510]
            widget = None
            for parent in [
                self.definition_widget,
                self.run_widget,
                self.system_id_widget,
                self.prediction_widget,
            ]:
                try: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2659:2672]
==rattlesnake.components.transient_sys_id_environment:[1945:1957]
            self.sysid_coherence,
            self.sysid_response_cpsd,
            self.sysid_reference_cpsd,
            self.sysid_condition,
            self.sysid_response_noise,
            self.sysid_reference_noise,
        ) = data
        # Perform the control prediction
        self.perform_control_prediction(True)

    def filter_predicted_signal(self):
        """Extract amplitude and phase information from predicted signals"""
        # print('Filtering Predicted Signal') (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.time_environment:[282:293]
==rattlesnake.components.transient_sys_id_environment:[401:410]
            self.run_widget.output_signal_plot,
            self.run_widget.response_signal_plot,
        ]
        for plot_widget in plot_widgets:
            plot_item = plot_widget.getPlotItem()
            plot_item.showGrid(True, True, 0.25)
            plot_item.enableAutoRange()
            plot_item.getViewBox().enableAutoRange(enable=True)
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.report_pylint:[378:389]
==rattlesnake.cicd.report_pytest:[218:228]
        timestamp,
        run_id,
        ref_name,
        github_sha,
        github_repo,
    )

    # Write the HTML report
    write_report(html_content, output_file)
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_data_analysis:[176:183]
==rattlesnake.components.sine_sys_id_environment:[2658:2665]
            self.sysid_frf,
            self.sysid_coherence,
            self.sysid_response_cpsd,
            self.sysid_reference_cpsd,
            self.sysid_condition,
            self.sysid_response_noise,
            self.sysid_reference_noise, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1371:1378]
==rattlesnake.components.streaming:[175:183]
            ]
            if netcdf_datatype == "i1":
                channel_data = np.array([1 if val else 0 for val in channel_data])
            else:
                channel_data = ["" if val is None else val for val in channel_data]
            for i, cd in enumerate(channel_data):
                var[i] = cd
        # Now write all the environment data to the netCDF file (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.exodus_modal_solution_hardware:[88:95]
==rattlesnake.components.sdynpy_system_virtual_hardware:[114:121]
        self.system = None
        self.times = None
        self.state = None
        self.frame_time = None
        self.queue = queue
        self.force_buffer = None
        self.integration_oversample = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.exodus_modal_solution_hardware:[199:239]
==rattlesnake.components.sdynpy_system_virtual_hardware:[345:385]
        self.state[:] = 0

    def get_acquisition_delay(self) -> int:
        """
        Get the number of samples between output and acquisition.

        This function returns the number of samples that need to be read to
        ensure that the last output is read by the acquisition.  If there is
        buffering in the output, this delay should be adjusted accordingly.

        Returns
        -------
        int
            Number of samples between when a dataset is written to the output
            and when it has finished playing.

        """
        return self.acquisition_delay

    def read(self):
        """Method to read a frame of data from the hardware

        This function gets the force from the output queue and adds it to the
        buffer of time signals that represents the force.  It then integrates
        a frame of time and sends it to the acquisition.

        Returns
        -------
        read_data :
            2D Data read from the controller with shape ``n_channels`` x
            ``n_samples``

        """
        start_time = time.time()
        while self.force_buffer.shape[0] < self.times.size:
            try:
                forces = self.queue.get(timeout=self.frame_time)
            except mp.queues.Empty:
                # If we don't get an output in time, this likely means output has stopped so
                # just put zeros. (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2760:2768]
==rattlesnake.components.time_environment:[1062:1070]
        input_queue,
        gui_update_queue,
        controller_communication_queue,
        data_in_queue,
        data_out_queue,
        log_file_queue,
    )
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1923:1930]
==rattlesnake.components.transient_sys_id_environment:[1524:1531]
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1937:1944]
==rattlesnake.components.transient_sys_id_environment:[1508:1515]
            ]:
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[502:512]
==rattlesnake.components.transient_sys_id_environment:[1917:1928]
            self.control_function.update_parameters(interactive_control_parameters)
            self.last_interactive_parameters = interactive_control_parameters
        else:
            raise ValueError(
                "Received an UPDATE_INTERACTIVE_CONTROL_PARAMETERS signal without an "
                "interactive control law.  How did this happen?"
            )

    def send_interactive_command(self, command):
        """Sends a command to the interactive control law""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[806:826]
==rattlesnake.components.sine_sys_id_environment:[833:854]
        return [self.physical_channel_names[i] for i in self.physical_output_indices]

    # %% Environment

    @property
    def physical_control_indices(self):
        """Gets the physical control indices currently checked"""
        return [
            i
            for i in range(self.definition_widget.control_channels_selector.count())
            if self.definition_widget.control_channels_selector.item(i).checkState() == Qt.Checked
        ]

    @property
    def physical_control_names(self):
        """Gets the names for the physical control channels currently checked"""
        return [self.physical_channel_names[i] for i in self.physical_control_indices]

    @property
    def physical_control_units(self):
        """Gets the unit for the control channels currently checked""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1175:1183]
==rattlesnake.components.sine_sys_id_environment:[1420:1427]
                self.definition_widget.transform_outputs_display.setValue(
                    output_transformation.shape[0]
                )
            for widget in self.output_selector_widgets:
                widget.blockSignals(False)
            self.response_transformation_matrix = response_transformation
            self.output_transformation_matrix = output_transformation (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2017:2024]
==rattlesnake.components.sine_sys_id_environment:[1958:1965]
        try:
            self.response_transformation_matrix = group.variables["response_transformation_matrix"][
                ...
            ].data
        except KeyError:
            self.response_transformation_matrix = None
        try: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2250:2292]
==rattlesnake.components.sine_sys_id_environment:[2058:2077]
            ]:
                try:
                    widget = getattr(parent, message)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Update Widget {message}: not found in UI")
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    @staticmethod
    def create_environment_template(
        environment_name: str, workbook: openpyxl.workbook.workbook.Workbook
    ):
        """Creates a template worksheet in an Excel workbook defining the
        environment.

        This function creates a template worksheet in an Excel workbook that
        when filled out could be read by the controller to re-create the
        environment.

        This function is the "write" counterpart to the
        ``set_parameters_from_template`` function in the ``RandomVibrationUI`` class,
        which reads the values from the template file to populate the user
        interface.

        Parameters
        ----------
        environment_name : str :
            The name of the environment that will specify the worksheet's name
        workbook : openpyxl.workbook.workbook.Workbook :
            A reference to an ``openpyxl`` workbook.

        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2502:2509]
==rattlesnake.components.sine_sys_id_environment:[2162:2169]
        ):
            self.response_transformation_matrix = None
        else:
            while True:
                if worksheet.cell(output_transform_row, 1).value == "Output Transformation Matrix:":
                    break
                output_transform_row += 1 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1311:1319]
==rattlesnake.components.transient_sys_id_environment:[871:879]
            widget.blockSignals(True)
            widget.clear()
            for i, drive_name in enumerate(self.initialized_output_names):
                widget.addItem(f"{i + 1}: {drive_name}")
            widget.blockSignals(False)
        # Set up the prediction plots
        self.prediction_widget.excitation_display_plot.getPlotItem().clear()
        self.prediction_widget.response_display_plot.getPlotItem().clear() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1382:1417]
==rattlesnake.components.transient_sys_id_environment:[931:963]
        )
        # Create the interactive control law if necessary
        if self.definition_widget.control_function_generator_selector.currentIndex() == 3:
            control_class = getattr(
                self.python_control_module,
                self.definition_widget.control_function_input.itemText(
                    self.definition_widget.control_function_input.currentIndex()
                ),
            )
            self.log(f"Building Interactive UI for class {control_class.__name__}")
            ui_class = control_class.get_ui_class()
            if ui_class == self.interactive_control_law_widget.__class__:
                print("initializing data acquisition and environment parameters")
                self.interactive_control_law_widget.initialize_parameters(
                    self.data_acquisition_parameters, self.environment_parameters
                )
            else:
                if self.interactive_control_law_widget is not None:
                    self.interactive_control_law_widget.close()
                self.interactive_control_law_window = QtWidgets.QDialog(self.definition_widget)
                self.interactive_control_law_widget = ui_class(
                    self.log_name,
                    self.environment_command_queue,
                    self.interactive_control_law_window,
                    self,
                    self.data_acquisition_parameters,
                    self.environment_parameters,
                )
            self.interactive_control_law_window.show()
        return self.environment_parameters

    # %% Test Predictions

    def show_max_voltage_prediction(self):
        """Shows the prediction with the largest RMS voltage""" (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[686:694]
==rattlesnake.components.transient_sys_id_environment:[462:470]
        )
        # Run Test
        self.run_widget.start_test_button.clicked.connect(self.start_control)
        self.run_widget.stop_test_button.clicked.connect(self.stop_control)
        self.run_widget.create_window_button.clicked.connect(self.create_window)
        self.run_widget.show_all_channels_button.clicked.connect(self.show_all_channels)
        self.run_widget.tile_windows_button.clicked.connect(self.tile_windows)
        self.run_widget.close_windows_button.clicked.connect(self.close_windows) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2549:2556]
==rattlesnake.components.transient_sys_id_environment:[1852:1859]
        _, file = os.path.split(environment_parameters.control_python_script)
        file, _ = os.path.splitext(file)
        spec = importlib.util.spec_from_file_location(
            file, environment_parameters.control_python_script
        )
        module = importlib.util.module_from_spec(spec)
        spec.loader.exec_module(module) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[3388:3395]
==rattlesnake.components.transient_sys_id_environment:[2206:2213]
            control_data = (
                acquisition_data[self.environment_parameters.control_channel_indices] * scale_factor
            )
            if self.environment_parameters.response_transformation_matrix is not None:
                control_data = (
                    self.environment_parameters.response_transformation_matrix @ control_data
                ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.time_environment:[692:699]
==rattlesnake.components.transient_sys_id_environment:[1658:1665]
        worksheet.cell(
            1,
            4,
            "Note: Replace cells with hash marks (#) to provide the requested parameters.",
        )
        worksheet.cell(2, 1, "Signal File")
        worksheet.cell(2, 2, "# Path to the file that contains the time signal that will be output") (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.report_pylint:[253:259]
==rattlesnake.cicd.report_pytest:[155:161]
        }}
    </style>
</head>
<body>
    <div class="container">
        <div class="header"> (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_data_analysis:[177:183]
==rattlesnake.components.transient_sys_id_environment:[1945:1951]
                        self.sysid_coherence,
                        self.sysid_response_cpsd,
                        self.sysid_reference_cpsd,
                        self.sysid_condition,
                        self.sysid_response_noise,
                        self.sysid_reference_noise, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[228:236]
==rattlesnake.components.data_collector:[525:533]
        try:
            return np.all(
                [np.all(value == other.__dict__[field]) for field, value in self.__dict__.items()]
            )
        except (AttributeError, KeyError):
            return False

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[337:344]
==rattlesnake.components.modal_environment:[644:651]
        super().__init__(
            environment_name,
            environment_command_queue,
            controller_communication_queue,
            log_file_queue,
        )
        # Add the page to the control definition tabwidget (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1371:1377]
==rattlesnake.components.modal_environment:[1406:1412]
                ]
                if netcdf_datatype == "i1":
                    channel_data = np.array([1 if val else 0 for val in channel_data])
                else:
                    channel_data = ["" if val is None else val for val in channel_data]
                for i, cd in enumerate(channel_data): (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1678:1684]
==rattlesnake.components.random_vibration_sys_id_environment:[2173:2179]
                    self.frequencies,
                    self.last_transfer_function,
                    self.last_coherence,
                    self.last_response_cpsd,
                    self.last_reference_cpsd,
                    self.last_condition, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.acquisition:[360:366]
==rattlesnake.components.output:[383:389]
        if (
            self.shutdown_flag  # We're shutting down
            and all(
                [not flag for environment, flag in self.environment_active_flags.items()]
            )  # All the environments are inactive
            and all( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.acquisition:[573:602]
==rattlesnake.components.output:[455:482]
        ]:
            queue_flush_sum += len(flush_queue(queue))
        self.log(f"Flushed {queue_flush_sum} items out of queues")
        if self.hardware is not None:
            self.hardware.close()
        return True


def output_process(
    queue_container: QueueContainer, environments: list, output_active: mp.sharedctypes.Synchronized
):
    """Function passed to multiprocessing as the output process

    This process creates the ``OutputProcess`` object and calls the ``run``
    command.

    Parameters
    ----------
    queue_container : QueueContainer
        A container containing the queues used to communicate between
        controller processes
    environments : list
        A list of ``(ControlType,environment_name)`` pairs that define the
        environments in the controller.

    """
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_hardware:[351:359]
==rattlesnake.components.data_physics_hardware:[292:300]
            return
        try:
            data = self.output_data_queue.get(block, timeout=10)
            # print('Got New Data from queue')
        except mp.queues.Empty as e:
            # print('Did not get new data from queue')
            if block:
                raise RuntimeError( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[880:886]
==rattlesnake.components.random_vibration_sys_id_environment:[1187:1193]
        data = self.collect_environment_definition_parameters()
        self.definition_widget.samples_per_acquire_display.setValue(data.samples_per_acquire)
        self.definition_widget.frame_time_display.setValue(data.frame_time)
        self.definition_widget.nyquist_frequency_display.setValue(data.nyquist_frequency)
        self.definition_widget.fft_lines_display.setValue(data.fft_lines)
        self.definition_widget.frequency_spacing_display.setValue(data.frequency_spacing) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[946:952]
==rattlesnake.components.random_vibration_sys_id_environment:[920:926]
            filename, _ = QtWidgets.QFileDialog.getOpenFileName(
                self.definition_widget,
                "Select Python Module",
                filter="Python Modules (*.py)",
            )
            if filename == "": (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1949:1992]
==rattlesnake.components.random_vibration_sys_id_environment:[2251:2294]
                try:
                    widget = getattr(parent, message)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Update Widget {message}: not found in UI")
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    @staticmethod
    def create_environment_template(
        environment_name: str, workbook: openpyxl.workbook.workbook.Workbook
    ):
        """Creates a template worksheet in an Excel workbook defining the
        environment.

        This function creates a template worksheet in an Excel workbook that
        when filled out could be read by the controller to re-create the
        environment.

        This function is the "write" counterpart to the
        ``set_parameters_from_template`` function in the ``RandomVibrationUI`` class,
        which reads the values from the template file to populate the user
        interface.

        Parameters
        ----------
        environment_name : str :
            The name of the environment that will specify the worksheet's name
        workbook : openpyxl.workbook.workbook.Workbook :
            A reference to an ``openpyxl`` workbook.

        """
        worksheet = workbook.create_sheet(environment_name)
        worksheet.cell(1, 1, "Control Type") (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2810:2818]
==rattlesnake.components.random_vibration_sys_id_environment:[3065:3073]
        environment_name, queue_container, acquisition_active, output_active
    )
    process_class.run()

    # Rejoin all the processes
    process_class.log("Joining Subprocesses")
    process_class.log("Joining Spectral Computation")
    spectral_proc.join() (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1949:1990]
==rattlesnake.components.sine_sys_id_environment:[2059:2077]
                try:
                    widget = getattr(parent, message)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Update Widget {message}: not found in UI")
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    @staticmethod
    def create_environment_template(
        environment_name: str, workbook: openpyxl.workbook.workbook.Workbook
    ):
        """Creates a template worksheet in an Excel workbook defining the
        environment.

        This function creates a template worksheet in an Excel workbook that
        when filled out could be read by the controller to re-create the
        environment.

        This function is the "write" counterpart to the
        ``set_parameters_from_template`` function in the ``ModalUI`` class,
        which reads the values from the template file to populate the user
        interface.

        Parameters
        ----------
        environment_name : str :
            The name of the environment that will specify the worksheet's name
        workbook : openpyxl.workbook.workbook.Workbook :
            A reference to an ``openpyxl`` workbook.

        """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[111:117]
==rattlesnake.components.time_environment:[87:95]
        self.environment_command_queue = environment_command_queue
        self.gui_update_queue = gui_update_queue
        self.controller_communication_queue = controller_communication_queue
        self.data_in_queue = data_in_queue
        self.data_out_queue = data_out_queue
        self.log_file_queue = log_file_queue (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1924:1930]
==rattlesnake.components.time_environment:[637:643]
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1938:1944]
==rattlesnake.components.time_environment:[626:632]
                try:
                    widget = getattr(parent, data)
                    break
                except AttributeError:
                    continue
            if widget is None: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1600:1606]
==rattlesnake.components.sine_sys_id_environment:[1679:1685]
            self.run_widget.start_test_button,
        ]:
            widget.setEnabled(enabled)
        for widget in [self.run_widget.stop_test_button]:
            widget.setEnabled(not enabled)
        if enabled: (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[567:573]
==rattlesnake.components.time_environment:[284:293]
        ]
        for plot_widget in plot_widgets:
            plot_item = plot_widget.getPlotItem()
            plot_item.showGrid(True, True, 0.25)
            plot_item.enableAutoRange()
            plot_item.getViewBox().enableAutoRange(enable=True) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2565:2571]
==rattlesnake.components.time_environment:[756:762]
        super().__init__(
            environment_name,
            queue_container.environment_command_queue,
            queue_container.gui_update_queue,
            queue_container.controller_communication_queue,
            queue_container.log_file_queue, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[202:208]
==rattlesnake.components.transient_sys_id_environment:[179:185]
        self.control_python_script = control_python_script
        self.control_python_function = control_python_function
        self.control_python_function_type = control_python_function_type
        self.control_python_function_parameters = control_python_function_parameters
        self.control_channel_indices = control_channel_indices
        self.output_channel_indices = output_channel_indices (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[334:340]
==rattlesnake.components.transient_sys_id_environment:[260:267]
        netcdf_group_handle.control_python_script = self.control_python_script
        netcdf_group_handle.control_python_function = self.control_python_function
        netcdf_group_handle.control_python_function_type = self.control_python_function_type
        netcdf_group_handle.control_python_function_parameters = (
            self.control_python_function_parameters
        ) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[1301:1307]
==rattlesnake.components.transient_sys_id_environment:[864:870]
        ]:
            widget.blockSignals(True)
            widget.clear()
            for i, control_name in enumerate(self.initialized_control_names):
                widget.addItem(f"{i + 1}: {control_name}")
            widget.blockSignals(False) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2193:2199]
==rattlesnake.components.transient_sys_id_environment:[1493:1499]
        elif message == "interactive_control_sysid_update":
            if self.interactive_control_law_widget is not None:
                self.interactive_control_law_widget.update_ui_sysid(*data)
        elif message == "interactive_control_update":
            if self.interactive_control_law_widget is not None:
                self.interactive_control_law_widget.update_ui_control(data) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2209:2215]
==rattlesnake.components.transient_sys_id_environment:[1499:1505]
        elif message == "enable_control":
            self.enable_control(True)
        elif message == "enable":
            widget = None
            for parent in [
                self.definition_widget, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sdynpy_system_virtual_hardware:[386:400]
==rattlesnake.components.state_space_virtual_hardware:[201:215]
                forces = np.zeros((self.force_buffer.shape[-1], self.times.size))
            self.force_buffer = np.concatenate((self.force_buffer, forces.T), axis=0)

        # Now extract a force that is the correct size
        this_force = self.force_buffer[: self.times.size]
        # And leave the rest for next time
        # Note we have to keep the last force sample still on the
        # buffer because it will be the next force sample we use
        self.force_buffer = self.force_buffer[self.times.size - 1 :]

        _, sys_out, x_out = signal.lsim(self.system, this_force, self.times, self.state)

        self.state[:] = x_out[-1]
 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.signal_generation_process:[76:84]
==rattlesnake.components.spectral_processing:[97:107]
        try:
            return np.all(
                [np.all(value == other.__dict__[field]) for field, value in self.__dict__.items()]
            )
        except (AttributeError, KeyError):
            return False

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[1198:1204]
==rattlesnake.components.transient_sys_id_environment:[869:875]
            widget.blockSignals(False)
        for widget in [self.prediction_widget.excitation_selector]:
            widget.blockSignals(True)
            widget.clear()
            for i, drive_name in enumerate(self.initialized_output_names):
                widget.addItem(f"{i + 1}: {drive_name}") (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2430:2436]
==rattlesnake.components.transient_sys_id_environment:[1804:1810]
        self.sysid_coherence = None
        self.sysid_response_cpsd = None
        self.sysid_reference_cpsd = None
        self.sysid_condition = None
        self.sysid_response_noise = None
        self.sysid_reference_noise = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2523:2529]
==rattlesnake.components.transient_sys_id_environment:[1836:1842]
            self.sysid_coherence = None
            self.sysid_response_cpsd = None
            self.sysid_reference_cpsd = None
            self.sysid_condition = None
            self.sysid_response_noise = None
            self.sysid_reference_noise = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[3759:3767]
==rattlesnake.components.transient_sys_id_environment:[2290:2297]
        except mp.queues.Empty:
            # print("Didn't Find Data")
            last_acquisition = False
        # See if we need to keep going
        if self.siggen_shutdown_achieved and last_acquisition:
            self.shutdown()
        else:
            self.queue_container.environment_command_queue.put( (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.time_environment:[648:689]
==rattlesnake.components.transient_sys_id_environment:[1541:1559]
                try:
                    widget = getattr(parent, message)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Update Widget {message}: not found in UI")
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    def set_parameters_from_template(self, worksheet): (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.report_pylint:[262:267]
==rattlesnake.cicd.report_pytest:[167:172]
                <div><strong>Generated:</strong> {timestamp_ext}</div>
                <div><strong>Run ID:</strong> <a href="https://github.com/{github_repo}/actions/runs/{run_id}"> {run_id}</a></div>
                <div><strong>Branch:</strong> <a href="https://github.com/{github_repo}/tree/{ref_name}"> {ref_name}</a></div>
                <div><strong>Commit:</strong> <a href="https://github.com/{github_repo}/commit/{github_sha}"> {github_sha[:7]}</a></div>
                <div><strong>Repository:</strong> <a href="https://github.com/{github_repo}">{github_repo}</a></div> (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.report_pylint:[409:414]
==rattlesnake.cicd.report_pytest:[246:251]
    --timestamp 20240101_120000_UTC \
    --run_id 1234567890 \
    --ref_name main \
    --github_sha abc123def456 \
    --github_repo owner/repo-name (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.cicd.reports_main_page:[115:133]
==rattlesnake.cicd.utilities:[167:172]
    try:
        with open(output_file, "w", encoding="utf-8") as f:
            f.write(html_content)
    except IOError as e:
        raise IOError(f'Error writing output file "{output_file}": {e}') from e (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_environment:[590:658]
==rattlesnake.components.abstract_message_process:[175:199]
                halt_flag = False
            # If we get a true value, stop.
            if halt_flag:
                self.log("Stopping Process")
                break

    def quit(self, data):  # pylint: disable=unused-argument
        """Returns True to stop the ``run`` while loop and exit the process

        Parameters
        ----------
        data : Ignored
            This parameter is not used by the function but must be present
            due to the calling signature of functions called through the
            ``command_map``

        Returns
        -------
        True :
            This function returns True to signal to the ``run`` while loop
            that it is time to close down the environment.

        """
        return True


def run_process(
    environment_name: str,
    input_queue: VerboseMessageQueue,
    gui_update_queue: Queue,
    controller_communication_queue: VerboseMessageQueue,
    log_file_queue: Queue,
    data_in_queue: Queue,
    data_out_queue: Queue,
    acquisition_active: mp.sharedctypes.Synchronized,
    output_active: mp.sharedctypes.Synchronized,
):
    """A function called by ``multiprocessing.Process`` to start the environment

    This function should not be called directly, but used as a template for
    other environments to start up.

    Parameters
    ----------
    environment_name : str :
        The name of the environment

    input_queue : VerboseMessageQueue :
        The command queue for the environment

    gui_update_queue : Queue :
        The queue that accepts GUI update ``(message,data)`` pairs.

    controller_communication_queue : VerboseMessageQueue :
        The queue where global instructions to the controller can be written

    log_file_queue : Queue :
        The queue where logging messages can be written

    data_in_queue : Queue :
        The queue from which the environment will receive data from the
        acquisition hardware

    data_out_queue : Queue :
        The queue to which the environment should write data so it will be output
        to the excitation devices in the output hardware

    """ (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_data_analysis:[161:166]
==rattlesnake.components.sine_sys_id_environment:[2658:2663]
            self.sysid_frf,
            self.sysid_coherence,
            self.sysid_response_cpsd,
            self.sysid_reference_cpsd,
            self.sysid_condition, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[1347:1352]
==rattlesnake.components.modal_environment:[1361:1366]
            this_environment_index = None
            for i, name in enumerate(self.data_acquisition_parameters.environment_names):
                var[i] = name
                if name == self.environment_name:
                    this_environment_index = i (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[337:342]
==rattlesnake.components.random_vibration_sys_id_environment:[499:504]
        super().__init__(
            environment_name,
            environment_command_queue,
            controller_communication_queue,
            log_file_queue, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.abstract_sysid_environment:[2575:2580]
==rattlesnake.components.random_vibration_sys_id_environment:[2917:2922]
        if (
            self.siggen_shutdown_achieved
            and self.collector_shutdown_achieved
            and self.spectral_shutdown_achieved
            and self.analysis_shutdown_achieved (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[59:66]
==rattlesnake.components.data_physics_interface:[39:46]
    DISCONNECTED = -1
    IDLE = 0
    INIT = 1
    RUNNING = 2
    STOPPED = 3

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.data_physics_dp900_interface:[69:76]
==rattlesnake.components.data_physics_interface:[49:56]
    AC_DIFFERENTIAL = 0
    DC_DIFFERENTIAL = 1
    AC_SINGLE_ENDED = 2
    DC_SINGLE_ENDED = 3
    AC_COUPLED_IEPE = 4

 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.exodus_modal_solution_hardware:[234:243]
==rattlesnake.components.sdynpy_frf_virtual_hardware:[324:333]
            try:
                forces = self.queue.get(timeout=self.frame_time)
            except mp.queues.Empty:
                # If we don't get an output in time, this likely means output has stopped
                # so just put zeros.
                forces = np.zeros((self.force_buffer.shape[-1], self.times.size))
            self.force_buffer = np.concatenate((self.force_buffer, forces.T), axis=0)

        # Now extract a force that is the correct size (including past samples for convolution) (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.exodus_modal_solution_hardware:[91:96]
==rattlesnake.components.state_space_virtual_hardware:[78:83]
        self.frame_time = None
        self.queue = queue
        self.force_buffer = None
        self.integration_oversample = None
        self.acquisition_delay = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[794:801]
==rattlesnake.components.random_vibration_sys_id_environment:[568:573]
        for plot_widget in plot_widgets:
            plot_item = plot_widget.getPlotItem()
            plot_item.showGrid(True, True, 0.25)
            plot_item.enableAutoRange()
            plot_item.getViewBox().enableAutoRange(enable=True)

        # Disable the currently inactive portions of the definition layout (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[2781:2786]
==rattlesnake.components.random_vibration_sys_id_environment:[3037:3042]
    siggen_proc = mp.Process(
        target=signal_generation_process,
        args=(
            environment_name,
            queue_container.signal_generation_command_queue, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[644:649]
==rattlesnake.components.sine_sys_id_environment:[531:536]
        super().__init__(
            environment_name,
            environment_command_queue,
            controller_communication_queue,
            log_file_queue, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.modal_environment:[1918:1923]
==rattlesnake.components.transient_sys_id_environment:[1501:1506]
        elif message == "enable":
            widget = None
            for parent in [
                self.definition_widget,
                self.run_widget, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[206:212]
==rattlesnake.components.sine_sys_id_environment:[2568:2574]
            self.sysid_frf,  # Transfer Functions
            self.sysid_response_noise,  # Noise levels and correlation
            self.sysid_reference_noise,  # from the system identification
            self.sysid_response_cpsd,  # Response levels and correlation
            self.sysid_reference_cpsd,  # from the system identification
            self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[228:234]
==rattlesnake.components.sine_sys_id_environment:[2838:2844]
                self.sysid_frf,  # Transfer Functions
                self.sysid_response_noise,  # Noise levels and correlation
                self.sysid_reference_noise,  # from the system identification
                self.sysid_response_cpsd,  # Response levels and correlation
                self.sysid_reference_cpsd,  # from the system identification
                self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[207:212]
==rattlesnake.components.transient_sys_id_environment:[1876:1881]
                    self.sysid_response_noise,  # Noise levels and correlation
                    self.sysid_reference_noise,  # from the system identification
                    self.sysid_response_cpsd,  # Response levels and correlation
                    self.sysid_reference_cpsd,  # from the system identification
                    self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[229:234]
==rattlesnake.components.transient_sys_id_environment:[1898:1903]
                    self.sysid_response_noise,  # Noise levels and correlation
                    self.sysid_reference_noise,  # from the system identification
                    self.sysid_response_cpsd,  # Response levels and correlation
                    self.sysid_reference_cpsd,  # from the system identification
                    self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[245:250]
==rattlesnake.components.transient_sys_id_environment:[1975:1980]
                    self.sysid_response_noise,  # Noise levels and correlation
                    self.sysid_reference_noise,  # from the system identification
                    self.sysid_response_cpsd,  # Response levels and correlation
                    self.sysid_reference_cpsd,  # from the system identification
                    self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_data_analysis:[284:289]
==rattlesnake.components.transient_sys_id_environment:[1998:2003]
                self.sysid_response_noise,  # Noise levels and correlation
                self.sysid_reference_noise,  # from the system identification
                self.sysid_response_cpsd,  # Response levels and correlation
                self.sysid_reference_cpsd,  # from the system identification
                self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.random_vibration_sys_id_environment:[2455:2460]
==rattlesnake.components.sine_sys_id_environment:[2123:2128]
            if value is None or (isinstance(value, str) and value.strip() == ""):
                break
            item = self.definition_widget.control_channels_selector.item(int(value) - 1)
            item.setCheckState(Qt.Checked)
            column_index += 1 (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sdynpy_frf_virtual_hardware:[135:140]
==rattlesnake.components.sdynpy_system_virtual_hardware:[120:125]
        self.integration_oversample = None
        self.response_channels: np.ndarray
        self.output_channels: np.ndarray
        self.response_channels = None
        self.output_channels = None (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2051:2077]
==rattlesnake.components.transient_sys_id_environment:[1533:1559]
        else:
            widget = None
            for parent in [
                self.definition_widget,
                self.run_widget,
                self.system_id_widget,
                self.prediction_widget,
            ]:
                try:
                    widget = getattr(parent, message)
                    break
                except AttributeError:
                    continue
            if widget is None:
                raise ValueError(f"Cannot Update Widget {message}: not found in UI")
            if isinstance(widget, QtWidgets.QDoubleSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QSpinBox):
                widget.setValue(data)
            elif isinstance(widget, QtWidgets.QLineEdit):
                widget.setText(data)
            elif isinstance(widget, QtWidgets.QListWidget):
                widget.clear()
                widget.addItems([f"{d:.3f}" for d in data])

    def set_parameters_from_template(self, worksheet): (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2569:2574]
==rattlesnake.components.transient_sys_id_environment:[2016:2021]
                                    self.sysid_response_noise,
                                    self.sysid_reference_noise,
                                    self.sysid_response_cpsd,
                                    self.sysid_reference_cpsd,
                                    self.sysid_coherence, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.sine_sys_id_environment:[2839:2844]
==rattlesnake.components.transient_sys_id_environment:[2043:2048]
                self.sysid_response_noise,  # Noise levels and correlation
                self.sysid_reference_noise,  # from the system identification
                self.sysid_response_cpsd,  # Response levels and correlation
                self.sysid_reference_cpsd,  # from the system identification
                self.sysid_coherence,  # Coherence from the system identification (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0801: Similar lines in 2 files
==rattlesnake.components.time_environment:[234:239]
==rattlesnake.components.transient_sys_id_environment:[351:356]
        super().__init__(
            environment_name,
            environment_command_queue,
            controller_communication_queue,
            log_file_queue, (duplicate-code)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.abstract_sysid_environment -> rattlesnake.components.environments -> rattlesnake.components.random_vibration_sys_id_environment) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.abstract_sysid_data_analysis -> rattlesnake.components.abstract_sysid_environment) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.environments -> rattlesnake.components.random_vibration_sys_id_environment -> rattlesnake.components.ui_utilities) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.random_vibration_sys_id_data_analysis -> rattlesnake.components.random_vibration_sys_id_environment) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.abstract_sysid_data_analysis -> rattlesnake.components.abstract_sysid_environment -> rattlesnake.components.environments -> rattlesnake.components.random_vibration_sys_id_environment -> rattlesnake.components.random_vibration_sys_id_data_analysis) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.environments -> rattlesnake.components.modal_environment -> rattlesnake.components.ui_utilities) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.abstract_sysid_data_analysis -> rattlesnake.components.abstract_sysid_environment -> rattlesnake.components.environments -> rattlesnake.components.sine_sys_id_environment) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.abstract_sysid_environment -> rattlesnake.components.environments -> rattlesnake.components.sine_sys_id_environment) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.environments -> rattlesnake.components.sine_sys_id_environment -> rattlesnake.components.ui_utilities) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.environments -> rattlesnake.components.sine_sys_id_environment -> rattlesnake.components.sine_sys_id_utilities -> rattlesnake.components.ui_utilities) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.environments -> rattlesnake.components.time_environment -> rattlesnake.components.ui_utilities) (cyclic-import)
src/rattlesnake/components/utilities.py:1:0: R0401: Cyclic import (rattlesnake.components.abstract_sysid_environment -> rattlesnake.components.environments -> rattlesnake.components.transient_sys_id_environment) (cyclic-import)


Report
======
14946 statements analysed.

Statistics by type
------------------

+---------+-------+-----------+-----------+------------+---------+
|type     |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module   |44     |NC         |NC         |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|class    |129    |NC         |NC         |100.00      |0.00     |
+---------+-------+-----------+-----------+------------+---------+
|method   |1041   |NC         |NC         |100.00      |0.67     |
+---------+-------+-----------+-----------+------------+---------+
|function |87     |NC         |NC         |98.85       |0.00     |
+---------+-------+-----------+-----------+------------+---------+



External dependencies
---------------------
::

    netCDF4 (rattlesnake.components.abstract_environment,rattlesnake.components.abstract_sysid_environment,rattlesnake.components.exodus_modal_solution_hardware,rattlesnake.components.modal_environment,rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.streaming,rattlesnake.components.time_environment,rattlesnake.components.transient_sys_id_environment,rattlesnake.components.user_interface)
    nidaqmx (rattlesnake.components.nidaqmx_hardware_multitask)
      \-constants (rattlesnake.components.nidaqmx_hardware_multitask)
      \-stream_readers (rattlesnake.components.nidaqmx_hardware_multitask)
      \-stream_writers (rattlesnake.components.nidaqmx_hardware_multitask)
    numpy (rattlesnake.components.abstract_control_law,rattlesnake.components.abstract_hardware,rattlesnake.components.abstract_sysid_environment,rattlesnake.components.acquisition,rattlesnake.components.data_collector,rattlesnake.components.data_physics_dp900_hardware,rattlesnake.components.data_physics_dp900_interface,rattlesnake.components.data_physics_hardware,rattlesnake.components.data_physics_interface,rattlesnake.components.exodus_modal_solution_hardware,rattlesnake.components.lanxi_hardware_multiprocessing,rattlesnake.components.modal_environment,rattlesnake.components.nidaqmx_hardware_multitask,rattlesnake.components.output,rattlesnake.components.random_vibration_sys_id_data_analysis,rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.random_vibration_sys_id_utilities,rattlesnake.components.sdynpy_frf_virtual_hardware,rattlesnake.components.sdynpy_system_virtual_hardware,rattlesnake.components.signal_generation,rattlesnake.components.signal_generation_process,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.spectral_processing,rattlesnake.components.state_space_virtual_hardware,rattlesnake.components.streaming,rattlesnake.components.time_environment,rattlesnake.components.transient_sys_id_environment,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface,rattlesnake.components.utilities)
      \-ctypeslib (rattlesnake.components.data_physics_dp900_interface,rattlesnake.components.data_physics_interface)
    openpyxl (rattlesnake.components.abstract_environment,rattlesnake.components.abstract_sysid_environment,rattlesnake.components.modal_environment,rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.time_environment,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface)
    pyqtgraph (rattlesnake.components.abstract_sysid_environment,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface)
    pytz (rattlesnake.cicd.utilities)
    qtpy 
      \-QtCore (rattlesnake.components.modal_environment,rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.time_environment,rattlesnake.components.transient_sys_id_environment,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface)
      \-QtGui (rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface)
      \-QtWidgets (rattlesnake.components.abstract_sysid_environment,rattlesnake.components.modal_environment,rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.time_environment,rattlesnake.components.transient_sys_id_environment,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface,rattlesnake.components.utilities)
      \-uic (rattlesnake.components.abstract_sysid_environment,rattlesnake.components.modal_environment,rattlesnake.components.random_vibration_sys_id_environment,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.time_environment,rattlesnake.components.transient_sys_id_environment,rattlesnake.components.ui_utilities,rattlesnake.components.user_interface)
    requests (rattlesnake.components.lanxi_hardware_multiprocessing,rattlesnake.components.ui_utilities)
    scipy 
      \-fft (rattlesnake.components.data_collector)
      \-interpolate (rattlesnake.components.ui_utilities)
      \-io (rattlesnake.components.abstract_sysid_environment,rattlesnake.components.random_vibration_sys_id_utilities,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.state_space_virtual_hardware,rattlesnake.components.ui_utilities)
      \-signal (rattlesnake.components.data_collector,rattlesnake.components.exodus_modal_solution_hardware,rattlesnake.components.modal_environment,rattlesnake.components.sdynpy_frf_virtual_hardware,rattlesnake.components.sdynpy_system_virtual_hardware,rattlesnake.components.signal_generation,rattlesnake.components.sine_sys_id_environment,rattlesnake.components.sine_sys_id_utilities,rattlesnake.components.state_space_virtual_hardware,rattlesnake.components.transient_sys_id_environment,rattlesnake.components.utilities)
      | \-windows (rattlesnake.components.sine_sys_id_utilities)
      \-sparse (rattlesnake.components.sine_sys_id_utilities)
      | \-linalg (rattlesnake.components.sine_sys_id_utilities)
      \-stats (rattlesnake.components.signal_generation)



39704 lines have been analyzed

Raw metrics
-----------

+----------+-------+------+---------+-----------+
|type      |number |%     |previous |difference |
+==========+=======+======+=========+===========+
|code      |25705  |64.74 |NC       |NC         |
+----------+-------+------+---------+-----------+
|docstring |9822   |24.74 |NC       |NC         |
+----------+-------+------+---------+-----------+
|comment   |1764   |4.44  |NC       |NC         |
+----------+-------+------+---------+-----------+
|empty     |2413   |6.08  |NC       |NC         |
+----------+-------+------+---------+-----------+



Duplication
-----------

+-------------------------+------+---------+-----------+
|                         |now   |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines      |0     |NC       |NC         |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |NC       |NC         |
+-------------------------+------+---------+-----------+



Messages by category
--------------------

+-----------+-------+---------+-----------+
|type       |number |previous |difference |
+===========+=======+=========+===========+
|convention |70     |NC       |NC         |
+-----------+-------+---------+-----------+
|refactor   |707    |NC       |NC         |
+-----------+-------+---------+-----------+
|warning    |31     |NC       |NC         |
+-----------+-------+---------+-----------+
|error      |0      |NC       |NC         |
+-----------+-------+---------+-----------+



% errors / warnings by module
-----------------------------

+-------------------------------------------------------------+------+--------+---------+-----------+
|module                                                       |error |warning |refactor |convention |
+=============================================================+======+========+=========+===========+
|rattlesnake.components.signal_generation                     |0.00  |22.58   |2.83     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.abstract_sysid_environment            |0.00  |16.13   |3.39     |5.71       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.lanxi_hardware_multiprocessing        |0.00  |12.90   |2.83     |2.86       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.user_interface                        |0.00  |9.68    |5.37     |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.ui_utilities                          |0.00  |9.68    |3.96     |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.data_physics_dp900_hardware           |0.00  |6.45    |0.71     |4.29       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.cicd.report_pylint                               |0.00  |6.45    |0.57     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.random_vibration_sys_id_environment   |0.00  |3.23    |3.96     |7.14       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.cicd.report_pytest                               |0.00  |3.23    |0.57     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.exodus_modal_solution_hardware        |0.00  |3.23    |0.42     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.cicd.reports_main_page                           |0.00  |3.23    |0.00     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.cicd.badge_color_coverage                        |0.00  |3.23    |0.00     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.utilities                             |0.00  |0.00    |32.25    |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.sine_sys_id_utilities                 |0.00  |0.00    |10.47    |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.sine_sys_id_environment               |0.00  |0.00    |6.22     |21.43      |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.transient_sys_id_environment          |0.00  |0.00    |4.10     |2.86       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.modal_environment                     |0.00  |0.00    |3.39     |8.57       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.spectral_processing                   |0.00  |0.00    |3.25     |7.14       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.data_collector                        |0.00  |0.00    |2.69     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.time_environment                      |0.00  |0.00    |1.41     |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.acquisition                           |0.00  |0.00    |1.27     |11.43      |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.output                                |0.00  |0.00    |1.13     |11.43      |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.abstract_environment                  |0.00  |0.00    |1.13     |4.29       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.signal_generation_process             |0.00  |0.00    |1.13     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.nidaqmx_hardware_multitask            |0.00  |0.00    |0.99     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.sdynpy_system_virtual_hardware        |0.00  |0.00    |0.85     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.data_physics_interface                |0.00  |0.00    |0.85     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.data_physics_dp900_interface          |0.00  |0.00    |0.71     |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.random_vibration_sys_id_data_analysis |0.00  |0.00    |0.71     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.abstract_sysid_data_analysis          |0.00  |0.00    |0.71     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.cicd.utilities                                   |0.00  |0.00    |0.42     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.state_space_virtual_hardware          |0.00  |0.00    |0.28     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.sdynpy_frf_virtual_hardware           |0.00  |0.00    |0.28     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.data_physics_hardware                 |0.00  |0.00    |0.28     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.abstract_interactive_control_law      |0.00  |0.00    |0.28     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.abstract_control_law                  |0.00  |0.00    |0.28     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.streaming                             |0.00  |0.00    |0.14     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.random_vibration_sys_id_utilities     |0.00  |0.00    |0.14     |0.00       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.cicd.badge_color_pylint                          |0.00  |0.00    |0.00     |2.86       |
+-------------------------------------------------------------+------+--------+---------+-----------+
|rattlesnake.components.environments                          |0.00  |0.00    |0.00     |1.43       |
+-------------------------------------------------------------+------+--------+---------+-----------+



Messages
--------

+---------------------------------+------------+
|message id                       |occurrences |
+=================================+============+
|duplicate-code                   |191         |
+---------------------------------+------------+
|too-many-arguments               |72          |
+---------------------------------+------------+
|too-many-positional-arguments    |71          |
+---------------------------------+------------+
|too-many-locals                  |56          |
+---------------------------------+------------+
|too-many-instance-attributes     |55          |
+---------------------------------+------------+
|too-many-statements              |48          |
+---------------------------------+------------+
|too-many-branches                |47          |
+---------------------------------+------------+
|no-else-return                   |35          |
+---------------------------------+------------+
|line-too-long                    |35          |
+---------------------------------+------------+
|too-few-public-methods           |18          |
+---------------------------------+------------+
|fixme                            |18          |
+---------------------------------+------------+
|import-outside-toplevel          |17          |
+---------------------------------+------------+
|consider-using-max-builtin       |14          |
+---------------------------------+------------+
|use-a-generator                  |13          |
+---------------------------------+------------+
|too-many-lines                   |12          |
+---------------------------------+------------+
|cyclic-import                    |12          |
+---------------------------------+------------+
|unnecessary-comprehension        |9           |
+---------------------------------+------------+
|too-many-public-methods          |9           |
+---------------------------------+------------+
|simplifiable-if-statement        |8           |
+---------------------------------+------------+
|consider-using-min-builtin       |7           |
+---------------------------------+------------+
|broad-exception-caught           |7           |
+---------------------------------+------------+
|consider-using-generator         |6           |
+---------------------------------+------------+
|no-else-raise                    |5           |
+---------------------------------+------------+
|consider-using-in                |5           |
+---------------------------------+------------+
|arguments-differ                 |5           |
+---------------------------------+------------+
|redefined-argument-from-local    |4           |
+---------------------------------+------------+
|invalid-name                     |4           |
+---------------------------------+------------+
|simplifiable-if-expression       |3           |
+---------------------------------+------------+
|inconsistent-return-statements   |3           |
+---------------------------------+------------+
|consider-using-from-import       |3           |
+---------------------------------+------------+
|useless-return                   |2           |
+---------------------------------+------------+
|super-with-arguments             |2           |
+---------------------------------+------------+
|no-else-continue                 |2           |
+---------------------------------+------------+
|consider-using-with              |2           |
+---------------------------------+------------+
|consider-using-set-comprehension |2           |
+---------------------------------+------------+
|unused-variable                  |1           |
+---------------------------------+------------+
|too-many-nested-blocks           |1           |
+---------------------------------+------------+
|too-many-boolean-expressions     |1           |
+---------------------------------+------------+
|no-else-break                    |1           |
+---------------------------------+------------+
|missing-function-docstring       |1           |
+---------------------------------+------------+
|consider-using-f-string          |1           |
+---------------------------------+------------+




-----------------------------------
Your code has been rated at 9.46/10