跳转至

大学物理实验

攻略:

  • 不能自选老师哦,班级统一分配。
  • 作业每周一次,有一个实验报告(需要进行预习填表和复习填表)。
  • 课前课后有网上测试,上课前截止上周测试。
  • 上课需要写实验数据报告,然后交由老师签字。

资源

(所有代码还未标准化,请谨慎使用自行修改)
(如使用代码,您可能需要pip安装Python库

  • 教材
  • 空白实验报告
  • 实验报告参考合集 @ 随光
    数据处理代码
    import matplotlib.pyplot as plt
    import numpy as np
    import mpl_toolkits.axisartist as axisartist
    import splines
    
    def main(x, dataList: list, dotsPerSecond: int = 300):
        """
        Args:
            dataList (list): 数据点 y 坐标
            reactionBeginIndex (int): 反应起始时刻
            dotsPerSecond (int, optional): 拟合曲线差值点个数. Defaults to 300.
        """
        dataListLenth = len(dataList)
        dataX = x
        dataY = dataList
        points1 = np.array([[dataX[i], dataY[i]] for i in range(dataListLenth)])
        spline = splines.CatmullRom(points1, alpha=0.5)
        total_duration = spline.grid[-1] - spline.grid[0]
        dots = int(total_duration * dotsPerSecond) + 1
        times = spline.grid[0] + np.arange(dots) / dotsPerSecond
        fig = plt.figure(figsize=(8, 8))
        ax1 = axisartist.Subplot(fig, 111)
        fig.add_axes(ax1)
        ax1.axis[:].set_visible(False)
        ax1.axis["x"] = ax1.new_floating_axis(0,0)
        ax1.axis["x"].set_axisline_style("->", size = 1.0)
        ax1.axis["y"] = ax1.new_floating_axis(1,0)
        ax1.axis["y"].set_axisline_style("->", size = 1.0)
        ax1.axis["y"].set_axis_direction("left")
        ax1.plot(*spline.evaluate(times).T, marker='.', linestyle='',
                color="gray")  # 拟合曲线
        plt.xlim(0,85)
        plt.ylim(0,4.9)
        ax1.axis["x"].set_lable("$V_{\\mathrm{G2K}}$")  # x 名称
        ax1.axis["y"].set_lable("$I_{\\mathrm{p}}$")  # y 名称
        plt.vlines(27,2.423,4)
        plt.vlines(38.5,3.288,4)
        plt.title("$I_{\\mathrm{p}}-V_{\\mathrm{G2K}}$ curve", loc="center", y=-0.13)
        plt.annotate("",xy=(27,3.7),xytext=(38.5,3.7),arrowprops=dict(arrowstyle="<->", ))  # Delta V 箭头
        plt.text(29.5,
                3.65,
                "$11.5\\ \\mathrm{V}$",
                bbox={
                    'facecolor': 'white',
                    'edgecolor': 'white',
                    'alpha': 1,
                    'pad': 1
                })  # Delta V 文字
        plt.show()
    
    if __name__ == "__main__":
        y = [0]*20+[0.019,0.092,0.195,0.314,0.433,0.547,0.651,0.749,0.905,0.973,
                    1.022,1.064,1.080,1.077,1.036,0.991,0.931,0.860,0.777,0.686,
                    0.591,0.500,0.409,0.333,0.291,0.332,0.512,0.797,1.127,1.451,
                    1.744,1.992,2.187,2.328,2.423,2.372,2.243,2.049,1.787,1.484,
                    1.169,0.874,0.620,0.422,0.274,0.185,0.192,0.426,0.816,1.271,
                    1.715,2.144,2.509,2.812,3.048,3.205,3.286,3.288,3.216,3.058,
                    2.819,2.498,2.117,1.751,1.330,0.958,0.655,0.426,0.290,0.334,
                    0.628,1.063,1.540,2.021,2.478,2.872,3.203,3.720,3.871,3.943,
                    3.947,3.869,3.712,3.473,3.161,2.781,2.361,1.937,1.535,1.177,
                    0.882,0.710,0.838,1.098,1.432,1.819,2.225,2.616,2.980,3.343,
                    3.648,3.903,4.099,4.234,4.297,4.222,4.076,3.863,3.584,3.259,
                    2.902,2.524,2.158,1.618,1.568,1.633,1.792,2.037,2.330,2.647,
                    2.970,3.289,3.585,3.863,4.105,4.311,4.475,4.580,4.627,4.613,
                    4.571,4.446,4.262]
        x=range(0,len(y))
        x=list(map(lambda x:0.5*x,x))
        main(x, y)