sksurgeryfredmatplotlib.logging.fred_logger module

Class to handle sksurgeryfred logging

class sksurgeryfredmatplotlib.logging.fred_logger.Logger(config)[source]

Bases: object

Implements logging functionality for sksurgeryfred. Configuration is done by passing a dictionary on construction. Subsequent calls to log(“message”) will write to log file.

Parameters

config

  • a dictionary containing configuration

parameters. If dictionary contains no “logger” entry then an empty logger is created and subsequent calls to log() will have no effect. Otherwise a logger is created according to the entries in the logger config dictionary. (“log file name”, “overwrite existing”

Raises

IOError if the user can’t write to the named log file?

log(message)[source]

If logging, passes message to logger

log_result(actual_tre, fre, expected_tre, expected_fre, mean_fle, no_fids)[source]

Writes the registration result to log file

log_score(state_string, score)[source]

Writes the registration result to log file

read_log()[source]

reads a log file and returns lists of values