feat: Major update - Physics docs, Zernike OPD, insights, NX journals, tools
Documentation: - Add docs/06_PHYSICS/ with Zernike fundamentals and OPD method docs - Add docs/guides/CMA-ES_EXPLAINED.md optimization guide - Update CLAUDE.md and ATOMIZER_CONTEXT.md with current architecture - Update OP_01_CREATE_STUDY protocol Planning: - Add DYNAMIC_RESPONSE plans for random vibration/PSD support - Add OPTIMIZATION_ENGINE_MIGRATION_PLAN for code reorganization Insights System: - Update design_space, modal_analysis, stress_field, thermal_field insights - Improve error handling and data validation NX Journals: - Add analyze_wfe_zernike.py for Zernike WFE analysis - Add capture_study_images.py for automated screenshots - Add extract_expressions.py and introspect_part.py utilities - Add user_generated_journals/journal_top_view_image_taking.py Tests & Tools: - Add comprehensive Zernike OPD test suite - Add audit_v10 tests for WFE validation - Add tools for Pareto graphs and mirror data extraction - Add migrate_studies_to_topics.py utility Knowledge Base: - Initialize LAC (Learning Atomizer Core) with failure/success patterns Dashboard: - Update Setup.tsx and launch_dashboard.py - Add restart-dev.bat helper script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
50
tests/debug_insights.py
Normal file
50
tests/debug_insights.py
Normal file
@@ -0,0 +1,50 @@
|
||||
"""Debug insights availability for a study."""
|
||||
import sys
|
||||
sys.path.insert(0, ".")
|
||||
from pathlib import Path
|
||||
|
||||
# Test study path resolution
|
||||
study_id = 'm1_mirror_cost_reduction_V9'
|
||||
STUDIES_DIR = Path('studies')
|
||||
|
||||
# Check nested path
|
||||
for topic_dir in STUDIES_DIR.iterdir():
|
||||
if topic_dir.is_dir():
|
||||
study_dir = topic_dir / study_id
|
||||
if study_dir.exists():
|
||||
print(f"Found study at: {study_dir}")
|
||||
print(f"Has 1_setup: {(study_dir / '1_setup').exists()}")
|
||||
print(f"Has 2_results: {(study_dir / '2_results').exists()}")
|
||||
|
||||
# Check what insights are available
|
||||
from optimization_engine.insights import list_available_insights, get_configured_insights, recommend_insights_for_study
|
||||
|
||||
print("\n--- Available insights (can_generate=True) ---")
|
||||
available = list_available_insights(study_dir)
|
||||
print(f"Count: {len(available)}")
|
||||
for a in available:
|
||||
print(f" - {a}")
|
||||
|
||||
print("\n--- Configured insights ---")
|
||||
configured = get_configured_insights(study_dir)
|
||||
print(f"Count: {len(configured)}")
|
||||
for c in configured:
|
||||
print(f" - {c.type}: {c.name}")
|
||||
|
||||
print("\n--- Recommendations ---")
|
||||
recs = recommend_insights_for_study(study_dir)
|
||||
print(f"Count: {len(recs)}")
|
||||
for r in recs:
|
||||
print(f" - {r['type']}: {r['name']}")
|
||||
|
||||
# Test individual insight can_generate
|
||||
print("\n--- Testing each insight's can_generate ---")
|
||||
from optimization_engine.insights import get_insight, list_insights
|
||||
|
||||
for info in list_insights():
|
||||
insight = get_insight(info['type'], study_dir)
|
||||
if insight:
|
||||
can = insight.can_generate()
|
||||
print(f" {info['type']:20} can_generate={can}")
|
||||
|
||||
break
|
||||
Reference in New Issue
Block a user