TomoPal

Submodules

tomopal.utils module

tomopal.utils.combinator(combi)[source]

Given a n-sized 1D array, generates all possible configurations, from size 1 to n-1. ‘None’ will indicate to use the original combination.

tomopal.utils.data_read(file: Optional[str] = None, start: int = 0, end: Optional[int] = None)[source]

Reads space-separated dat file

tomopal.utils.dirmaker(dird: str, erase: bool = False)[source]

Given a folder path, check if it exists, and if not, creates it. :param dird: str: Directory path. :param erase: bool: Whether to delete existing folder or not. :return:

tomopal.utils.flatten_array(arr: numpy.array) → numpy.array[source]
tomopal.utils.folder_reset(folder: str, exceptions: Optional[list] = None)[source]

Deletes files in folder

tomopal.utils.i_am_framed(array: numpy.array, ids: Optional[dict] = None, flat: bool = True) → pandas.core.frame.DataFrame[source]

Build a panda’s dataframe that contains the flattened samples, their id’s and the original shape

Module contents