lib/redred.py
def importRawFile(self, file):
        """Import data from a raw .mat file generated by redred software.
        Also fetches some metadata form file name through name_to_info().
        Very mutch not universal.

        Needs improvement"""

        print('WARNING: rrScan.importRawFile() needs some improvement...')
        data = sp.io.loadmat(file)
        try:
            self.time = data['Daten'][2]
            self.rawtrace = data['Daten'][0]
            self.trace = self.rawtrace
            self.R0 = data['DC'][0][0]

        except KeyError:
            print(file + ' is not a valid redred scan datafile')
        parDict = name_to_info(file)

        for key in parDict:
            if key == 'Scan Date':
                self.date = parDict[key]
            elif key == 'Pump Power':
                self.pumpPw = parDict[key]
            elif key == 'Probe Power':
                self.probePw = parDict[key]
            elif key == 'Temperature':
                self.temperature = parDict[key]
            elif key == 'Destruction Power':
                self.destrPw = parDict[key]
            elif key == 'Material':
                self.material = parDict[key]
                #print(self.material)
            elif key == 'Pump Spot':
                self.pumpSp = parDict[key]
            elif key == 'Probe Spot':
                self.probeSp = parDict[key]
            elif key == 'Other':
                self.other = parDict[key]
            else:
                print('Unidentified Key: ' + key)

        self.originalfilename=file
        self.initParameters()
Import data from a raw .mat file generated by redred software.
        Also fetches some metadata form file name through name_to_info().
        Very mutch not universal.

        Needs improvement
Import data from a raw .mat file generated by redred software.
Also fetches some metadata form file name through name_to_info().
Very mutch not universal.

Needs improvement
Import data from a raw . mat file generated by redred software . Also fetches some metadata form file name through name_to_info () . Very mutch not universal . Needs improvement
def importRawFile(self, file):
        print('WARNING: rrScan.importRawFile() needs some improvement...')
        data = sp.io.loadmat(file)
        try:
            self.time = data['Daten'][2]
            self.rawtrace = data['Daten'][0]
            self.trace = self.rawtrace
            self.R0 = data['DC'][0][0]
        except KeyError:
            print(file + ' is not a valid redred scan datafile')
        parDict = name_to_info(file)
        for key in parDict:
            if key == 'Scan Date':
                self.date = parDict[key]
            elif key == 'Pump Power':
                self.pumpPw = parDict[key]
            elif key == 'Probe Power':
                self.probePw = parDict[key]
            elif key == 'Temperature':
                self.temperature = parDict[key]
            elif key == 'Destruction Power':
                self.destrPw = parDict[key]
            elif key == 'Material':
                self.material = parDict[key]
            elif key == 'Pump Spot':
                self.pumpSp = parDict[key]
            elif key == 'Probe Spot':
                self.probeSp = parDict[key]
            elif key == 'Other':
                self.other = parDict[key]
            else:
                print('Unidentified Key: ' + key)
        self.originalfilename=file
        self.initParameters()
def importRawFile ( self , file ) : print ( 'WARNING: rrScan.importRawFile() needs some improvement...' ) data = sp . io . loadmat ( file ) try : self . time = data [ 'Daten' ] [ 2 ] self . rawtrace = data [ 'Daten' ] [ 0 ] self . trace = self . rawtrace self . R0 = data [ 'DC' ] [ 0 ] [ 0 ] except KeyError : print ( file + ' is not a valid redred scan datafile' ) parDict = name_to_info ( file ) for key in parDict : if key == 'Scan Date' : self . date = parDict [ key ] elif key == 'Pump Power' : self . pumpPw = parDict [ key ] elif key == 'Probe Power' : self . probePw = parDict [ key ] elif key == 'Temperature' : self . temperature = parDict [ key ] elif key == 'Destruction Power' : self . destrPw = parDict [ key ] elif key == 'Material' : self . material = parDict [ key ] elif key == 'Pump Spot' : self . pumpSp = parDict [ key ] elif key == 'Probe Spot' : self . probeSp = parDict [ key ] elif key == 'Other' : self . other = parDict [ key ] else : print ( 'Unidentified Key: ' + key ) self . originalfilename = file self . initParameters ( )
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.
        Also fetches some metadata form file name through name_to_info().
        Very mutch not universal.

        Needs improvement""" #print(self.material)
self
file