本文整理汇总了Python中Stoner.Data.e方法的典型用法代码示例。如果您正苦于以下问题:Python Data.e方法的具体用法?Python Data.e怎么用?Python Data.e使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stoner.Data
的用法示例。
在下文中一共展示了Data.e方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: zip
# 需要导入模块: from Stoner import Data [as 别名]
# 或者: from Stoner.Data import e [as 别名]
data, headers = zip(*result)
new_data = data[0]
for r in data[1:]:
new_data = append(new_data, r, axis=0)
result = Data(new_data)
result.column_headers = headers[0]
# Now plot all the fits
subfldr.plots_per_page = 6 # Plot results
subfldr.plot(figsize=(8, 8), extra=extra)
# Work with the overall results
result.setas(y="H_res", e="H_res.stderr", x="Freq")
result.y = result.y / mu_0 # Convert to A/m
result.e = result.e / mu_0
resfldr += result # Stash the results
# Merge the two field signs into a single file, taking care of the error columns too
result = resfldr[0].clone
for c in [0, 2, 4, 6, 8, 9, 10]:
result.data[:, c] = (resfldr[1][:, c] + resfldr[0][:, c]) / 2.0
for c in [1, 3, 5, 7]:
result.data[:, c] = gmean((resfldr[0][:, c], resfldr[1][:, c]), axis=0)
# Doing the Kittel fit with an orthogonal distance regression as we have x errors not y errors
p0 = [2, 200e3, 10e3] # Some sensible guesses
result.lmfit(
Inverse_Kittel, p0=p0, result=True, header="Kittel Fit", output="report"
)