Hebei University of Water Resources and Electric E ›› 2026, Vol. 36 ›› Issue (2): 79-84.DOI: 10.16046/j.cnki.issn2096-5680.2026.02.013

• Computer Application and Automatic Control • Previous Articles    

Application of Python in Data Processing and Visualization for Sound Velocity Measurement

PAN Meiling1, DONG Ziyang2, SUN Nannan1   

  1. 1. Fundamental Department, Hebei University of Water Resources and Electric Engineering, 06001, Cangzhou, Hebei, China;
    2. Department of Computer Science, Hebei University of Water Resources and Electric Engineering, 06001, Cangzhou, Hebei, China
  • Received:2025-12-31 Revised:2026-01-29 Online:2026-06-30 Published:2026-06-22

Python在声速测定中的数据处理与可视化分析应用

潘美玲1, 董子阳2, 孙楠楠1   

  1. 1.河北水利电力学院基础部,河北省沧州市黄河西路49号 061001;
    2.河北水利电力学院计算机系,河北省沧州市黄河西路49号 061001
  • 作者简介:潘美玲(1987-),女,河北沧县人,讲师,主要研究方向:材料物理与化学。E-mail:panmeiling@hbwe.edu.cn
  • 基金资助:
    河北省教育厅科学研究项目(QN2025870)

Abstract: To address the efficiency and accuracy issues in complex data processing for college physics experiments, this study takes the measurement of sound velocity in air as a typical case and applies the principles of the standing wave method (resonance interference method) and the phase method. By utilizing python libraries such as NumPy, SciPy and Matplotlib, we realize automated experimental data processing, precise evaluation of uncertainty and visual analysis. This method not only guarantees the accuracy of results, but also reveals the inherent laws and statistical characteristics of data through intuitive graphs. It effectively improves students’ data processing capabilities, deepens their conceptual understanding of uncertainty, and provides a new technical approach for data analysis in physics experiments.

Key words: Python, visualization analysis, sound velocity measurement, uncertainty evaluation

摘要: 针对大学物理实验中复杂数据处理的效率与精度问题,以空气中声速测定为例,基于驻波法(共振干涉法)和相位法原理,利用Python的NumPy、SciPy和Matplotlib库,实现实验数据的自动化处理、不确定度精确评定及可视化分析。该方法不仅确保了结果的准确性,还通过直观图形揭示了数据的内在规律与统计特性,有效提升学生处理数据的能力,深化对不确定度的概念理解,同时为物理实验数据分析提供了新的技术路径。

关键词: Python, 可视化分析, 声速测定, 不确定度评定

CLC Number: