将 2 个 hdf5 文件与 pytables 合并

发布于 2024-10-06 12:13:53 字数 1577 浏览 9 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陪你到最终 2024-10-13 12:13:53

您的意思是自动放大具有相同路径的数据集?嗯,我没有考虑过这一点,但看起来是一个很好实现的功能(尽管仅对可放大数组有效)。添加了票证:

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文