module Path, image_format: str, logger: Logger | None = None) str[source] str) str | None[source] Path, image_type: str, suffix: str, image_format: str, look_without_suffix: bool = False, logger: Logger | None = None) List[str][source] Path, type: str, suffix: str, image_format: str) List[str] | None[source] Path, log_name: str, logger: Logger | None = None) str[source]
  • dirname – The directory in which the sample images were found

  • log_name – The log name is typically the directory name of the sample

  • logger – The logger that find_log should report back via, should an error occur.

Returns: ndarray, projection_angles: ndarray) Tuple[ndarray, float][source]

Finds the projection closest to 180 and returns it with the difference. :param projections: The array of projection images. :param projection_angles: The array of projection angles. :return: The 180 projection/the closest non-180 projection and the difference between its angle and 180. str) List[str][source]

Gets a list of file extensions which can be used to load files. :param ext: User provided file extension :returns: List of extensions in the order they should be tested str) str[source]
>>> get_file_extension("/home/user/file_path.test")
>>> get_file_extension("/home/user/file.path.test")
>>> get_file_extension("/home/")
'' Path | str | None, img_format: str, prefix: str = '', essential: bool = True) List[str][source]

Get all file names in a directory with a specific format. :param path: The path to be checked.

  • img_format – The image format used as a postfix after the .

  • prefix – A specific prefix for the images

  • essential – Flag indicating if failure to find file should raise and exception


All the file names, sorted by ascending str, separator: str = '_') str[source]