opticks

Functions

process_paths(filepath, *search_dirs)

Inits a filepath with different alternative locations.

process_paths(filepath, *search_dirs)[source]

Inits a filepath with different alternative locations.

Searches the file first in the given path, then in the current working directory. If it does not exist, tries the alternate directories. Returns None if the file is not found in any of the directories.

  • Nominal path: current working dir + filepath

  • Alternate paths: current working dir + alternate search dir + filepath

Parameters:
  • filepath (Path) – File path

  • search_dirs (Path) – Alternate search directories

Returns:

Path – Path of the file, None if not found

Modules

opticks.imager_model

opticks.utils