code: def hdfoutput(outname, frames, dozip=False):
      '''Outputs the frames to an hdf file.'''
      with h5.File(outname,'a') as f:
          for frame in frames:
              group=str(frame['step']);
              h5w(f, frame, group=group,
                  compression='lzf' if dozip else None)f hdfoutput(outname, frames, dozip=False):
      '''Outputs the frames to an hdf file.'''
      with h5.File(outname,'a') as f:
          for frame in frames:
              group=str(frame['step']);
              h5w(f, frame, group=group,
                  compression='lzf' if dozip else None);
docs: Outputs the frames to an hdf file.