用于加载、插值和绘制加拿大光源处SGM光束线数据的模块。

sgm-data的Python项目详细描述


用于处理SGM Beamline中的数据的助手模块

安装:

使用pip:

pip install sgm-data

或来源:

^{pr2}$

用法:

首先导入包,然后选择要加载的数据。在

importsgmdatadata=sgmdata.SGMData(["file1.hdf5","file2.hdf5","..."])

这将识别所列文件中的独立轴、信号和其他数据。 文件加载列表也适用于hsds域。在

data=sgmdata.SGMData(["file1.data.sgm-hdf5.lightsource.ca","..."])

有用功能:

data.scans#contains a dictionary of the identified data arrays loaded from your file listdata.interpolate(start=270,stop=2000,resolution=0.5)#bin the data in scans dictionary and interpolates missing pointsdata.mean()#average data with the same sample name, and spec command together. 

使用单个扫描:

df=data.scans['FilePrefix'].entry1.interpolate(start=270,stop=2000,resolution=0.1)#bin data for a single scan.df2=data.scans['FilePrefix'].entry1.fit_mcas()#perform batch gaussian fitting of interpolated SDD signal

绘图(使用Bokeh):

data.scans['FilePrefix'].entry1.plot()data.average.plot()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
JFrame中的Java多线程   java Servlet异常映射   java无法从输出流读取   swing Java带来的小程序GUI问题   java什么原因导致错误“'void'类型此处不允许”以及如何修复它?   Java选择器select(长)与selectNow的区别   java自定义arraylist<mygames>获得不同   java Icepdf注释让页面消失   java反向整数数组   java I在生成同步“无法解析配置的所有依赖项”时遇到此错误:app:debugRuntimeClasspath   多个虚拟机上的java线程访问单个DB实例上的表,有时会导致性能低下和异常   swing更改Java中的默认按钮,使其看起来“更好”   java慢速MQ主题订阅。并行化不能提高性能   java运行Boggle Solver需要一个多小时。我的代码怎么了?   数据库中的java循环与应用程序中的java循环   正则表达式匹配${123…456}并在Java中提取2个数字?   java如何制作我们软件的试用版   Java内存参数计算   从另一个类调用方法时出现java问题