es_sfgtools.modeling.garpos_tools.load_utils module
- es_sfgtools.modeling.garpos_tools.load_utils.load_drive_garpos() Callable
Loads the drive_garpos function from the garpos_main.py module located within the directory specified by the GARPOS_PATH environment variable.
This function performs the following steps: 1. Retrieves the GARPOS_PATH environment variable and validates its existence. 2. Searches for the garpos_main.py file within the GARPOS_PATH directory. 3. Dynamically imports the garpos_main module and retrieves the drive_garpos function.
- Returns:
The drive_garpos function from the garpos_main.py module.
- Return type:
Callable
- Raises:
FileNotFoundError – If the GARPOS_PATH environment variable is not set, the path does not exist, or the garpos_main.py file is not found within the directory.
AttributeError – If the drive_garpos function is not found in the garpos_main module.
- es_sfgtools.modeling.garpos_tools.load_utils.load_lib() Tuple[str, str]
Loads the required library paths for GARPOS and validates their existence. This function retrieves the GARPOS_PATH environment variable, verifies its existence, and searches for the f90lib directory within it. It then ensures the presence of the lib_raytrace.so file inside the f90lib directory. If any of these components are missing, appropriate exceptions are raised. :returns: A tuple containing the paths to the f90lib directory and the
lib_raytrace.so file as strings.
- Return type:
Tuple[str, str]
- Raises:
FileNotFoundError – If GARPOS_PATH does not exist, the f90lib directory is not
found, or the lib_raytrace.so file is missing. –