check-physics
実装内容が数学的・物理学的に妥当か検証する
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Verify Physics
This skill performs a review of the code specifically focusing on physics and math correctness.
Instructions
-
Dimensional Analysis:
- Check if unit handling (e.g.,
astropy.units,quantities) is used correctly. - Ensure operations are physically valid (e.g., not adding Length to Time).
-
Unit-Safe Assignment: Avoid direct slice assignment
series[:] = raw_arrayifserieshas units. Useseries.value[:] = raw_arrayto update data while preserving unit metadata.
- Check if unit handling (e.g.,
-
Mathematical Inspection:
- Verify equations against known reference papers or standard textbooks.
- Check for numerical stability issues (e.g., division by zero, floating point precision loss).
- Check edge cases (e.g., $f=0$, infinite limits).
-
Sanity Checks:
- Conservation Laws: Create a script to verify energy conservation (Parseval's theorem) for FFT/PSD transformations. Ratio of frequency-domain energy to time-domain energy should be ~1.0.
- Theoretical Benchmarks: Use known signals (Sine wave, Gaussian noise) to verify peak frequency, amplitude, and spectral flatness.
- Multi-domain Verification: For multi-dimensional fields, verify transformations along all applicable axes (e.g., spatial FFT as well as temporal FFT).
- Verify that reasonable inputs produce physically reasonable outputs.
-
Report:
- Provide a summary of the analysis, pointing out any suspect logic or confirming validity.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!