check-physics
実装内容が数学的・物理学的に妥当か検証する
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
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.
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!