吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1697|回复: 24
收起左侧

[原创工具] 大物实验:光的偏振 处理实验数据及作图工具

  [复制链接]
iSleepAllDay 发表于 2024-4-6 10:56
输入完37个i(φ)值后可以自动画出极坐标系下的E-φ关系曲线,并以表格的形式输出每一个φ对应的i(φ)和E的值,图像可以保存下来打印贴在实验报告上
鉴于使用者可能没装python和相应的库,我打包成了一个即点即用的exe文件,所以文件有点大,用完删掉就行,
链接:https://pan.baidu.com/s/1HtQpnKpxS7NNk6ZsqPMBeA?pwd=kuuf
提取码:kuuf
源码如下:

图像

图像

正常运行如图

正常运行如图

要求凑够三张图

要求凑够三张图

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def calculate_E(ix, iy, i_phi):
    return np.sqrt((ix * iy) / (ix + iy - i_phi))
ix_value = float(input("Enter the value for ix: "))
iy_value = float(input("Enter the value for iy: "))
phi_values = np.arange(0, 361, 10)
E_values = []
i_phi_values = []
# Loop to accept i(φ) values and calculate E, phi will increase by 10° each time
for phi in phi_values:
    i_phi = float(input(f"Enter the value for i({phi}°): "))
    E = calculate_E(ix_value, iy_value, i_phi)
    E_values.append(E)
    i_phi_values.append(i_phi)
# Convert the data into a pandas DataFrame for tabular display
data = {
    'φ (Degrees)': phi_values,
    'i(φ)': i_phi_values,
    'E': E_values
}
df = pd.DataFrame(data)
# Plot the E-φ relationship curve in polar coordinates to create an elliptical form
fig = plt.figure()
ax = fig.add_subplot(111, polar=True)
ax.plot(np.deg2rad(phi_values), E_values)
ax.set_theta_zero_location('N')  # Set the direction of 0° to the top of the plot
ax.set_theta_direction(-1)  # Set the theta direction to clockwise
# Display the table and the plot
plt.show()
print(df)



免费评分

参与人数 3吾爱币 +8 热心值 +3 收起 理由
5151diy + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
confiant + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
风之暇想 + 7 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!

查看全部评分

本帖被以下淘专辑推荐:

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

dupipi1986 发表于 2024-4-6 21:57
不明觉厉
sxzswx 发表于 2024-4-7 04:15
xjjlxcb123 发表于 2024-4-7 06:53
jsdhmqh 发表于 2024-4-7 08:28
好陌生!
emcell 发表于 2024-4-7 10:33
好专业呀!
magiclyan 发表于 2024-4-7 12:11
这是毕设还是随便写来玩玩的?刚需物理实验室
ansui 发表于 2024-4-8 16:09
这这这这,啊这这这,看不懂,根本看不懂,隔行如隔山
qingchunzhutou 发表于 2024-4-8 23:38
好东西,但是看不懂
Benny77 发表于 2024-4-8 23:53
怎么以前物理课没有学过这个内容呢?
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 提醒:禁止复制他人回复等『恶意灌水』行为,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-2 17:45

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表