lib/transient.py
def import_file_mat(self, filepath):
        """Import data from a raw .mat file generated by redred software.
        extracts data about raw_time raw_trace and R0.

        """
        self.original_filepath = filepath
        data = spio.loadmat(filepath)
        try:  # if it finds the right data structure
            self.raw_time = data['Daten'][2]
            self.raw_trace = data['Daten'][0]

            self.R0 = data['DC'][0][0]
            # get all metadata from name
            metadataDict = utils.get_metadata_from_name(filepath)  # todo: add eventual non scripted parameters
            # write metadata to relative attributes
            for key in metadataDict:
                try:
                    setattr(self, key, metadataDict[key])
                except KeyError:
                    print('invalid key: ' + key)

        except KeyError:
            raise TypeError(filepath + ' is not a valid matlab scan datafile. As created by redred setup.')
Import data from a raw .mat file generated by redred software.
        extracts data about raw_time raw_trace and R0.

        
Import data from a raw .mat file generated by redred software.
extracts data about raw_time raw_trace and R0.
Import data from a raw . mat file generated by redred software . extracts data about raw_time raw_trace and R0 .
def import_file_mat(self, filepath):
        self.original_filepath = filepath
        data = spio.loadmat(filepath)
        try:  
            self.raw_time = data['Daten'][2]
            self.raw_trace = data['Daten'][0]
            self.R0 = data['DC'][0][0]
            metadataDict = utils.get_metadata_from_name(filepath)  
            for key in metadataDict:
                try:
                    setattr(self, key, metadataDict[key])
                except KeyError:
                    print('invalid key: ' + key)
        except KeyError:
            raise TypeError(filepath + ' is not a valid matlab scan datafile. As created by redred setup.')
def import_file_mat ( self , filepath ) : self . original_filepath = filepath data = spio . loadmat ( filepath ) try : self . raw_time = data [ 'Daten' ] [ 2 ] self . raw_trace = data [ 'Daten' ] [ 0 ] self . R0 = data [ 'DC' ] [ 0 ] [ 0 ] metadataDict = utils . get_metadata_from_name ( filepath ) for key in metadataDict : try : setattr ( self , key , metadataDict [ key ] ) except KeyError : print ( 'invalid key: ' + key ) except KeyError : raise TypeError ( filepath + ' is not a valid matlab scan datafile. As created by redred setup.' )
Import data from a raw .mat file generated by redred software.
Import data from a raw . mat file generated by redred software .
"""Import data from a raw .mat file generated by redred software.
        extracts data about raw_time raw_trace and R0.

        """ # if it finds the right data structure # get all metadata from name # todo: add eventual non scripted parameters # write metadata to relative attributes
self
filepath