lib/redred.py
def file_to_dict(filepath):
    """
    Convert file into Dictionary containing scan info and data

    if file is not valid returns an empty dictionary
    """
    DataDict = {}
    filename  = os.path.basename(filepath)
    #print(filename)
    ext = os.path.splitext(filename)[-1].lower()

    if ext == ".mat" and not filename == 't-cal':
        DataDict = name_to_info(filepath)
        DataDict['data'] = import_file(filepath)
        return(DataDict)

    Convert file into Dictionary containing scan info and data

    if file is not valid returns an empty dictionary
    
Convert file into Dictionary containing scan info and data
if file is not valid returns an empty dictionary
Convert file into Dictionary containing scan info and data if file is not valid returns an empty dictionary
def file_to_dict(filepath):
    DataDict = {}
    filename  = os.path.basename(filepath)
    ext = os.path.splitext(filename)[-1].lower()
    if ext == ".mat" and not filename == 't-cal':
        DataDict = name_to_info(filepath)
        DataDict['data'] = import_file(filepath)
        return(DataDict)
def file_to_dict ( filepath ) : DataDict = { } filename = os . path . basename ( filepath ) ext = os . path . splitext ( filename ) [ - 1 ] . lower ( ) if ext == ".mat" and not filename == 't-cal' : DataDict = name_to_info ( filepath ) DataDict [ 'data' ] = import_file ( filepath ) return ( DataDict )
Convert file into Dictionary containing scan info and data
if file is not valid returns an empty dictionary
Convert file into Dictionary containing scan info and data if file is not valid returns an empty dictionary
"""
    Convert file into Dictionary containing scan info and data

    if file is not valid returns an empty dictionary
    """ #print(filename)
filepath