| name | physics-experiment-report |
| description | Use when writing or revising Chinese university physics lab reports from raw data, photos, oscilloscope screenshots, PPT/manuals, or sample reports; includes 数据处理, 误差分析, 拟合绘图, 手写数据核对, 示波器整理, 连续/瞬态信号. |
Physics Experiment Report Generator
Generate Chinese university physics experiment reports from raw data, photos, oscilloscope screenshots, PPT/manuals, and sample reports. Follow the Shanghai Jiao Tong University style unless the user gives a different template.
Core Output
Produce only the artifacts the user needs for the current task:
report.md in Chinese with the required report sections.
- Data-processing calculations with key substitutions and numeric results.
- Python plotting/table code when figures or printable tables are needed.
- Cross-check tables for handwritten/photo readings when values may be ambiguous.
- Organized oscilloscope screenshots or printable image PDFs when requested.
Mandatory Report Structure
Reports have two halves:
- 预习报告: purpose, principles, working formulas. Write as much as needed for correctness.
- 实验后部分: the 5 sections below. These are hand-copied onto limited space, so keep them short. Overriding rule: 宁可少,也别太多.
1. 实验方案及仪器 (~10 lines)
- Measurement plan: what quantities are measured and how they lead to the result.
- Main instruments, with precision/range if relevant.
- 2-3 key operation points.
- Do not put detailed step-by-step procedure here.
2. 实验过程及现象 (~10 lines)
Required shape:
- Numbered operation sequence, one concise past-tense line per step.
- A short 现象与问题 paragraph.
The paragraph must cover what was observed, what problems appeared, and how they were resolved. Examples: trigger instability, wrong scale, waveform clipping, handwritten digit ambiguity, table mismatch, or editor/input-method failure. If no problem is visible, write that no obvious abnormal issue occurred and readings were stabilized by checking range, trigger, and repeated readings.
3. 实验数据处理及结果 (~27 lines)
- Raw data tables with units in headers.
- Unit conversions before calculation.
- Theoretical value, fit/result, uncertainty or relative error for each method/configuration.
- Numeric $E_r$ must appear in the report text, not only in code.
- For periodic or oscilloscope signal experiments, table both $T$ and $f$ when either can be read or cross-checked. Use $T=1/f$ as a check, not a replacement for a recorded value unless missing.
- Show key substitution steps but avoid long algebra.
- Reference generated figures or appended image evidence.
4. 实验总结及讨论 (~16 lines)
- 实验收获: physics idea plus measurement technique.
- 反思: specific error sources and direction of bias, not generic 人为误差.
- 思考题: default one compact sentence per question; at most two sentences unless the user explicitly asks for expansion.
5. 应用延伸与拓展 (~9 lines)
- 2-3 real-world or engineering applications.
- Tie to the user's major/daily life when known.
- Breadth over depth; keep each application to 1-2 short sentences.
Markdown and LaTeX Rules
- Use standard Markdown dollar math only: inline
$...$, display $$...$$.
- Never use
\(...\), \[...\], or bare bracket display-math blocks.
- In hand-copy sections, prefer inline formulas and only keep high-value display equations.
- Keep units consistent in table headers. Preserve source notation such as
us, ms, Vpp when it appears on instruments, then normalize in calculations if needed.
Data Processing Rules
- Convert to SI before calculation unless the report table intentionally preserves raw units.
- Common conversions: mm -> m, g -> kg, rpm -> rad/s, degrees -> radians.
- Choose the model from physics, not curve shape alone: linear fits for linearized relationships, exponential decay by fitting $\ln y$ vs. $t$, quadratic only when theory predicts it.
- Report the fit equation and $R^2$ or correlation coefficient in the report text.
- Relative error: $E_r=|V_{\mathrm{exp}}-V_{\mathrm{theory}}|/V_{\mathrm{theory}}\times100%$.
- If $E_r>10%$, identify the dominant systematic source and its physical mechanism.
- Never fabricate data. If adjusting or excluding data, disclose the reason.
Uncertainty Convention
Use the lab's house convention unless the user provides another:
- Direct repeated measurement: sample std $\sigma_x=\sqrt{\sum(x_i-\bar{x})^2/(n-1)}$.
- A-type uncertainty: $\Delta_A=t\sigma_x$ with Student factor, e.g. $n=6$ gives $t=1.05$ in the SJTU old-GB convention.
- B-type uncertainty: instrument tolerance from the manual.
- Combined uncertainty: $U_x=\sqrt{\Delta_A^2+\Delta_B^2}$.
- Relative uncertainty: $U_{rx}=U_x/\bar{x}\times100%$.
- Fit slope uncertainty: use the slope standard error as $U_k$.
- Product-of-powers propagation: $(U_y/y)^2=\sum(p_iU_{x_i}/x_i)^2$ and show dominant terms.
Handwritten, Photo, and Screenshot Data
When data comes from handwriting, photos, screenshots, or copied image tables:
- Read visually and cross-check by units, nearby labels, expected scale, and physics sanity checks.
- Create a cross-check table when values are ambiguous or the user asks to verify readings. Columns: item, source reading, normalized report value, evidence file/location, confidence, notes/corrections.
- Treat user-corrected readings as authoritative, update dependent calculations, and note the correction.
- Mark confidence as high/medium/low. Keep low-confidence values out of final calculations unless clearly labeled tentative.
- Separate measurement screenshots/photos from PPT/manual/reference images.
- For oscilloscope image PDFs, include only actual measurement screenshots by default, labeled 图1, 图2, ... with waveform name/settings/readout. Exclude PPT/reference images unless the user explicitly asks for them.
Supporting References
Load these only when needed:
- references/plotting.md: matplotlib plotting, table-image, and multi-panel templates.
- references/experiment-specific.md: experiment-specific traps and formulas for Bohl resonance, rotational inertia, temperature sensors, falling ball viscometry, Hall sensor, goniometer, solar cell, and continuous/transient signal experiments.
Workflow
- Identify the experiment and classify materials: raw/handwritten data, instrument screenshots, PPT/manuals, sample reports.
- Cross-check readings before calculations; preserve user corrections.
- Plan calculations, fits, figures, and any printable image output.
- Process data section by section.
- Generate code and figures/tables if needed.
- Write
report.md in the mandatory section order using dollar-delimited LaTeX only.
- Deliver a short summary of changed/generated files and any values still needing human verification.
If materials are incomplete, state exactly what is missing and proceed with the defensible subset rather than fabricating values.