ESRF ICAT定义
项目描述
HDF5主配置
此存储库包含描述ICAT数据库与HDF5格式主文件之间映射的XML文件。它还包含一组工具,有助于维护这些工具。
:警告: 文件 hdf5_cfg.xml
已不再更新,仅为了与 pyicat-plus<=0.1.7
保持向后兼容而存在。新的定义文件是 src/icat_esrf_definitions/hdf5_cfg.xml
。应仅对新的文件应用更改。
技术
- 层析成像(TOMO)
- 荧光成像(FLUO)
- 快映射(KMAP)
- 中子衍射仪(MX)
- 生物大分子溶液圆二色谱(BIOSAXS)
- ptycho
- 中子反射率(MRT)
工具
需求
代理
如需使用代理,应正确设置
export https_proxy=https://proxy.esrf.fr:3128
python-icat
某些工具需要 python-icat 版本 0.12.0,而版本 0.13.1 将无法工作
安装 python-icat
访问 URL
https://icatproject.org/user-documentation/python-icat/
并下载名为 python-icat-0.12.0.tar.gz 的文件
-rw-r--r-- 1 blissadm bliss 272576 Oct 10 2016 python-icat-0.12.0.tar.gz
c9034ad2a725ba1317a911940c577a8b python-icat-0.12.0.tar.gz
此文件可在以下位置找到
/segfs/bliss/projects/ICAT/python-icat
-rw-r--r-- 1 homsrego soft 272576 Feb 12 16:48 python-icat-0.12.0.tar.gz
使用 pip 解压缩并安装 tar
cd Downloads
tar -xvzf python-icat-0.12.0.tar.gz
cd python-icat-0.12.0
pip install .
测试
~/icat/python-icat % python
Python 2.7.9 (default, Jun 29 2016, 13:08:31)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import icat
>>> icat.__version__
'0.12.0'
工具列表
一组用于验证 XML 文件的工具
- XML 语法验证:检查 XML 是否正确形成
- 参数列表:从 XML 打印参数列表
- ICAT 参数列表:从 ICAT 数据库打印参数列表
- 元数据状态:比较 XML 文件和数据库中定义的元数据参数
- 添加参数:读取 xml 文件并提出在 ICAT 中创建缺失参数的建议。缺失参数是 XML 中定义但不在 ICAT 数据库中的 params
- 列出技术:读取 xml 文件并返回与技术对应的所有子条目
XML 语法验证
此工具检查 hdf5_cfg.xml 文件的语法。如果 XML 不正确,将引发错误
如何运行它?
python tools/xml/validate.py hdf5_cfg.xml
示例
Success:
```
lindemaria:~/Software/metadata/hdf5-master-config % python tools/validate.py hdf5_cfg.xml
[PASSED] hdf5_cfg.xml is well-formed
```
Error:
```
lindemaria:~/Software/metadata/hdf5-master-config % python tools/validate.py hdf5_cfg.xml
[ERROR] hdf5_cfg.xml is mismatched tag: line 84, column 3
```
参数列表
此工具将打印在标准输出中设置在 hdf5_cgf.xml 文件中的参数列表
如何运行它?
cd tools
python -m list.list ../hdf5_cfg.xml
示例
scanName
scanNumber
proposal
scanType
[..]
ICAT 参数列表
此工具将打印在标准输出中设置在 ICAT 中的参数列表
配置文件
icat.cfg 应存在于此位置
./tools/icat/icat.cfg
这是包含到 ICAT 连接字符串的文件。您可以在 icat.cfg.example 中找到此类文件的示例,其中已隐藏密码
[ovm-icat2]
url = https://ovm-icat2.esrf.fr/ICATService/ICAT?wsdl
auth = db
username = root
password = ************
idsurl = https://ovm-icat2:8181/ids
# uncomment, if your server does not have a trusted certificate
checkCert = No
注意,auth 是受控值列表,为:db | esrf
如何运行它?
cd tools/icat/list
python list.py -s ovm-icat2 --no-check-certificate -c ../icat.cfg --https-proxy ""
元数据状态
此工具将在 ICAT 数据库中查找参数,然后与 xml 中定义的参数进行比较,生成当前状态的摘要
配置
icat.cfg should exist that it is the file that contains the connection string to ICAT.
An example of such file is icat.cfg.example where password has been hidden
如何运行它?
cd tools/icat/status
python status.py -s ovm-icat2 --no-check-certificate -c ../icat.cfg --https-proxy ""
示例
lindemaria:tools/icat/status % python status.py -s ovm-icat2 --no-check-certificate -c ../icat.cfg --https-proxy ""
[ERROR] These parameters exists in ../../../hdf5_cfg.xml but not in the DB
MRT_beamHeight
MRT_beamSize
MRT_dose
MRT_expoSpeed
MRT_expoStart
[INFO] -----------------------------------------------------------------------------------------------------------
[INFO] Summary of metadata on https://icat.esrf.fr/ICATService/ICAT?wsdl database and ../../../hdf5_cfg.xml file
[INFO] Total 267 parameters defined in the XML file
[INFO] Total 387 parameters defined in the ICAT DB
[INFO] -----------------------------------------------------------------------------------------------------------
添加参数
配置
icat.cfg should exist that it is the file that contains the connection string to ICAT.
An example of such file is icat.cfg.example where password has been hidden
如何运行它?
cd tools/icat/addParameters
python addParameters.py -s ovm-icat2 --no-check-certificate -c ../icat.cfg --https-proxy ""
列出技术
如何运行它?
lindemaria:~/Software/metadata/hdf5-master-config % python tools/xml/getTechniques.py hdf5_cfg.xml
['SAXS', 'MX', 'PTYCHO', 'TOMO', 'MRT', 'HOLO', 'WAXS']
项目详情
下载文件
下载适用于您平台上的文件。如果您不确定要选择哪个,请了解更多有关 安装包 的信息。
源分发
icat_esrf_definitions-2.1.2.tar.gz (23.5 kB 查看散列)
关闭
icat_esrf_definitions-2.1.2.tar.gz 的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 1af66f6dcad6f17e1873c26ae01de752ed2a2b51034ee773fd534a9d85d758b3 |
|
MD5 | 1dc3740f57879f439c3e2b0aa7728bc3 |
|
BLAKE2b-256 | c8327a5adafad1006d805303197b6f5bcd2ebb76359b9411bbb207d519ea55a6 |