diff --git a/benchmark_accuracy.py b/benchmark_accuracy.py index 8be0ef0..d7c752f 100644 --- a/benchmark_accuracy.py +++ b/benchmark_accuracy.py @@ -9,21 +9,23 @@ 4. Obstacle clearance """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - run_arm_simulation, - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, + run_arm_simulation, ) -import pandas as pd def run_arm_with_lightlike_damping( diff --git a/benchmark_adaptive_twophase.py b/benchmark_adaptive_twophase.py index ad2b8d5..3e8ff4b 100644 --- a/benchmark_adaptive_twophase.py +++ b/benchmark_adaptive_twophase.py @@ -14,20 +14,22 @@ This is Priority 1 from UPGRADE_ROADMAP.md """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( adaptive_control_parameters, - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, compute_ds2, compute_gradient, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def run_fixed_eta_control( diff --git a/benchmark_coherent_decomposition.py b/benchmark_coherent_decomposition.py index 05f3510..4bfe81c 100644 --- a/benchmark_coherent_decomposition.py +++ b/benchmark_coherent_decomposition.py @@ -10,8 +10,8 @@ - Coherent Filtering: Decompose and suppress incoherent noise """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_decomposition import ( coherent_control_step, diff --git a/benchmark_dynamic.py b/benchmark_dynamic.py index 4bb765b..8aef420 100644 --- a/benchmark_dynamic.py +++ b/benchmark_dynamic.py @@ -13,20 +13,22 @@ observer should provide significant benefit. """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def run_dynamic_baseline( diff --git a/benchmark_dynamic_adaptation.py b/benchmark_dynamic_adaptation.py index 2fb93e0..dbfbd6e 100644 --- a/benchmark_dynamic_adaptation.py +++ b/benchmark_dynamic_adaptation.py @@ -14,8 +14,8 @@ - Medium robot (baseline) """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_adaptive import adaptive_control_step diff --git a/benchmark_geodesic_planning.py b/benchmark_geodesic_planning.py index 05687f9..240e828 100644 --- a/benchmark_geodesic_planning.py +++ b/benchmark_geodesic_planning.py @@ -14,8 +14,8 @@ - Corridor navigation (obstacles on sides) """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_geodesic import ( Obstacle, diff --git a/benchmark_landing.py b/benchmark_landing.py index fcbdfd5..19e2d7f 100644 --- a/benchmark_landing.py +++ b/benchmark_landing.py @@ -21,20 +21,22 @@ - Safety critical (oscillations = crash) """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def run_landing_baseline( diff --git a/benchmark_mars_landing.py b/benchmark_mars_landing.py index a773de6..89701bf 100644 --- a/benchmark_mars_landing.py +++ b/benchmark_mars_landing.py @@ -23,20 +23,22 @@ - One shot → stability > speed """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def run_mars_baseline( diff --git a/benchmark_moving_targets.py b/benchmark_moving_targets.py index 98753c8..5578bad 100644 --- a/benchmark_moving_targets.py +++ b/benchmark_moving_targets.py @@ -9,12 +9,12 @@ - Predictive (Lorentz): Estimate velocity and move toward predicted position """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_lorentz import ( - moving_target_control_step, estimate_target_velocity, + moving_target_control_step, ) diff --git a/benchmark_qec.py b/benchmark_qec.py index a8b3bda..0c34bb3 100644 --- a/benchmark_qec.py +++ b/benchmark_qec.py @@ -14,13 +14,13 @@ - High sensor failure rate (50%) """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_qec import ( - simulate_sensor_array, correct_measurement_errors, qec_control_step, + simulate_sensor_array, ) diff --git a/benchmark_scaling.py b/benchmark_scaling.py index 83ab4f4..da154f3 100644 --- a/benchmark_scaling.py +++ b/benchmark_scaling.py @@ -13,20 +13,22 @@ 5. Optimized oscillation detection parameters """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def run_arm_with_tuned_lightlike( diff --git a/benchmark_stereo_lorentz.py b/benchmark_stereo_lorentz.py index f6be1ba..842300a 100644 --- a/benchmark_stereo_lorentz.py +++ b/benchmark_stereo_lorentz.py @@ -18,25 +18,27 @@ not just Euclidean position - this is where lightlike observer should work! """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) from src.eigen_lorentz import ( - stereo_to_lorentz, lorentz_to_stereo, regime_classification, + stereo_to_lorentz, ) -import pandas as pd def simulate_stereo_measurement(true_target, noise_level=0.01): diff --git a/benchmark_terminal_descent.py b/benchmark_terminal_descent.py index d33c0c8..a1a4ea8 100644 --- a/benchmark_terminal_descent.py +++ b/benchmark_terminal_descent.py @@ -16,20 +16,22 @@ - Focus on final precision """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def run_terminal_descent( diff --git a/benchmark_visual_servoing.py b/benchmark_visual_servoing.py index 4a24461..2e0b494 100644 --- a/benchmark_visual_servoing.py +++ b/benchmark_visual_servoing.py @@ -18,20 +18,22 @@ control better than standard approaches. """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, ) -import pandas as pd def add_stereo_noise(target_pos, noise_level=0.01, occlusion_prob=0.0, tick=0): diff --git a/benchmark_weak_stereo.py b/benchmark_weak_stereo.py index e9546f1..612674f 100644 --- a/benchmark_weak_stereo.py +++ b/benchmark_weak_stereo.py @@ -9,8 +9,8 @@ - Weak measurement: Preserves coherence → continuous observations → smooth control """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_weak_measurement import ( coherence_metric, diff --git a/benchmark_weak_stereo_noisy.py b/benchmark_weak_stereo_noisy.py index f9b6ee6..668b3ee 100644 --- a/benchmark_weak_stereo_noisy.py +++ b/benchmark_weak_stereo_noisy.py @@ -9,8 +9,8 @@ to the noisy observation and create jittery motion. """ -import numpy as np import matplotlib.pyplot as plt +import numpy as np from src.eigen_weak_measurement import ( coherence_metric, diff --git a/benchmark_xor.py b/benchmark_xor.py index 9909c94..ec4784b 100644 --- a/benchmark_xor.py +++ b/benchmark_xor.py @@ -6,21 +6,23 @@ This tests if the lightlike observer can actually break it. """ -import numpy as np import sys +import numpy as np + sys.path.insert(0, "/home/user/Eigen-Geometric-Control") +import pandas as pd + from src import ( - run_xor_simulation, - detect_oscillation, - lightlike_damping_factor, - forward_kinematics, + compute_change_stability, compute_ds2, compute_gradient, - compute_change_stability, + detect_oscillation, + forward_kinematics, + lightlike_damping_factor, + run_xor_simulation, ) -import pandas as pd def run_xor_with_lightlike_damping( diff --git a/src/__init__.py b/src/__init__.py index 9889195..a7fe2fb 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -12,6 +12,14 @@ - Stereo vision integration via relativistic transformations """ +from .eigen_adaptive import ( + adaptive_control_step, + detect_system_parameters, + estimate_characteristic_velocity, + estimate_natural_timescale, + estimate_oscillation_threshold, + renormalize_lorentz_state, +) from .eigen_arm_control import run_arm_simulation from .eigen_core import ( compute_change_stability, @@ -20,6 +28,22 @@ forward_kinematics, jacobian, ) +from .eigen_decomposition import ( + coherence_score, + coherent_control_step, + compute_autocorrelation, + decompose_signal, + filtered_observation, +) +from .eigen_geodesic import ( + Obstacle, + christoffel_symbols, + compute_geodesic_path, + geodesic_acceleration, + geodesic_control_step, + metric_gradient, + metric_tensor, +) from .eigen_lorentz import ( LorentzState, apply_boost, @@ -39,6 +63,18 @@ stereo_to_lorentz, verify_lorentz_invariance, ) +from .eigen_meta_control import ( + meta_update_parameters, + observe_parameter_performance, + self_tuning_control_step, +) +from .eigen_multi_agent import ( + check_convergence, + collective_lightlike_observer, + multi_agent_step, + paradox_mediated_damping, + simulate_multi_agent, +) from .eigen_noperthedron import ( analyze_results, check_rupert_property, @@ -49,6 +85,15 @@ spatial_overlap, vertices_to_bitstring, ) +from .eigen_qec import ( + apply_measurement_errors, + compute_parity_checks, + correct_measurement_errors, + detect_error_location, + encode_state_redundant, + qec_control_step, + simulate_sensor_array, +) from .eigen_similarity import ( adaptive_control_parameters, compare_self_similarity, @@ -60,18 +105,6 @@ regime_from_similarity, standard_cosine_similarity, ) -from .eigen_meta_control import ( - meta_update_parameters, - observe_parameter_performance, - self_tuning_control_step, -) -from .eigen_multi_agent import ( - check_convergence, - collective_lightlike_observer, - multi_agent_step, - paradox_mediated_damping, - simulate_multi_agent, -) from .eigen_weak_measurement import ( accumulate_weak_measurements, apply_weak_measurement, @@ -80,39 +113,6 @@ weak_measurement_operator, weak_stereo_control_step, ) -from .eigen_decomposition import ( - coherence_score, - coherent_control_step, - compute_autocorrelation, - decompose_signal, - filtered_observation, -) -from .eigen_adaptive import ( - adaptive_control_step, - detect_system_parameters, - estimate_characteristic_velocity, - estimate_natural_timescale, - estimate_oscillation_threshold, - renormalize_lorentz_state, -) -from .eigen_geodesic import ( - Obstacle, - christoffel_symbols, - compute_geodesic_path, - geodesic_acceleration, - geodesic_control_step, - metric_gradient, - metric_tensor, -) -from .eigen_qec import ( - apply_measurement_errors, - compute_parity_checks, - correct_measurement_errors, - detect_error_location, - encode_state_redundant, - qec_control_step, - simulate_sensor_array, -) from .eigen_xor_rotation import run_xor_simulation __all__ = [ diff --git a/src/eigen_adaptive.py b/src/eigen_adaptive.py index e7a77f2..9765990 100644 --- a/src/eigen_adaptive.py +++ b/src/eigen_adaptive.py @@ -15,7 +15,7 @@ The "c" parameter and thresholds should emerge from data, not be hardcoded. """ -from typing import List, Tuple, Dict +from typing import Dict, List, Tuple import numpy as np diff --git a/src/eigen_decomposition.py b/src/eigen_decomposition.py index 5bbf9a0..909c059 100644 --- a/src/eigen_decomposition.py +++ b/src/eigen_decomposition.py @@ -19,7 +19,7 @@ - Computational savings (don't process noise) """ -from typing import Tuple, List +from typing import List, Tuple import numpy as np diff --git a/src/eigen_geodesic.py b/src/eigen_geodesic.py index 83695d9..687adb9 100644 --- a/src/eigen_geodesic.py +++ b/src/eigen_geodesic.py @@ -16,7 +16,7 @@ - Integration with lightlike damping framework """ -from typing import List, Tuple, Optional +from typing import List, Optional, Tuple import numpy as np diff --git a/src/eigen_qec.py b/src/eigen_qec.py index 08eedeb..17da8a2 100644 --- a/src/eigen_qec.py +++ b/src/eigen_qec.py @@ -22,7 +22,7 @@ - Extended to continuous measurements via thresholding """ -from typing import List, Tuple, Optional +from typing import List, Optional, Tuple import numpy as np diff --git a/tests/test_coherent_decomposition.py b/tests/test_coherent_decomposition.py index 8e67c10..2458e1e 100644 --- a/tests/test_coherent_decomposition.py +++ b/tests/test_coherent_decomposition.py @@ -11,11 +11,11 @@ import pytest from src.eigen_decomposition import ( - compute_autocorrelation, coherence_score, + coherent_control_step, + compute_autocorrelation, decompose_signal, filtered_observation, - coherent_control_step, ) @@ -349,11 +349,11 @@ def test_filtering_reduces_noise_sensitivity(self): def test_module_imports(): """Verify all functions are importable.""" from src.eigen_decomposition import ( - compute_autocorrelation, coherence_score, + coherent_control_step, + compute_autocorrelation, decompose_signal, filtered_observation, - coherent_control_step, ) assert callable(compute_autocorrelation) diff --git a/tests/test_dynamic_invariant.py b/tests/test_dynamic_invariant.py index b24889f..ef59fcb 100644 --- a/tests/test_dynamic_invariant.py +++ b/tests/test_dynamic_invariant.py @@ -11,11 +11,11 @@ import pytest from src.eigen_adaptive import ( + adaptive_control_step, + detect_system_parameters, estimate_characteristic_velocity, - estimate_oscillation_threshold, estimate_natural_timescale, - detect_system_parameters, - adaptive_control_step, + estimate_oscillation_threshold, renormalize_lorentz_state, ) @@ -397,11 +397,11 @@ def test_adaptation_helps_different_scales(self): def test_module_imports(): """Verify all functions are importable.""" from src.eigen_adaptive import ( + adaptive_control_step, + detect_system_parameters, estimate_characteristic_velocity, - estimate_oscillation_threshold, estimate_natural_timescale, - detect_system_parameters, - adaptive_control_step, + estimate_oscillation_threshold, renormalize_lorentz_state, ) diff --git a/tests/test_geodesic_planning.py b/tests/test_geodesic_planning.py index 74ac4da..5926318 100644 --- a/tests/test_geodesic_planning.py +++ b/tests/test_geodesic_planning.py @@ -12,12 +12,12 @@ from src.eigen_geodesic import ( Obstacle, - metric_tensor, - metric_gradient, christoffel_symbols, - geodesic_acceleration, compute_geodesic_path, + geodesic_acceleration, geodesic_control_step, + metric_gradient, + metric_tensor, ) @@ -408,12 +408,12 @@ def test_module_imports(): """Verify all functions are importable.""" from src.eigen_geodesic import ( Obstacle, - metric_tensor, - metric_gradient, christoffel_symbols, - geodesic_acceleration, compute_geodesic_path, + geodesic_acceleration, geodesic_control_step, + metric_gradient, + metric_tensor, ) assert Obstacle is not None diff --git a/tests/test_moving_targets.py b/tests/test_moving_targets.py index fc51c0a..6b3c25a 100644 --- a/tests/test_moving_targets.py +++ b/tests/test_moving_targets.py @@ -11,10 +11,10 @@ import pytest from src.eigen_lorentz import ( + apply_boost, estimate_target_velocity, inverse_boost, moving_target_control_step, - apply_boost, ) diff --git a/tests/test_qec.py b/tests/test_qec.py index ab122d9..9a99f29 100644 --- a/tests/test_qec.py +++ b/tests/test_qec.py @@ -11,11 +11,11 @@ import pytest from src.eigen_qec import ( - encode_state_redundant, apply_measurement_errors, compute_parity_checks, - detect_error_location, correct_measurement_errors, + detect_error_location, + encode_state_redundant, qec_control_step, simulate_sensor_array, ) @@ -427,11 +427,11 @@ def test_naive_average_fails_with_outlier(self): def test_module_imports(): """Verify all functions are importable.""" from src.eigen_qec import ( - encode_state_redundant, apply_measurement_errors, compute_parity_checks, - detect_error_location, correct_measurement_errors, + detect_error_location, + encode_state_redundant, qec_control_step, simulate_sensor_array, )