mantidimaging.core.utility.imat_log_file_parser module#
- class mantidimaging.core.utility.imat_log_file_parser.CSVLogParser(data: list[str])[source]#
Bases:
object
- EXPECTED_HEADER_FOR_IMAT_CSV_LOG_FILE = 'TIME STAMP,IMAGE TYPE,IMAGE COUNTER,COUNTS BM3 before image,COUNTS BM3 after image\n'#
- parse() dict[IMATLogColumn, list] [source]#
- class mantidimaging.core.utility.imat_log_file_parser.IMATLogColumn(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
Enum
- COUNTS_AFTER = 6#
- COUNTS_BEFORE = 5#
- IMAGE_TYPE_IMAGE_COUNTER = 2#
- PROJECTION_ANGLE = 4#
- PROJECTION_NUMBER = 3#
- TIMESTAMP = 1#
- class mantidimaging.core.utility.imat_log_file_parser.IMATLogFile(data: list[str], source_file: Path)[source]#
Bases:
object
- static find_parser(data: list[str])[source]#
Try and determine the format of the log file by checking the first row. for the type of seperator used and then attempting to normalise the data if needed before selecting the appropriate parser.
- static get_seperator(first_row: str) bool [source]#
Try and determine the seperator used in the log file. If neither a tab or comma is found, then return a RuntimeError as the format is not recognised.
@param data: The file contents to be checked @return: The seperator used in the file Exception: RuntimeError if the format is not recognised
- projection_angles() ProjectionAngles [source]#
- property source_file: Path#
- class mantidimaging.core.utility.imat_log_file_parser.TextLogParser(data: list[str])[source]#
Bases:
object
- EXPECTED_HEADER_FOR_IMAT_TEXT_LOG_FILE = ' TIME STAMP IMAGE TYPE IMAGE COUNTER COUNTS BM3 before image COUNTS BM3 after image\n'#
- parse() dict[IMATLogColumn, list] [source]#