将 2 个 hdf5 文件与 pytables 合并
ptrepack 几乎是我想要的,只是它只有覆盖或忽略的选项重复的路径。下面的示例说明了我希望使用结构发生什么
输入文件一个
/ (RootGroup) ''
/data_set_name (Group) 'group of images files'
/data_set_name_Set (EArray(7913, 128)) ''
/data_set_name/image_set_index (Table(3,)) ''
/data_set_name/i100 (Group) 'sift features and coordinates'
/data_set_name/i100/descriptors (Array(7913, 128)) 'sift descriptors'
/data_set_name/i100/locations (Array(7913, 4)) 'sift feature locations'
输入文件两个
/ (RootGroup) ''
/data_set_name (Group) 'group of images files'
/data_set_name_Set (EArray(4328, 128)) ''
/data_set_name/image_set_index (Table(4,)) ''
/data_set_name/i1156 (Group) 'sift features and coordinates'
/data_set_name/i1156/descriptors (Array(4328, 128)) 'sift descriptors'
/data_set_name/i1156/locations (Array(4328, 4)) 'sift feature locations'
所需的输出
/ (RootGroup) ''
/data_set_name (Group) 'group of images files'
/data_set_name_Set (EArray(12241, 128)) ''
/data_set_name/image_set_index (Table(7,)) ''
/data_set_name/i100 (Group) 'sift features and coordinates'
/data_set_name/i100/descriptors (Array(7913, 128)) 'sift descriptors'
/data_set_name/i100/locations (Array(7913, 4)) 'sift feature locations'
/data_set_name/i1156 (Group) 'sift features and coordinates'
/data_set_name/i1156/descriptors (Array(4328, 128)) 'sift descriptors'
/data_set_name/i1156/locations (Array(4328, 4)) 'sift feature locations'
执行此操作的有效方法是什么?
ptrepack is almost what i want except that it only has the options to overwrite or ignore duplicate paths. the example below illustrates what i want to happen with the structures
input file one
/ (RootGroup) ''
/data_set_name (Group) 'group of images files'
/data_set_name_Set (EArray(7913, 128)) ''
/data_set_name/image_set_index (Table(3,)) ''
/data_set_name/i100 (Group) 'sift features and coordinates'
/data_set_name/i100/descriptors (Array(7913, 128)) 'sift descriptors'
/data_set_name/i100/locations (Array(7913, 4)) 'sift feature locations'
input file two
/ (RootGroup) ''
/data_set_name (Group) 'group of images files'
/data_set_name_Set (EArray(4328, 128)) ''
/data_set_name/image_set_index (Table(4,)) ''
/data_set_name/i1156 (Group) 'sift features and coordinates'
/data_set_name/i1156/descriptors (Array(4328, 128)) 'sift descriptors'
/data_set_name/i1156/locations (Array(4328, 4)) 'sift feature locations'
desired output
/ (RootGroup) ''
/data_set_name (Group) 'group of images files'
/data_set_name_Set (EArray(12241, 128)) ''
/data_set_name/image_set_index (Table(7,)) ''
/data_set_name/i100 (Group) 'sift features and coordinates'
/data_set_name/i100/descriptors (Array(7913, 128)) 'sift descriptors'
/data_set_name/i100/locations (Array(7913, 4)) 'sift feature locations'
/data_set_name/i1156 (Group) 'sift features and coordinates'
/data_set_name/i1156/descriptors (Array(4328, 128)) 'sift descriptors'
/data_set_name/i1156/locations (Array(4328, 4)) 'sift feature locations'
Whats an efficient way to go about doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的意思是自动放大具有相同路径的数据集?嗯,我没有考虑过这一点,但看起来是一个很好实现的功能(尽管仅对可放大数组有效)。添加了票证:
http://pytables.org/trac/ticket/325
You mean to automagically enlarge datasets with the same paths? Hmmm, I haven't thought about this, but looks like a nice feature to implement (although only valid for enlargeable arrays). Added a ticket:
http://pytables.org/trac/ticket/325