lephare.data_manager

Classes

DataManager

Module Contents

class DataManager[source]
lephare_dir[source]
lephare_work_dir[source]
property LEPHAREDIR[source]
property LEPHAREWORK[source]
configure_directories()[source]
create_new_run(descriptive_directory_name=None)[source]

Create a timestamped directory to contain the output from the current run. The newly created timestamped directory is symlinked to the path defined by the LEPHAREWORK environment variable.

Parameters:

descriptive_directory_name (str) – A descriptive name for the new run directory. If None, the directory will be named with the current timestamp.

Returns:

run_directory – The path to the newly created run directory.

Return type:

str

create_work_subdirectories(parent_dir)[source]

Creates the required work subdirectories in the parent directory if they are not present. No action is taken if the subdirectories already exist.

remove_empty_run_directories()[source]

Remove any empty run directories from the cache. If any file exists in any of the subdirectories, the run directory is not considered empty. Note that we generate a new run directory if the work directory is no longer a symlink.