feat: Add Study Insights module (SYS_16) for physics visualizations
Introduces a new plugin architecture for study-specific physics visualizations, separating "optimizer perspective" (Analysis) from "engineer perspective" (Insights). New module: optimization_engine/insights/ - base.py: StudyInsight base class, InsightConfig, InsightResult, registry - zernike_wfe.py: Mirror WFE with 3D surface and Zernike decomposition - stress_field.py: Von Mises stress contours with safety factors - modal_analysis.py: Natural frequencies and mode shapes - thermal_field.py: Temperature distribution visualization - design_space.py: Parameter-objective landscape exploration Features: - 5 insight types: zernike_wfe, stress_field, modal, thermal, design_space - CLI: python -m optimization_engine.insights generate <study> - Standalone HTML generation with Plotly - Enhanced Zernike viz: Turbo colorscale, smooth shading, 0.5x AMP - Dashboard API fix: Added include_coefficients param to extract_relative() Documentation: - docs/protocols/system/SYS_16_STUDY_INSIGHTS.md - Updated ATOMIZER_CONTEXT.md (v1.7) - Updated 01_CHEATSHEET.md with insights section Tools: - tools/zernike_html_generator.py: Standalone WFE HTML generator - tools/analyze_wfe.bat: Double-click to analyze OP2 files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
tools/test_zernike_import.py
Normal file
36
tools/test_zernike_import.py
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Test script for Zernike extractor import."""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add Atomizer root to path
|
||||
atomizer_root = Path(__file__).parent.parent
|
||||
sys.path.insert(0, str(atomizer_root))
|
||||
|
||||
print("Testing ZernikeExtractor import...")
|
||||
|
||||
try:
|
||||
from optimization_engine.extractors import ZernikeExtractor
|
||||
print(" Import: OK")
|
||||
|
||||
import inspect
|
||||
sig = inspect.signature(ZernikeExtractor.extract_relative)
|
||||
print(f" extract_relative signature: {sig}")
|
||||
|
||||
# Check parameters
|
||||
params = list(sig.parameters.keys())
|
||||
print(f" Parameters: {params}")
|
||||
|
||||
if 'include_coefficients' in params:
|
||||
print(" include_coefficients parameter: FOUND")
|
||||
else:
|
||||
print(" include_coefficients parameter: MISSING!")
|
||||
sys.exit(1)
|
||||
|
||||
except Exception as e:
|
||||
print(f" ERROR: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
print("\nAll tests passed!")
|
||||
Reference in New Issue
Block a user