Package diffpy :: Package srrietveld :: Package convert :: Module listfilereader
[frames] | no frames]

Module listfilereader

source code

Load list of datafiles for sequential refinement and associated environment variables such as temperature or pressure.

Classes
  CSVListFileReader
ListFileReader specialized for comma-separated-values (CSV) format.
  ListFileReader
Object for loading datafiles and temperatures from a list file.
Functions
 
readListFile(filename, fmt=None, basepath=None)
Load an return ListFileReader instance from the specified file.
source code
 
resolveColumnLabel(label)
Convert column label to a standard name.
source code
Variables
  __id__ = '$Id: listfilereader.py 6515 2011-04-13 14:52:02Z juh...
  __package__ = 'diffpy.srrietveld.convert'

Imports: SrrFileError, os, re


Function Details

readListFile(filename, fmt=None, basepath=None)

source code 
Load an return ListFileReader instance from the specified file.

filename -- path to the list file to be loaded.  Uses CSV reader
            for ".csv" extensions or plain text reader otherwise.
fmt      -- optional filename format.  Use "csv" for CSV reader
            or "txt" for plain text reader.  When None, determine
            format from the filename extension.
basepath -- when specified, make loaded datapaths relative to the
            basepath directory.  Use '.' for the current directory.
            Do not modify datapaths when None.

Return a ListFileReader instance.
Raise ValueError for invalid fmt value.
Raise SrrFileError for non-existent or corrupted file.

resolveColumnLabel(label)

source code 

Convert column label to a standard name. This applies aliases as defined in the _LABELALIASES and maps bank002 to bank2. Otherwise the label remains unchanged.

label -- string label to be converted to standard name.

Return string.


Variables Details

__id__

Value:
'$Id: listfilereader.py 6515 2011-04-13 14:52:02Z juhas $'