Package pyVerif :: Module Features :: Class Features
[show private | hide private]
[frames | no frames]

Class Features


Convert data files into feature files.

The convertion is done on all the files with a specific extension found in the in source directory. The output fils are putted in a directory structure which is the same as the source one.
Method Summary
  __init__(self, executor)
The Features object constructor.
  compute(self, overwrite)
Compute the features for all file in the directory tree.
  enable_log(self, on_screen, logfile)
Enable/disable the logs on the screen and/or on file.
  log(self, msg)
Log the given message.
  log_info(self)
Log general informations about the current system.
  log_options(self, options, text)
Log the given options.
  set_cmd(self, cmd, options)
Set the commands and options to use for convert into features.
  set_dirs(self, from_dir, to_dir, from_ext, to_ext, bin_dir)
Set the used directories.

Method Details

__init__(self, executor=None)
(Constructor)

The Features object constructor.

Parameters:
  • executor: a pyVerif.Executor can be specified. If not specified, a new one will be created.

compute(self, overwrite=False)

Compute the features for all file in the directory tree.

Parameters:
  • overwrite: set it to True if you want to overwrite existing files

enable_log(self, on_screen=True, logfile=None)

Enable/disable the logs on the screen and/or on file.

Parameters:
- on_screen: enable the log on the screen/xterm
- logfile: put the log on the specified file

log(self, msg)

Log the given message.

Parameters:
  • msg: msg to log

log_info(self)

Log general informations about the current system.

log_options(self, options, text=None)

Log the given options.

Parameters:
  • options: the options to log, of type Values, as returned by OptionParser.parse_args()
  • text: optional text which will be printed before the options

set_cmd(self, cmd, options)

Set the commands and options to use for convert into features.

Parameters:
  • cmd: the command to run for computing the features
  • options: the options passed to the command
In the options parameter, the folowing replacement will be done:
  • %TODIR: the output directory
  • %FILES: the temporary input file

set_dirs(self, from_dir='sph', to_dir='torch', from_ext='sph', to_ext='mat', bin_dir='bin')

Set the used directories.

Parameters:
  • from_dir: where the original files are, default to 'sph'
  • to_dir: where the resulting features files are stored, default to 'torch'
  • from_ext: name of the original file extension, default to 'sph',
  • to_ext: name of the targeted file extension, default to 'mat',
  • bin_dir: where the commands are, default to 'bin'

Generated by Epydoc 2.1 on Fri Oct 6 12:25:10 2006 http://epydoc.sf.net