Ejemplo n.º 1
0
    def choose_save_location(self, widget, data=None):
        print "choose location clicked"
        chooser = gtk.FileChooserDialog(title=None,action=gtk.FILE_CHOOSER_ACTION_OPEN,
            buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) 
        chooser.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
        resp = chooser.run()
        if resp == gtk.RESPONSE_OK:
            self.mLocalSavePath = chooser.get_filename()
            self.mServerSidePath,self.mSavePathOK = mountpoint_conversion.get_pilatus_path(self.mLocalSavePath)
            self.update_view()
            
            print self.mLocalSavePath, 'selected'
            
        elif resp == gtk.RESPONSE_CANCEL:
            print 'Closed, no files selected'
			
        chooser.destroy()
Ejemplo n.º 2
0
    def choose_save_location(self, widget, data=None):
        print "choose location clicked"
        chooser = gtk.FileChooserDialog(
            title=None,
            action=gtk.FILE_CHOOSER_ACTION_OPEN,
            buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN,
                     gtk.RESPONSE_OK))
        chooser.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
        resp = chooser.run()
        if resp == gtk.RESPONSE_OK:
            self.mLocalSavePath = chooser.get_filename()
            self.mServerSidePath, self.mSavePathOK = mountpoint_conversion.get_pilatus_path(
                self.mLocalSavePath)
            self.update_view()

            print self.mLocalSavePath, 'selected'

        elif resp == gtk.RESPONSE_CANCEL:
            print 'Closed, no files selected'

        chooser.destroy()
Ejemplo n.º 3
0
    def read_config_file(self, cfilename):
        # Load from config file values that exist there
        cp = SafeConfigParser()
        cp.read(cfilename)
        if cp.has_option('ScanParameters', 'scantype'):
            self.mScanType = cp.getint('ScanParameters', 'scantype')
        if cp.has_option('ScanParameters', 'mot1movementtype'):
            self.mMot1MovementType = cp.getint('ScanParameters',
                                               'mot1movementtype')

        # Motor 1
        if cp.has_option('ScanParameters', 'mot1start'):
            self.mMot1Start = cp.getfloat('ScanParameters', 'mot1start')
        if cp.has_option('ScanParameters', 'mot1end'):
            self.mMot1End = cp.getfloat('ScanParameters', 'mot1end')
        if cp.has_option('ScanParameters', 'mot1step'):
            self.mMot1Step = cp.getint('ScanParameters', 'mot1step')

        # Motor 2
        if cp.has_option('ScanParameters', 'mot2start'):
            self.mMot2Start = cp.getfloat('ScanParameters', 'mot2start')
        if cp.has_option('ScanParameters', 'mot2end'):
            self.mMot2End = cp.getfloat('ScanParameters', 'mot2end')
        if cp.has_option('ScanParameters', 'mot2step'):
            self.mMot2Step = cp.getint('ScanParameters', 'mot2step')

        # Other
        if cp.has_option('ScanParameters', 'AcqTime'):
            self.mAcqTime = cp.getfloat('ScanParameters', 'AcqTime')
        if cp.has_option('ScanParameters', 'AcqCount'):
            self.mAcqCount = cp.getfloat('ScanParameters', 'AcqCount')
        if cp.has_option('ScanParameters', 'FileNamePrefix'):
            self.mFileNamePrefix = cp.get('ScanParameters', 'FileNamePrefix')
        if cp.has_option('ScanParameters', 'LocalSavePath'):
            self.mLocalSavePath = cp.get('ScanParameters', 'LocalSavePath')
            self.mServerSidePath, self.mSavePathOK = mountpoint_conversion.get_pilatus_path(
                self.mLocalSavePath)
Ejemplo n.º 4
0
    def read_config_file(self, cfilename):
        # Load from config file values that exist there
        cp = SafeConfigParser()
        cp.read(cfilename)
        if cp.has_option('ScanParameters','scantype'):  
            self.mScanType = cp.getint('ScanParameters','scantype')
        if cp.has_option('ScanParameters','mot1movementtype'):  
            self.mMot1MovementType = cp.getint('ScanParameters','mot1movementtype')        

        
        # Motor 1        
        if cp.has_option('ScanParameters','mot1start'):  
            self.mMot1Start = cp.getfloat('ScanParameters','mot1start')
        if cp.has_option('ScanParameters','mot1end'):  
            self.mMot1End = cp.getfloat('ScanParameters','mot1end')
        if cp.has_option('ScanParameters','mot1step'):  
            self.mMot1Step = cp.getint('ScanParameters','mot1step')

        # Motor 2
        if cp.has_option('ScanParameters','mot2start'):  
            self.mMot2Start = cp.getfloat('ScanParameters','mot2start')
        if cp.has_option('ScanParameters','mot2end'):  
            self.mMot2End = cp.getfloat('ScanParameters','mot2end')
        if cp.has_option('ScanParameters','mot2step'):  
            self.mMot2Step = cp.getint('ScanParameters','mot2step')

        # Other
        if cp.has_option('ScanParameters','AcqTime'):  
            self.mAcqTime = cp.getfloat('ScanParameters','AcqTime')
        if cp.has_option('ScanParameters','AcqCount'):  
            self.mAcqCount = cp.getfloat('ScanParameters','AcqCount')
        if cp.has_option('ScanParameters','FileNamePrefix'):  
            self.mFileNamePrefix = cp.get('ScanParameters','FileNamePrefix')
        if cp.has_option('ScanParameters','LocalSavePath'):  
            self.mLocalSavePath = cp.get('ScanParameters','LocalSavePath')
            self.mServerSidePath,self.mSavePathOK = mountpoint_conversion.get_pilatus_path(self.mLocalSavePath)