Generate complete university physics experiment reports with full data processing, curve fitting, Python plotting code, error analysis, and discussion sections. Use this skill whenever the user mentions physics experiment reports, lab reports, experiment data processing, fitting curves to experimental data, calculating relative errors, generating matplotlib plots for experiments, writing up experiment results, or any task involving university-level physics labs. Also trigger when the user provides raw measurement data and asks for analysis, mentions specific experiments like rotational inertia, Bohl resonance, Kater pendulum, Hall sensors, temperature sensors, DC bridges, falling ball viscometry, collisions, or simple harmonic motion. Even casual requests like 'help me write up my physics lab' or 'process this experiment data' should trigger this skill. Chinese-language triggers: 物理实验报告, 大学物理实验, 实验数据处理, 误差分析, 转动惯量, 波尔共振, 凯特摆, 霍尔传感器, 温度传感器, 直流电桥, 落球法, 碰撞打靶, 简谐振动.
ayixiayi0 星标2026年4月13日
职业
分类
数据分析
技能内容
Generate high-quality university physics experiment reports (Chinese, following the Shanghai Jiao Tong University template) from raw data, experiment instructions, and reference materials.
What This Skill Does
Takes raw experimental data (Excel/photos/text), experiment introduction materials (PPT/PDF), and optionally sample reports, then produces:
Complete report text (Chinese) with all standard sections
Full data processing calculations with intermediate steps shown
Python matplotlib plotting code for all required figures
Formatted data tables (both as matplotlib table images and Excel-ready)
Error analysis with relative error calculations
Answers to assigned discussion questions
Application/extension section connecting to real-world uses
Report Structure (Mandatory Sections)
Every report must follow this structure. Omit a section only if the experiment genuinely doesn't require it.
1. Experiment Title & Header
Experiment name, student info, date, lab room number
相关技能
2. Experiment Purpose (实验目的)
3-4 bullet points, concise, starting with verbs like "掌握", "学习", "了解", "验证"
Cover both the physics concepts and the measurement techniques
3. Experiment Principles (实验原理)
Core physics and derivation of working formulas
Organize by physical object/scenario when multiple configurations exist (e.g., disc alone, disc+ring, parallel axis theorem)
Number all key equations for later reference
Define every variable with units on first use
Keep derivations concise — show the key steps, not every algebraic manipulation
4. Apparatus & Instruments (实验仪器)
Brief list with model numbers and precision where relevant
Mention key specs that affect measurement uncertainty
5. Experimental Procedure (实验步骤与现象)
Numbered steps matching what was actually done
Note any observed phenomena, anomalies, or adjustments made during the experiment
6. Data Recording & Processing (数据记录与处理)
This is the core section. Follow this universal pipeline for each measurement set:
Raw data → SI unit conversion → Theoretical value calculation
→ Curve fitting (least squares) → Experimental value extraction
→ Theory vs. experiment comparison → Relative error
Sub-structure for each measurement configuration:
6.1 Raw Data Table
Present original measurements in a clean table
Include units in column headers
Show instrument precision
The input data must appear verbatim — if the user gave T=1.432s at k=2, that exact value must appear in the table
6.2 Unit Conversion (if needed)
Convert to SI units, show the conversion factor
6.3 Theoretical Value Calculation
Plug measured parameters into the theoretical formula
Show every substitution step — don't skip to the answer
Box or highlight the final theoretical result
6.4 Data Fitting
Describe the fitting model (linear, quadratic, etc.) and why it's appropriate
Report fitting coefficients with the full equation
Extract the physical quantity from the fit parameters, showing the algebra
6.5 Experimental Result
State the experimentally determined value with units
Write the numeric Er value in the report text (e.g., "相对误差 Er = 3.2%"), not just in Python code
Tabulate all configurations together for easy comparison
7. Figures (实验图像)
One figure per fitting/relationship, generated by Python
Requirements covered in the Plotting section below
8. Discussion Questions (思考题)
Answer each assigned question thoroughly
Use equations and data from the experiment where relevant
3-5 sentences per question minimum
Must answer at least 2 questions with substantive physics reasoning — not one-line answers
Cover ALL key physics aspects of the experiment, even if not explicitly listed as a 思考题. For example, if the experiment involves both amplitude-frequency AND phase-frequency characteristics, discuss both.
9. Summary & Discussion (实验总结与讨论)
What was learned (both physics and technique)
Major error sources with analysis of which direction they bias results
Suggestions for improvement
Personal reflection on difficulties encountered
10. Application & Extension (应用延伸拓展)
2-4 real-world or engineering applications of the experimental principles
Keep each to 1-2 sentences — breadth over depth
Connect to the student's major if known
11. References (参考文献) — Optional
Textbook, lab manual, relevant papers
Data Processing Rules
Unit Conventions
Always convert to SI before calculation
Common conversions: mm→m (×10⁻³), g→kg (×10⁻³), rpm→rad/s (×2π/60), degrees→radians (×π/180)
Fitting Methods
Choose the physically appropriate model — don't default to quadratic just because data curves slightly. Think about what the physics predicts:
Period vs. count (k-t): usually linear → np.polyfit(x, y, 1) or scipy.stats.linregress
T² vs. d² linearization: linear fit on transformed variables
Exponential decay: linearize first (ln y vs. t), then linear fit
Only use quadratic np.polyfit(x, y, 2) when the physics genuinely predicts a quadratic relationship
Always report R² or correlation coefficient as a fit quality measure
Report the full fit equation with numeric coefficients in the report text (not just in code)
Er must appear in the report.md text with a specific numeric value — not just computed in Python code
If Er < 5%, the result is good
If 5% < Er < 10%, discuss possible systematic errors
If Er > 10%, a thorough error discussion is mandatory — identify the dominant error source
Beyond Er, discuss at least one specific systematic error source with its physical mechanism (e.g., air resistance, thermal drift, instrument resolution) — not just generic "人为误差"
Handling Problematic Data
When the user's data doesn't fit well or gives large errors, offer these strategies (in order of preference):
Keep the data, write a deep error analysis — identify the systematic error source (e.g., photogate sampling period, air resistance, friction). This is the safest and often scores highest because it shows understanding.
Minimal adjustment — if one data point is clearly anomalous, discuss why and exclude it with justification.
Overall proportional scaling — if all values are systematically offset, a uniform correction is more defensible than cherry-picking individual points.
Never fabricate data — all adjustments must be disclosed and justified.
The fitting sensitivity rule: for polynomial fits, the first and last data points have outsized influence. If removing them improves R² dramatically, that's a signal of systematic end-effects, not random error.
Python Plotting Template
All plots must follow this pattern. Adapt as needed for each experiment.
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit # if needed
# Chinese font support — MANDATORY (use any CJK-capable font)
plt.rcParams['font.sans-serif'] = ['SimHei', 'WenQuanYi Micro Hei', 'Noto Sans CJK SC', 'Arial Unicode MS', 'DejaVu Sans']
plt.rcParams['axes.unicode_minus'] = False
# --- Data ---
x = np.array([...]) # independent variable
y = np.array([...]) # dependent variable
# --- Fit ---
coeffs = np.polyfit(x, y, 1) # choose degree based on physics: 1=linear, 2=quadratic
poly = np.poly1d(coeffs)
x_fit = np.linspace(x.min(), x.max(), 200)
y_fit = poly(x_fit)
# --- Plot ---
fig, ax = plt.subplots(figsize=(8, 6))
ax.scatter(x, y, c='blue', s=40, zorder=5, label='实验数据')
ax.plot(x_fit, y_fit, 'r-', linewidth=1.5,
label=f'拟合: y = {coeffs[0]:.4f}x + {coeffs[1]:.4f}') # adapt label to fit degree
ax.set_xlabel('x轴标签 (单位)', fontsize=12) # MUST use Chinese labels with units
ax.set_ylabel('y轴标签 (单位)', fontsize=12)
ax.set_title('图表标题', fontsize=14)
ax.legend(fontsize=10)
ax.grid(True, alpha=0.3)
plt.tight_layout()
plt.savefig('figure_name.png', dpi=300, bbox_inches='tight')
plt.show()
Multi-panel Figures
When one experiment has multiple configurations, use subplots:
fig, axes = plt.subplots(2, 2, figsize=(14, 10))
# axes[0,0], axes[0,1], axes[1,0], axes[1,1] for each config
# ... plot each configuration in its own subplot
fig.suptitle('总标题', fontsize=16)
plt.tight_layout()
plt.savefig('all_fits.png', dpi=300, bbox_inches='tight')
Formal but not stiff — write as a diligent student, not a textbook
Show your work — every calculation step matters; readers should be able to reproduce results
Be honest about errors — acknowledging problems and analyzing them shows deeper understanding than pretending everything went perfectly
Quantify everything — "误差较大" is weak; "相对误差为8.3%,主要由于..." is strong
Use 宋体 for body text, Times New Roman for equations in the final formatted version (mention this to the user when delivering)
Experiment-Specific Tips
Some experiments have analysis requirements beyond the generic pipeline. Check this section when you identify the experiment type.
波尔共振 (Bohl Resonance)
This experiment involves free, damped, and forced oscillations. Three distinct analyses are expected:
Amplitude-frequency curve (幅频特性): Plot steady-state amplitude A vs. driving frequency ω (or period T). Identify the resonance peak. Compare experimental resonance frequency with theoretical ω_r = √(ω₀² − 2β²).
Phase-frequency curve (相频特性): If phase data is provided, plot phase φ vs. ω and show the ~90° crossing at resonance. If phase data is NOT provided, still discuss the theoretical relationship: tan φ = 2βω/(ω₀² − ω²), and explain that φ transitions from ~0 to ~π as ω sweeps through ω₀, with φ = π/2 exactly at resonance. This is a key characteristic of resonance systems and must not be omitted.
Damping coefficient β: From the damping amplitude sequence θ₁, θ₂, ..., θₙ recorded at equal time intervals Δt, fit ln(θ) vs. t linearly. The time axis must match the recording interval — if amplitudes are recorded "每隔一个周期", then Δt = T₀ (one full period). The slope gives −β directly. Double-check: β should typically be 0.01–0.05 s⁻¹ for a lightly damped mechanical oscillator.
转动惯量 (Rotational Inertia)
The k-t data (count vs. cumulative time) gives a linear relationship. Slope = period T per oscillation.
Use radius (not diameter) in I = ½Mr². This is a common trap.
Fit R vs. T (Pt100) and EMF vs. T (thermocouple) linearly. Both should have R² > 0.999 for this data quality.
Sensitivity = slope of the linear fit. Compare Pt100 sensitivity (~0.385 Ω/°C) vs. thermocouple (~0.042 mV/°C).
Discuss non-linearity by examining residuals or max deviation from the fit.
落球法 (Falling Ball Viscometry)
Ladenburg wall correction is mandatory: η_corrected = η_raw × [D/(D+2.4d)] or equivalent (1+2.4d/D)⁻¹. Without this correction, the result is systematically high.
Micrometer zero correction: if zero reading is −0.010mm, add 0.010mm to each reading (corrected = raw − zero_error). This is a common trap.
Steel ball density: calculate from total mass of N balls and diameter, ρ_s = m/(πd³/6). Typical: ~7800 kg/m³.
Expected η for castor oil at 18°C: ~1.0–1.2 Pa·s. If outside 0.8–1.5, check unit conversions (mm→m, g→kg).
Terminal velocity verification: discuss measuring fall times over multiple equal segments — if times are equal, terminal velocity is reached.
集成霍尔传感器 (Integrated Hall Sensor)
This experiment typically has 2-3 sub-experiments:
Sensitivity K measurement: Fix supply voltage Is, vary solenoid current Im. Theoretical B = μ₀NI_m/L (infinite solenoid approximation). Plot U vs B and fit linearly — slope = K in V/T. Compare with nominal spec (SS495A: 31.25±1.25 V/T).
B(x) axial field distribution: Fix Im, move sensor along the solenoid axis. Convert Hall voltage ΔU = U − U₀ to B using K. Plot B vs x — expect a plateau in the center and symmetric falloff at the ends. Compare with finite solenoid Biot-Savart integral: B(x) = (μ₀NI/2L)[cosθ₁ + cosθ₂] where θ₁, θ₂ are angles from point x to each end.
Key formulas: μ₀ = 4π×10⁻⁷ T·m/A. For N=3000, L=260mm: B(center) ≈ μ₀NI/L. The Hall voltage offset U₀ (at B=0) must be subtracted: ΔU = U − U₀, then B = ΔU/K.
光学测角仪 (Optical Goniometer / Spectrometer)
This experiment measures prism apex angle α using a spectrometer. Two methods:
Reflection method (反射法): α = ½[(θ₁ − θ₁') + (θ₂ − θ₂')]. Use the two-vernier average to eliminate eccentric error. All arithmetic in degrees and arcminutes — convert carefully: 1° = 60'.
Degree-minute arithmetic: When subtracting angles, borrow 1° = 60' when needed. For θ₁ − θ₁' where θ₁ < θ₁', add 360° to θ₁ first. Show each individual α calculation before averaging.
Uncertainty: Vernier reads to 1'. With 6 measurements, use A-type uncertainty (standard deviation of mean) combined with B-type (instrument resolution). Expected total uncertainty: ~0.5–1'.
This experiment measures I-V curves under different configurations:
Key parameters: Short-circuit current Isc (I at V=0), open-circuit voltage Uoc (V at I=0), maximum power Pm = max(I×V), fill factor FF = Pm/(Isc×Uoc), efficiency η = Pm/(Pin×A) where Pin is incident power density and A is total cell area.
P-V curve: Calculate P = I×V for each data point and plot P vs V alongside I-V. The peak of P-V gives Pm and the optimal operating point.
Configuration comparison: Compare series vs parallel (series: higher Uoc, same Isc; parallel: higher Isc, same Uoc per cell). Compare different distances (inverse square law: Pin ∝ 1/d²). Compare different angles (Isc ∝ cosθ for small angles).
Fill factor interpretation: FF reflects internal losses. Ideal diode FF ≈ 0.85–0.90. Lower FF indicates series resistance, shunt resistance, or recombination losses. Typical experimental FF: 0.65–0.86.
Efficiency: η depends strongly on Pin. At 60cm with ~131 mW/cm², expect η ≈ 3–5%. At 80cm with ~72 mW/cm², η can be slightly higher due to reduced thermal effects. Total cell area = number of cells × single cell area.
Scoring Tips (What Gets 90+ Points)
Based on analysis of high-scoring reports (95-96 range):
Complete data processing chain — every step from raw to final, nothing skipped
Professional figures — fitted curves with equations, proper labels, grid, legend
Multi-method comparison — if applicable, compare results from different measurement approaches
Deep error analysis — go beyond "人为误差" to identify specific systematic effects and their physical mechanisms
Application extensions — show the principles matter beyond the lab