title: Storing images and metadata with PyTables
body: <p>I'm using PyTables to store some images as <code>Array</code> and <code>CArray</code> data types. For each of these images, I also want to store some basic metadata (e.g., <a href="http://en.wikipedia.org/wiki/Exchangeable_image_file_format" rel="nofollow">EXIF</a> data). </p>
  
  <p>I can imagine a number of approaches to storing both of these data formats, ranging from storing the metadata with the <code>AttributeSet</code> class for each <code>Array</code>/<code>CArray</code> to using a <code>Table</code> for all of the metadata. </p>
  
  <p>My question is: What is the best approach if I want to be able to <strong>efficiently query and extract images from the ultimate hdf5 file</strong> for processing? For example, I'd like to be able to extract images taken at certain times (12-3pm) and process that subset of the data and then insert copies into the database or replace the existing arrays.</p>
  
  <p>Many thanks for the help.</p>
  
  <p>Best,</p>
  
  <p>Nick</p>
  
  <p>[Edit (clarification): I'm currently processing these images as NumPy arrays, and I hope to preserve that functionality]</p>