pylbo.utilities.datfiles.file_loader
Functions
|
Checks the file validity of a given logfile or datfile. |
|
Loads a single Legolas datfile. |
|
Loads multiple Legolas datfiles. |
|
Reads a Legolas log file. |
Opens an interactive window to select files to open. |
Module Contents
- pylbo.utilities.datfiles.file_loader._validate_file(file)[source]
Checks the file validity of a given logfile or datfile.
- Parameters:
file (str, PathLike) – The path to the datfile, either as a
str
orPathLike
object.- Raises:
FileNotFoundError – If the datfile can not be found.
InvalidLegolasFile – If the datfile is not a valid Legolas output file.
- pylbo.utilities.datfiles.file_loader.load(datfile)[source]
Loads a single Legolas datfile.
- Parameters:
- Raises:
ValueError – If datfile is not a single file.
- Returns:
ds – A dataset instance for the given datfile.
- Return type:
- pylbo.utilities.datfiles.file_loader.load_series(datfiles)[source]
Loads multiple Legolas datfiles.
- Parameters:
datfiles (list, numpy.ndarray) – Paths to the datfiles that should be loaded, in list/array form. Every element should be a string or a ~os.PathLike object.
- Raises:
ValueError – If an empty list or array is supplied.
- Returns:
series – A dataseries instance for the given datfiles.
- Return type: