lib/redred.py
def importFiles(self, files, append=False):
        '''imports any series of data files
           files can be:
               string of full path of a single scan
               list of full paths of a single scan
               folder from which all files will be imported
           if append is true, it appends the imported files at end of rrScans list
        '''
        if not append:
            self.scans = [] # clear scans in memory

        if isinstance(files, str):
            self.scans.append(rrScan())
            self.scans[-1].import_single_file(files)
            print('Imported file' + files)
        elif isinstance(files, list):
            for i in range(len(files)):
                self.scans.append(rrScan())
                self.scans[-1].import_single_file(files[i])
            print('Imported files form list')
        elif os.path.isdir(files):
            folderlist = os.listdir(files)
            for i in range(len(folderlist)):
                fullpath = files + '//' + folderlist[i]
                self.scans.append(rrScan())
                self.scans[-1].import_single_file(fullpath)
                print('Imported files form folder')
        self.update_scanList()
imports any series of data files
           files can be:
               string of full path of a single scan
               list of full paths of a single scan
               folder from which all files will be imported
           if append is true, it appends the imported files at end of rrScans list
        
imports any series of data files
files can be:
string of full path of a single scan
list of full paths of a single scan
folder from which all files will be imported
if append is true, it appends the imported files at end of rrScans list
imports any series of data files files can be : string of full path of a single scan list of full paths of a single scan folder from which all files will be imported if append is true it appends the imported files at end of rrScans list
def importFiles(self, files, append=False):
        if not append:
            self.scans = [] 
        if isinstance(files, str):
            self.scans.append(rrScan())
            self.scans[-1].import_single_file(files)
            print('Imported file' + files)
        elif isinstance(files, list):
            for i in range(len(files)):
                self.scans.append(rrScan())
                self.scans[-1].import_single_file(files[i])
            print('Imported files form list')
        elif os.path.isdir(files):
            folderlist = os.listdir(files)
            for i in range(len(folderlist)):
                fullpath = files + '//' + folderlist[i]
                self.scans.append(rrScan())
                self.scans[-1].import_single_file(fullpath)
                print('Imported files form folder')
        self.update_scanList()
def importFiles ( self , files , append = False ) : if not append : self . scans = [ ] if isinstance ( files , str ) : self . scans . append ( rrScan ( ) ) self . scans [ - 1 ] . import_single_file ( files ) print ( 'Imported file' + files ) elif isinstance ( files , list ) : for i in range ( len ( files ) ) : self . scans . append ( rrScan ( ) ) self . scans [ - 1 ] . import_single_file ( files [ i ] ) print ( 'Imported files form list' ) elif os . path . isdir ( files ) : folderlist = os . listdir ( files ) for i in range ( len ( folderlist ) ) : fullpath = files + '//' + folderlist [ i ] self . scans . append ( rrScan ( ) ) self . scans [ - 1 ] . import_single_file ( fullpath ) print ( 'Imported files form folder' ) self . update_scanList ( )
imports any series of data files
files can be:
string of full path of a single scan
list of full paths of a single scan
folder from which all files will be imported
if append is true, it appends the imported files at end of rrScans list
imports any series of data files files can be : string of full path of a single scan list of full paths of a single scan folder from which all files will be imported if append is true it appends the imported files at end of rrScans list
'''imports any series of data files
           files can be:
               string of full path of a single scan
               list of full paths of a single scan
               folder from which all files will be imported
           if append is true, it appends the imported files at end of rrScans list
        ''' # clear scans in memory
self
files
append