Package xdp :: Package io
[show private | hide private]
[frames | no frames]

Package xdp.io

Read and write experiment data and metadata.

The file formats supported by xfp:
Function Summary
2-tuple of the form (header, data) readFile(fileName)
Read experiment data and metadata from a file.
  writeFile(fileName, header, data)
Write experiment data and metadata to a file.

Function Details

readFile(fileName)

Read experiment data and metadata from a file.

The format of the file is guessed from the file's extension and the contents.
Parameters:
fileName - file to open
           (type=string)
Returns:
header and data
           (type=2-tuple of the form (header, data))
Raises:
IOError - could not guess the file format, or open, read, or parse the file

To Do: verify that the file access mode does not need to be binary

writeFile(fileName, header, data)

Write experiment data and metadata to a file.

The format of the file is determined by the class of the header argument.
Parameters:
fileName - file to write
           (type=string)
header - metadata
           (type=SFF or Xafs or Text)
data - dataset
           (type=Data)
Raises:
IOError - either header or data contain invalid information, or the file could not be opened for writing

To Do: verify that the file access mode does not need to be binary


Generated by Epydoc 2.1 on Wed Jul 20 11:51:05 2005 http://epydoc.sf.net