karabo.util package

This package provides auxiliary function used in different parts of the code.

Submodules

karabo.util.dask

karabo.util.gpu_util

get_gpu_memory() int

Retrieves the available GPU memory in MiB by invoking nvidia-smi.

Returns:

Available GPU memory in MiB.

Return type:

int

Raises:

RuntimeError – If unexpected output is encountered when running nvidia-smi.

is_cuda_available() bool

Checks if CUDA-compatible GPU is available on the system by invoking nvidia-smi.

Returns:

True if a CUDA-compatible GPU is found, otherwise False.

Return type:

bool

karabo.util.hdf5_util

karabo.util.file_handler

karabo.util.math_util

karabo.util.rascil_util

Offers functions to handle some of the RASCIL output.

filter_data_dir_warning_message() None

Avoid unnecessary RASCIL warning that confuses users.

Currently the following RASCIL warning is suppressed:

The RASCIL data directory is not available - continuing but any simulations will fail

…which pops up because we don’t download the RASCIL data directory. To the best of our knowledge, we don’t need the data directory (31.07.2024). We can therefore ignore this warning and avoid unnecessarily alerting users with it.

karabo.util.data_util

karabo.util.survey