module pathlib.Path, image_format: str, logger: Optional[logging.Logger] = None) str[source] str) Optional[str][source] pathlib.Path, image_type: str, suffix: str, image_format: str, look_without_suffix: bool = False, logger: Optional[logging.Logger] = None) List[str][source] pathlib.Path, type: str, suffix: str, image_format: str) Optional[List[str]][source] pathlib.Path, log_name: str, logger: Optional[logging.Logger] = 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 numpy.ndarray, projection_angles: numpy.ndarray) Tuple[numpy.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) Optional[str][source]
>>> get_file_extension("/home/user/file_path.test")
>>> get_file_extension("/home/user/file.path.test")
>>> get_file_extension("/home/")

# above is expecting a None which.. well doesn’t show as anything so just # an empty line with a comment explaining it Optional[Union[pathlib.Path, str]], 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) List[str][source]

Get all folder names in a specific path.


path – The path to be checked.


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