本文整理汇总了Python中Stoner.Data.data[:,c]方法的典型用法代码示例。如果您正苦于以下问题:Python Data.data[:,c]方法的具体用法?Python Data.data[:,c]怎么用?Python Data.data[:,c]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stoner.Data
的用法示例。
在下文中一共展示了Data.data[:,c]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: gmean
# 需要导入模块: from Stoner import Data [as 别名]
# 或者: from Stoner.Data import data[:,c] [as 别名]
# 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"
)
result.setas[-1] = "y"
result.template.yformatter = TexEngFormatter
result.template.xformatter = TexEngFormatter
result.labels = None
result.figure(figsize=(6, 8))
result.subplot(211)