ocmw.core.fileTools module¶
Basic file manipulation tools used in the OCMW processes.
Get a list of file from a directory based on a search string. |
|
This function should be called instead of direct scipy.io.loadmat as it cures the problem of not properly recovering python dictionaries from mat files. |
|
Generate a generic global attributes dictionary for adding meta data to a data dictionary. |
Basic file manipulation tools used in the OCMW processes.
- ocmw.core.fileTools.getListOfFiles(filePath, searchStr='')[source]¶
Get a list of file from a directory based on a search string.
- ocmw.core.fileTools.loadmat(filename)[source]¶
This function should be called instead of direct scipy.io.loadmat as it cures the problem of not properly recovering python dictionaries from mat files. It calls the function check keys to cure all entries which are still mat-objects.
- ocmw.core.fileTools.print_mat_nested(d, indent=0)[source]¶
Pretty print nested structures from .mat files
- ocmw.core.fileTools.generateGlobalAttributes(titleStr)[source]¶
Generate a generic global attributes dictionary for adding meta data to a data dictionary.
- Parameters:
titleStr (str) – a string defining the data set being attributed.
- Returns:
globalAttr (dict) – a dictionary containing generic data about the dataset creation.