0

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?

Ben
  • 1,030
  • 10
  • 23

1 Answers1

1

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

FrancescAlted
  • 351
  • 3
  • 6
  • this might also be of interest to you "ptrepack -v --overwrite-nodes node1.h5:/ node2.h5:/" appears to copy all the data (based on the size of the file) but only one files groups are visible upon displaying the contents of the file. however doing "ptrepack -v --overwrite-nodes node1.h5:/groups node2.h5:/groups" everything is visible after the copy – Ben Dec 09 '10 at 02:22