Bluesky生态系统使用的数据模型

event-model的Python项目详细描述


事件模型

此存储库包含指定基于事件的架构的文档 NSLS-II使用的数据模型。组织中的其他项目使用此模型; 这是他们组织基于事件的数据的常用方法。

请参见this page of the NSLS-II documentation以获取图解 模型概述。

使用jsonschema指定文档。看这个 excellent tutorial 关于jsonschema的更多信息。

康达配方

安装最新的标记生成:conda install event-model -c lightsource2-tag

安装最新的标记生成:conda install event-model -c lightsource2-dev

找到标记的配方here和开发配方here

用法

模式使用python api打包。(在未来,他们可能会 为其他语言打包。如果您对此感兴趣,请与我们联系。) 由于使用了新的枚举类型,此包需要Python3.4+。

公共api中有两个变量,一个名为DocumentNames的枚举和 一个名为schemas的字典,它的关键是 DocumentNames

In[1]:importevent_modelIn[2]:event_model.schemas[event_model.DocumentNames.event]Out[2]:{'additionalProperties':False,'description':'Document to record a quanta of collected data','properties':{'data':{'description':'The actual measument data','type':'object'},'descriptor':{'description':'UID to point back to Descriptor for this event stream','type':'string'},'seq_num':{'description':'Sequence number to identify the location of this Event in the Event stream','type':'integer'},'time':{'description':'The event time.  This maybe different than the timestamps on each of the data entries','type':'number'},'timestamps':{'description':'The timestamps of the individual measument data','type':'object'},'uid':{'description':'Globally unique identifier for this Event','type':'string'}},'required':['uid','data','timestamps','time','descriptor','seq_num'],'title':'event','type':'object'}

jsonschema要验证的包 python中的文档。

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

推荐PyPI第三方库


热门话题
空字符串检查在java中未按预期工作   JavaSpringWebClient:自动计算主体的HMAC签名并将其作为头传递   foreach是否有一个Java等效的foreach循环和一个引用变量?   java如何在Eclipse中导入jar   使用特定第三方或java时lombok触发错误。*方法或构造函数   安卓 java将对象数组转换为int数组   java使一定百分比的JUnit测试通过   java Android:将Seekbar的一个值与另一个值进行比较   java将int数组(图像数据)写入文件的最佳方式是什么   java取代了系统。yml的构造函数内的getProperty   sqlite Java将公钥和私钥转换为字符串,然后再转换回字符串   安卓获取白色像素并将其保存到java opencv中的数组中   java为什么是ServerSocket。setSocketFactory静态?   Java数组似乎在不直接修改的情况下更改值