示例#1
0
    def _set_microscope_parameters(self):
        from hyperspy.gui.eds import SEMParametersUI
        tem_par = SEMParametersUI()
        mapping = {
            'Acquisition_instrument.SEM.beam_energy': 'tem_par.beam_energy',
            'Acquisition_instrument.SEM.tilt_stage': 'tem_par.tilt_stage',
            'Acquisition_instrument.SEM.Detector.EDS.live_time': 'tem_par.live_time',
            'Acquisition_instrument.SEM.Detector.EDS.azimuth_angle': 'tem_par.azimuth_angle',
            'Acquisition_instrument.SEM.Detector.EDS.elevation_angle': 'tem_par.elevation_angle',
            'Acquisition_instrument.SEM.Detector.EDS.energy_resolution_MnKa': 'tem_par.energy_resolution_MnKa', }

        for key, value in mapping.iteritems():
            if self.metadata.has_item(key):
                exec('%s = self.metadata.%s' % (value, key))
        tem_par.edit_traits()

        mapping = {
            'Acquisition_instrument.SEM.beam_energy': tem_par.beam_energy,
            'Acquisition_instrument.SEM.tilt_stage': tem_par.tilt_stage,
            'Acquisition_instrument.SEM.Detector.EDS.live_time': tem_par.live_time,
            'Acquisition_instrument.SEM.Detector.EDS.azimuth_angle': tem_par.azimuth_angle,
            'Acquisition_instrument.SEM.Detector.EDS.elevation_angle': tem_par.elevation_angle,
            'Acquisition_instrument.SEM.Detector.EDS.energy_resolution_MnKa': tem_par.energy_resolution_MnKa, }

        for key, value in mapping.iteritems():
            if value != t.Undefined:
                self.metadata.set_item(key, value)
        self._are_microscope_parameters_missing()
示例#2
0
文件: eds_sem.py 项目: mfm24/hyperspy
 def _set_microscope_parameters(self):    
     
     tem_par = SEMParametersUI()            
     mapping = {
     'SEM.beam_energy' : 'tem_par.beam_energy',        
     'SEM.tilt_stage' : 'tem_par.tilt_stage',
     'SEM.EDS.live_time' : 'tem_par.live_time',
     'SEM.EDS.azimuth_angle' : 'tem_par.azimuth_angle',
     'SEM.EDS.elevation_angle' : 'tem_par.elevation_angle',
     'SEM.EDS.energy_resolution_MnKa' : 'tem_par.energy_resolution_MnKa',}
    
     for key, value in mapping.iteritems():
         if self.mapped_parameters.has_item(key):
             exec('%s = self.mapped_parameters.%s' % (value, key))
     tem_par.edit_traits()
               
     mapping = {
     'SEM.beam_energy' : tem_par.beam_energy,        
     'SEM.tilt_stage' : tem_par.tilt_stage,
     'SEM.EDS.live_time' : tem_par.live_time,
     'SEM.EDS.azimuth_angle' : tem_par.azimuth_angle,
     'SEM.EDS.elevation_angle' : tem_par.elevation_angle,
     'SEM.EDS.energy_resolution_MnKa' : tem_par.energy_resolution_MnKa,}
     
     
     for key, value in mapping.iteritems():
         if value != t.Undefined:
             exec('self.mapped_parameters.%s = %s' % (key, value))
     self._are_microscope_parameters_missing()
示例#3
0
    def _set_microscope_parameters(self):

        tem_par = SEMParametersUI()
        mapping = {
            'SEM.beam_energy': 'tem_par.beam_energy',
            'SEM.tilt_stage': 'tem_par.tilt_stage',
            'SEM.EDS.live_time': 'tem_par.live_time',
            'SEM.EDS.azimuth_angle': 'tem_par.azimuth_angle',
            'SEM.EDS.elevation_angle': 'tem_par.elevation_angle',
            'SEM.EDS.energy_resolution_MnKa': 'tem_par.energy_resolution_MnKa',
        }

        for key, value in mapping.iteritems():
            if self.mapped_parameters.has_item(key):
                exec('%s = self.mapped_parameters.%s' % (value, key))
        tem_par.edit_traits()

        mapping = {
            'SEM.beam_energy': tem_par.beam_energy,
            'SEM.tilt_stage': tem_par.tilt_stage,
            'SEM.EDS.live_time': tem_par.live_time,
            'SEM.EDS.azimuth_angle': tem_par.azimuth_angle,
            'SEM.EDS.elevation_angle': tem_par.elevation_angle,
            'SEM.EDS.energy_resolution_MnKa': tem_par.energy_resolution_MnKa,
        }

        for key, value in mapping.iteritems():
            if value != t.Undefined:
                exec('self.mapped_parameters.%s = %s' % (key, value))
        self._are_microscope_parameters_missing()
示例#4
0
    def _set_microscope_parameters(self):
        from hyperspy.gui.eds import SEMParametersUI
        tem_par = SEMParametersUI()
        mapping = {
            'Acquisition_instrument.SEM.beam_energy':
            'tem_par.beam_energy',
            'Acquisition_instrument.SEM.tilt_stage':
            'tem_par.tilt_stage',
            'Acquisition_instrument.SEM.Detector.EDS.live_time':
            'tem_par.live_time',
            'Acquisition_instrument.SEM.Detector.EDS.azimuth_angle':
            'tem_par.azimuth_angle',
            'Acquisition_instrument.SEM.Detector.EDS.elevation_angle':
            'tem_par.elevation_angle',
            'Acquisition_instrument.SEM.Detector.EDS.energy_resolution_MnKa':
            'tem_par.energy_resolution_MnKa',
        }

        for key, value in mapping.iteritems():
            if self.metadata.has_item(key):
                exec('%s = self.metadata.%s' % (value, key))
        tem_par.edit_traits()

        mapping = {
            'Acquisition_instrument.SEM.beam_energy':
            tem_par.beam_energy,
            'Acquisition_instrument.SEM.tilt_stage':
            tem_par.tilt_stage,
            'Acquisition_instrument.SEM.Detector.EDS.live_time':
            tem_par.live_time,
            'Acquisition_instrument.SEM.Detector.EDS.azimuth_angle':
            tem_par.azimuth_angle,
            'Acquisition_instrument.SEM.Detector.EDS.elevation_angle':
            tem_par.elevation_angle,
            'Acquisition_instrument.SEM.Detector.EDS.energy_resolution_MnKa':
            tem_par.energy_resolution_MnKa,
        }

        for key, value in mapping.iteritems():
            if value != t.Undefined:
                self.metadata.set_item(key, value)
        self._are_microscope_parameters_missing()