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)[source]¶
Bases:
Enum
An enumeration.
- 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]¶