View/Trap/mainWindow.py
def fileSave(self):
        """Saves the files to a specified folder.
        """
        name = 'Timetrace_Data'
        savedir = os.path.join(self._session.saveDirectory, str(datetime.now().date()))
        if not os.path.exists(savedir):
            os.makedirs(savedir)
        i=1
        filename = name
        while os.path.exists(os.path.join(savedir,filename+".dat")):
            filename = '%s_%s' %(name,i)
            i += 1

        filename = filename+".dat"
        np.savetxt(os.path.join(savedir, filename), [self.t, self.data], fmt='%s', delimiter=",")

        # Saves the data to binary format. Sometimes (not sure why) the ascii data is not being save properly...
        # Only what would appear on the screen when printing self.data.
        try:
            np.save(os.path.join(savedir, filename[:-4]), np.array(self.data))
        except:
            print('Error with Save')
            print(sys.exc_info()[0])

        print('Data saved in %s'%os.path.join(savedir, filename[:-4])) 
        return
Saves the files to a specified folder.
        
Saves the files to a specified folder.
Saves the files to a specified folder .
def fileSave(self):
        name = 'Timetrace_Data'
        savedir = os.path.join(self._session.saveDirectory, str(datetime.now().date()))
        if not os.path.exists(savedir):
            os.makedirs(savedir)
        i=1
        filename = name
        while os.path.exists(os.path.join(savedir,filename+".dat")):
            filename = '%s_%s' %(name,i)
            i += 1
        filename = filename+".dat"
        np.savetxt(os.path.join(savedir, filename), [self.t, self.data], fmt='%s', delimiter=",")
        try:
            np.save(os.path.join(savedir, filename[:-4]), np.array(self.data))
        except:
            print('Error with Save')
            print(sys.exc_info()[0])
        print('Data saved in %s'%os.path.join(savedir, filename[:-4])) 
        return
def fileSave ( self ) : name = 'Timetrace_Data' savedir = os . path . join ( self . _session . saveDirectory , str ( datetime . now ( ) . date ( ) ) ) if not os . path . exists ( savedir ) : os . makedirs ( savedir ) i = 1 filename = name while os . path . exists ( os . path . join ( savedir , filename + ".dat" ) ) : filename = '%s_%s' % ( name , i ) i += 1 filename = filename + ".dat" np . savetxt ( os . path . join ( savedir , filename ) , [ self . t , self . data ] , fmt = '%s' , delimiter = "," ) try : np . save ( os . path . join ( savedir , filename [ : - 4 ] ) , np . array ( self . data ) ) except : print ( 'Error with Save' ) print ( sys . exc_info ( ) [ 0 ] ) print ( 'Data saved in %s' % os . path . join ( savedir , filename [ : - 4 ] ) ) return
Saves the files to a specified folder.
Saves the files to a specified folder .
"""Saves the files to a specified folder.
        """ # Saves the data to binary format. Sometimes (not sure why) the ascii data is not being save properly... # Only what would appear on the screen when printing self.data.
self