load_dir#

ripplemapper.io.load_dir(directory: str | PosixPath, pattern: str | bool = False, skip: int = 1, start: int = 0, end: int | bool = None) tuple[list[ndarray], list[str]][source]#

Load all tif files found in directory and return the data in a list of numpy.ndarray.

Parameters:
  • directory (str | PosixPath) – Directory path to load tif files from.

  • pattern (str | bool, optional) – Optional pattern to match file names, by default False.

  • skip (int, optional) – Number of files to skip, by default 1.

  • start (int, optional) – Starting index, by default 0.

  • end (int | bool, optional) – Ending index, by default None.

Returns:

List of the data arrays extracted from the tif files and their corresponding file names.

Return type:

tuple[list[np.ndarray], list[str]]

Raises:

FileNotFoundError – If no tif files are found in the directory.