当前位置: 首页>>代码示例>>Python>>正文


Python CyclopeanInstrument.__init__方法代码示例

本文整理汇总了Python中cyclopean_instrument.CyclopeanInstrument.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CyclopeanInstrument.__init__方法的具体用法?Python CyclopeanInstrument.__init__怎么用?Python CyclopeanInstrument.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cyclopean_instrument.CyclopeanInstrument的用法示例。


在下文中一共展示了CyclopeanInstrument.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, channel='1'):
        CyclopeanInstrument.__init__(self, name, tags=['measure'])
        
        # relevant parameters
        self.add_parameter('countrate',
                           flags=Instrument.FLAG_GET,
                           units='Hz',
                           tags=['measure'],
                           channels=('cntr1', 'cntr2'),
                           channel_prefix='%s_',
                           doc="""
                           Returns the count rates for all counters.
                           """)

        # public functions
        self.add_function("monitor_countrates")

        # init parameters
        self._countrate = {'cntr1': 0.0, 'cntr2': 0.0, }
        
        # instruments we need to access
        # import qt
        # self._ins_adwin = qt.instruments['adwin']

        # cyclopean features
        self._supported = {
            'get_running': True,
            'get_recording': True,
            'set_running': True,
            'set_recording': False,
            'save': False,
            }

        self._busy = False
开发者ID:AdriaanRol,项目名称:measurement,代码行数:36,代码来源:counters_demo.py

示例2: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, address=None):
        CyclopeanInstrument.__init__(self, name, tags=['measure', 'generate', 'virtual'])

        # relevant parameters
        self.add_parameter('integration_time',
                           type=types.IntType,
                           flags=Instrument.FLAG_SET | Instrument.FLAG_SOFTGET,
                           units='ms',
                           minval=1, maxval=10000,
                           doc="""
                           How long to count to determine the rate.
                           """)

        self.add_parameter('channel',
                           type=types.IntType,
                           flags=Instrument.FLAG_SET | Instrument.FLAG_SOFTGET,
                           units='',
                           minval=1, maxval=5,
                           doc="""
                           ADwin counter channel (1 - 4) or ADwiun counter 1 + counter 2 (channel 5)
                           """)

        self.add_parameter('counts',
                           type=types.IntType,
                           flags=Instrument.FLAG_GET,
                           units='counts',
                           tags=['measure'],
                           doc="""
                           Returns the counts acquired during the last counting period.
                           """)

        self.add_parameter('countrate',
                           type=types.IntType,
                           flags=Instrument.FLAG_GET,
                           units='Hz',
                           tags=['measure'],
                           doc="""
                           Returns the count rate based on the current count value.
                           """)

        # init parameters
        self.set_channel(5)
        self._counts = 0
        self._countrate = 0

        # instruments we need to access
        import qt
#        self._ins_pos = qt.instruments['dummy_pos']
        self._ins_ADwin = qt.instruments['ADwin']

        self.set_integration_time(20.0)

        self._supported = {
            'get_running': True,
            'get_recording': True,
            'set_running': True,
            'set_recording': False,
            'save': False,
            }
开发者ID:AdriaanRol,项目名称:measurement,代码行数:61,代码来源:ADwin_counter.py

示例3: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, adwin):
        """
        Parameters:
            adwin : string
                qtlab-name of the adwin instrument to be used
        """
        CyclopeanInstrument.__init__(self, name, tags=['measure'])
        
        # relevant parameters
        self.add_parameter('countrate',
                           flags=Instrument.FLAG_GET,
                           units='Hz',
                           tags=['measure'],
                           channels=('cntr1', 'cntr2'),
                           channel_prefix='%s_',
                           doc="""
                           Returns the count rates for all counters.
                           """)
        self.add_parameter('integration_time',
                flags=Instrument.FLAG_GETSET,
                units='ms',
                minval=1,
                maxval=1e6)
        self.add_parameter('avg_periods',
                flags=Instrument.FLAG_GETSET,
                minval=1,
                maxval=1e6)

        # init parameters
        self._countrate = {'cntr1': 0.0, 'cntr2': 0.0, }
        self._integration_time = 1
        self._avg_periods = 100
        
        # instruments we need to access
        self._ins_adwin = qt.instruments[adwin]

        # cyclopean features
        self._supported = {
            'get_running': True,
            'get_recording': True,
            'set_running': True,
            'set_recording': False,
            'save': False,
            }

        self._busy = False
开发者ID:AdriaanRol,项目名称:measurement,代码行数:48,代码来源:counters_via_adwin.py

示例4: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, use={}):
        CyclopeanInstrument.__init__(self, name, tags=[], use=use)
        
        self._supported = {
            'get_running': False,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': False,
            }

        self.add_parameter('keyword',
                           type = types.StringType,
                           flags=Instrument.FLAG_GETSET,
                           units='' )

        self.add_function('set_control_variable')
        self.add_function('get_control_variable')
开发者ID:machielblok,项目名称:qtlab-user-diamond-master,代码行数:20,代码来源:setup_controller.py

示例5: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, linescan, mos):
        CyclopeanInstrument.__init__(self, name, tags=['measure'])

        self._mos = qt.instruments[mos]
        self._linescan = qt.instruments[linescan]


        # add the relevant parameters for a scanner based on line scans
        self.add_parameter('linescan_dimensions',
                type=types.TupleType,
                flags=Instrument.FLAG_GETSET)

        self.add_parameter('linescan_px_time', 
                type=types.FloatType,
                flags=Instrument.FLAG_GETSET,
                units='ms')

        self.add_parameter('linescan_steps',
                type=types.IntType,
                flags=Instrument.FLAG_GETSET)

        self.add_parameter('linescan_starts',
                type=types.ListType,
                flags=Instrument.FLAG_GETSET)

        self.add_parameter('linescan_stops',
                type=types.ListType,
                flags=Instrument.FLAG_GETSET)
         
        self.add_parameter('current_line',
                type=types.TupleType,
                flags=Instrument.FLAG_GET)
 

        self._supported = {
            'get_running': True,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': True,
            }

        # initialize vars
        self._current_line = ()
开发者ID:AdriaanRol,项目名称:measurement,代码行数:46,代码来源:scan.py

示例6: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, address=None):
        CyclopeanInstrument.__init__(self, name, tags=[])

        self._supported = {
            'get_running': False,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': False,
            }

        self.add_parameter('doubleSpinBox_start_F',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0.0,
                           maxval=99.0,
                           doc='')
        self._doubleSpinBox_start_F = 0.0

        self.add_parameter('doubleSpinBox_stop_f',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0.0,
                           maxval=99.0,
                           doc='')
        self._doubleSpinBox_stop_f = 0.0

        self.add_parameter('doubleSpinBox_step_f',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0.0,
                           maxval=99.0,
                           doc='')
        self._doubleSpinBox_step_f = 0.0

        self.add_function('start_scan_button')

        self.add_function('stop_scan_button')

        self.add_function('save_scan_button')
开发者ID:teamdiamond,项目名称:cyclops,代码行数:45,代码来源:cyclopean_example2.py

示例7: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, address=None):
        CyclopeanInstrument.__init__(self, name, tags=[])

        self._supported = {
            'get_running': False,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': False,
            }

        self.add_parameter('t_range',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0,
                           maxval=99,
                           doc='')
        self._t_range = 0

        self.add_parameter('integration_time',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0,
                           maxval=99,
                           doc='')
        self._integration_time = 0

        self.add_parameter('countrate',
                           type=types.IntType,
                           flags=Instrument.FLAG_GET,
                           units='',
                           doc='')
        self._countrate = 0

        self.set_is_running(True)
开发者ID:AdriaanRol,项目名称:measurement,代码行数:39,代码来源:cyclopean_counts_v2.py

示例8: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, address=None):
        CyclopeanInstrument.__init__(self, name,
                                     tags=['measure', 'generate', 'virtual'])

        # add the relevant parameters for a 2D PL scanner
        self.add_parameter('pixel_time', type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           units='ms',
                           minval=1, maxval=1000,
                           doc="""
                           Integration time per image pixel.
                           """)

        self.add_parameter('xstart',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           minval=0.0, maxval=50.0,
                           units='um')

        self.add_parameter('xstop',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           minval=0.0, maxval=50.0,
                           units='um')

        self.add_parameter('ystart',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           minval=0.0, maxval=50.0,
                           units='um')

        self.add_parameter('ystop',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           minval=0.0, maxval=50.0,
                           units='um')

        self.add_parameter('xsteps',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           minval=2, maxval=1000,
                           units='')

        self.add_parameter('ysteps',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           minval=2, maxval=1000,
                           units='')

        self.add_parameter('data',
                           tags=['measure'],
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='cps',
                           doc="""
                           Returns the full data array, not a single value.
                           The dimensions are given by the scan settings.
                           """)

        self.add_parameter('x',
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='um',
                           doc="""
                           Returns the x coordinates of the data pixels.
                           """)
        
        self.add_parameter('y',
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='um',
                           doc="""
                           Returns the y coordinates of the data pixels.
                           """)

        self.add_parameter('last_line_index',
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='',
                           doc="""
                           Returns the index of the last line of which data is
                           available.
                           """)

        self.add_parameter('last_line',
                           tags=['measure'],
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='cps',
                           doc="""
                           Returns the last line of the measured data.
                           """)
        
        # relevant functions to be visible outside
        # a method that gives only a specified range of lines back
        # (minimize data exchange)
        self.add_function('get_line')
        self.add_function('get_lines')

        # method to set up the data field: after setting the scan area, use this
#.........这里部分代码省略.........
开发者ID:AdriaanRol,项目名称:measurement,代码行数:103,代码来源:ADwin_scan2d.py

示例9: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, linescan, mos, counters):
        CyclopeanInstrument.__init__(self, name, tags=[])

        self._linescan = qt.instruments[linescan]
        self._mos = qt.instruments[mos]
        self._counters = qt.instruments[counters]
        self._counter_was_running = False
        
        self.add_parameter('dimension',
                type=types.StringType,
                flags=Instrument.FLAG_GETSET)
        
        self.add_parameter('scan_length',
                           type = types.FloatType,
                           flags = Instrument.FLAG_GETSET,
                           units = 'um',)

        self.add_parameter('pixel_time',
                           type = types.FloatType,
                           flags = Instrument.FLAG_GETSET,
                           units = 'ms',) 

        self.add_parameter('nr_of_points',
                           type = types.IntType,
                           flags = Instrument.FLAG_GETSET, )

        self.add_parameter('gaussian_fit',
                           type = types.BooleanType,
                           flags = Instrument.FLAG_GETSET, )

        self.add_parameter('fit_error',
                           type = types.ListType,
                           flags = Instrument.FLAG_GET,)

        self.add_parameter('fit_result',
                           type = types.ListType,
                           flags = Instrument.FLAG_GET,)

        self.add_parameter('opt_pos',
                           type = types.FloatType,
                           flags = Instrument.FLAG_GET,)

        self.add_parameter('counter',
                           type = types.IntType,
                           flags = Instrument.FLAG_GETSET, )

        self.add_parameter('points',
                           type = types.ListType,
                           flags = Instrument.FLAG_GET, )


        ### public functions
        self.add_function('run')

        # set defaults
        self._scan_length = 1.
        self._nr_of_points = 21 
        self._pixel_time = 10
        self._gaussian_fit = True
        self._fit_error = []
        self._fit_result = []
        self._opt_pos = 0.
        self._counter = 1
        self._fitdata = []
        self._points = []
        self._busy = False
        self._dimension = 'x'
开发者ID:AdriaanRol,项目名称:measurement,代码行数:69,代码来源:optimize1d_counts.py

示例10: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, adwin, dimension_set):
        """
        Parameters:
            adwin : string
                qtlab-name of the adwin instrument to be used
        """
        CyclopeanInstrument.__init__(self, name, tags=['positioner'])
        self._adwin = qt.instruments[adwin]
	
       # should not change often, hardcode is fine for now
        self.rt_dimensions = moscfg.config[dimension_set]['rt_dimensions']
         
        self.lt_dimensions = moscfg.config[dimension_set]['lt_dimensions']
        
        self.dimensions = self.rt_dimensions


        # auto generate parameters incl set and get for all dimensions
        self._make_get_set()

        # scan control
        self._linescan_running = False
        self._linescan_px_clock = 0

        self.add_parameter('linescan_running',
                type=types.BooleanType,
                flags=Instrument.FLAG_GET)
        self.add_parameter('linescan_px_clock',
                type=types.IntType,
                flags=Instrument.FLAG_GET)

        self.add_function('linescan_start')

        # for positioning with attocubes
        self.add_parameter('lt_settings',
                type=types.BooleanType,
                flags=Instrument.FLAG_GETSET)
        self._lt_settings = False
        
        # managing the coordinate system
        self.add_function('set_origin')
        self.add_function('get_origin')
        self.add_function('from_relative')
        self.add_function('to_relative')
        self.add_function('set_relative_position')
        self.add_function('get_relative_position')
        self.add_function('move_to_xyz_pos')

        # markers
        self._markers = {}
        self.add_function('set_marker')
        self.add_function('get_marker')
        self.add_function('get_markers')
        self.add_function('goto_marker')
        self.add_function('push_position')
        self.add_function('pop_position')
        self.add_function('init_positions_from_adwin_dacs')
        
        # set up config file
        cfg_fn = os.path.join(qt.config['ins_cfg_path'], name+'.cfg')
        if not os.path.exists(cfg_fn):
            _f = open(cfg_fn, 'w')
            _f.write('')
            _f.close()

        self.ins_cfg = config.Config(cfg_fn)     
        self.load_cfg()
        self.save_cfg()

        self.init_positions_from_adwin_dacs()
开发者ID:AdriaanRol,项目名称:measurement,代码行数:72,代码来源:master_of_space.py

示例11: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, adwin):
        """
        Parameters:
            adwin : string
                qtlab-name of the adwin instrument to be used
        """
        CyclopeanInstrument.__init__(self, name, tags=['positioner'])
        self._adwin = qt.instruments[adwin]
	
        # should not change often, hardcode is fine for now
        self.rt_dimensions = {
                'x' : {
                    'dac' : 'atto_x',
                    'micron_per_volt' : 9.324,
                    'max_v' : 4.29,
                    'min_v' : 0.,
                    'default' : 0.,
                    'origin' : 0.,
                    }, 
                'z' : {
                    'dac' : 'atto_z',
                    'micron_per_volt' : 5.59,
                    'min_v' : 0.,
                    'max_v' : 4.29,
                    'default' : 0.,
                    'origin' : 0.,
                    },
                'y' : {
                    'dac' : 'atto_y',
                    'micron_per_volt' : 9.324,
                    'max_v' : 4.29,
                    'min_v' : 0.,
                    'default' : 0.,
                    'origin' : 0.,
                    },
                }
         
        self.lt_dimensions = {
                'x' : {
                    'dac' : 'atto_x',
                    'micron_per_volt' : 2.8,
                    'max_v' : 10,
                    'min_v' : 0.,
                    'default' : 0.,
                    'origin' : 0.,
                    }, 
                'z' : {
                    'dac' : 'atto_z',
                    'micron_per_volt' : 1.40,
                    'min_v' : 0.,
                    'max_v' : 10,
                    'default' : 0.,
                    'origin' : 0.,
                    },
                'y' : {
                    'dac' : 'atto_y',
                    'micron_per_volt' : 2.8,
                    'max_v' : 10,
                    'min_v' : 0.,
                    'default' : 0.,
                    'origin' : 0.,
                    },
                }
        
        self.dimensions = self.rt_dimensions


        # auto generate parameters incl set and get for all dimensions
        for d in self.dimensions:
            dim = self.dimensions[d]
            
            # make set and get
            self._make_get(d)
            self._make_set(d)
            
            # make stepping function
            self._make_stepfunc(d)

            # register parameter (set and get need to exist already)
            self.add_parameter(d, 
                    type=types.FloatType,
                    flags=Instrument.FLAG_GETSET, 
                    units='um',
                    minval=dim['min_v']*dim['micron_per_volt'],
                    maxval=dim['max_v']*dim['micron_per_volt'], )

            # register the step function
            self.add_function('step_'+d)

        # scan control
        self._linescan_running = False
        self._linescan_px_clock = 0

        self.add_parameter('linescan_running',
                type=types.BooleanType,
                flags=Instrument.FLAG_GET)
        self.add_parameter('linescan_px_clock',
                type=types.IntType,
                flags=Instrument.FLAG_GET)

#.........这里部分代码省略.........
开发者ID:machielblok,项目名称:qtlab-user-diamond-master,代码行数:103,代码来源:master_of_space_lt1.py

示例12: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, address=None):
        CyclopeanInstrument.__init__(self, name, tags=[])

        self._supported = {
            'get_running': False,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': False,
            }

        self.add_parameter('keyword',
                           type=types.StringType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           doc='')
        self._keyword = '' 

        self.add_parameter('x',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=-100.000000000000000,
                           maxval=100.000000000000000,
                           doc='')
        self._x = 0.0

        self.add_parameter('y',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=-100.000000000000000,
                           maxval=100.000000000000000,
                           doc='')
        self._y = 0.0

        self.add_parameter('z',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0.0,
                           maxval=100.000000000000000,
                           doc='')
        self._z = 0.0

        self.add_parameter('z_slider',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0,
                           maxval=400,
                           doc='')
        self._z_slider = 500

        self.add_parameter('step',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='',
                           minval=0.0,
                           maxval=99.0,
                           doc='')
        self._step = 1.000000000000000

        self.add_function('step_up')

        self.add_function('step_left')

        self.add_function('step_right')

        self.add_function('step_down')
开发者ID:AdriaanRol,项目名称:measurement,代码行数:72,代码来源:cyclopean_lt2_coordinator.py

示例13: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, adwin, mos, *arg, **kw):
        """
        Parameters:
            adwin : string
                qtlab-name of the adwin instrument to be used
            mos : string
                qtlab-name of the master of space to be used
        """
        CyclopeanInstrument.__init__(self, name, tags=['measure'])

        # adwin and positioner
        self._adwin = qt.instruments[adwin]
        self._mos = qt.instruments[mos]
        self._scan_value = 'counts'

        # connect the mos to monitor methods
        self._mos.connect('changed', self._mos_changed)

        # params that define the linescan
        self.add_parameter('dimensions', 
                type=types.TupleType,
                flags=Instrument.FLAG_GETSET,
                doc="""Sets the names of the dimensions involved, as specified
                in the master of space""")

        self.add_parameter('starts',
                type=types.TupleType,
                flags=Instrument.FLAG_GETSET)

        self.add_parameter('stops',
                type=types.TupleType,
                flags=Instrument.FLAG_GETSET)
 
        self.add_parameter('steps',
                type=types.IntType,
                flags=Instrument.FLAG_GETSET)

        self.add_parameter('px_time',
                type=types.IntType,
                flags=Instrument.FLAG_GETSET,
                units='ms')

        self.add_parameter('scan_value',
                type=types.StringType,
                flags=Instrument.FLAG_GETSET)

        self.add_function('get_points')

        self._points = ()
        # self._values = {1: [], 2: []}
        self.set_steps(1)
        self.set_px_time(1)
        self.set_dimensions(())
        self.set_starts(())
        self.set_stops(())
        self.set_scan_value('counts')

        # other vars
        self._px_clock = 0

        self._supported = {
            'get_running': True,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': False,
            }
开发者ID:AdriaanRol,项目名称:measurement,代码行数:69,代码来源:linescan.py

示例14: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name, address=None):
        CyclopeanInstrument.__init__(self, name, tags=["positioner", "virtual"])

        self.add_parameter(
            "X_position", type=types.FloatType, flags=Instrument.FLAG_GETSET, units="um", format="%.03f, %.03f"
        )

        self.add_parameter(
            "Y_position", type=types.FloatType, flags=Instrument.FLAG_GETSET, units="um", format="%.03f, %.03f"
        )

        self.add_parameter(
            "Z_position", type=types.FloatType, flags=Instrument.FLAG_GETSET, units="um", format="%.03f, %.03f"
        )

        self.add_parameter(
            "speed",
            type=types.FloatType,
            flags=Instrument.FLAG_SET | Instrument.FLAG_SOFTGET,
            format="%.01f, %.01f",
            units="V/s",
        )

        self.add_parameter("LT", type=types.IntType, flags=Instrument.FLAG_GETSET, minval=0, maxval=1)

        #        self.add_function('move_abs_xy')

        self._X_position = 0.0
        self._Y_position = 0.0
        self._Z_position = 0.0
        self._speed = 1.0
        self._LT = 0  # set to 1 for low temperature operation

        self._max_x_RT = 40.0  # micrometer
        self._max_y_RT = self._max_x_RT  # micrometer
        self._max_z_RT = 24.0  # micrometer
        self._cal_x_RT = 107.0  # mV/micrometer
        self._cal_y_RT = self._cal_x_RT  # mV/micrometer
        self._cal_z_RT = 171.4  # mV/micrometer
        self._max_V_RT = 4.29  # Volt
        self._max_x_LT = 30.0  # micrometer
        self._max_y_LT = self._max_x_LT  # micrometer
        self._max_z_LT = 15.0  # micrometer
        self._cal_x_LT = 357.0  # mV/micrometer
        self._cal_y_LT = self._cal_x_LT  # mV/micrometer
        self._cal_z_LT = 714.3  # mV/micrometer
        self._max_V_LT = 10.0  # Volt

        self._max_speed = 1.0  # V/s

        self._supported = {
            "get_running": False,
            "get_recording": False,
            "set_running": False,
            "set_recording": False,
            "save": False,
        }

        import qt

        self._ins_ADwin = qt.instruments["ADwin"]
        self._ins_ADwin.Load("D:\\Lucio\\AdWin codes\\ADwin_Gold_II\\cursor_move.tb0")
        if self._speed <= self._max_speed:
            self._ins_ADwin.Set_FPar(29, self._speed * 1000.0)
        else:
            self._ins_ADwin.Set_FPar(29, self._max_speed * 1000.0)

        self.set_speed(1.0)
开发者ID:wpfff,项目名称:teamdiamond_measuring,代码行数:70,代码来源:ADwin_pos3d.py

示例15: __init__

# 需要导入模块: from cyclopean_instrument import CyclopeanInstrument [as 别名]
# 或者: from cyclopean_instrument.CyclopeanInstrument import __init__ [as 别名]
    def __init__(self, name):
        CyclopeanInstrument.__init__(self, name, tags=['measure'])

        # also get the counter, need to disable when linescanning
        self._counters = qt.instruments['counters_demo']
        self._counter_was_running = False

        # add the relevant parameters for a 2D PL scanner
        self.add_parameter('pixel_time', type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='ms',
                           minval=1.0, maxval=99.0,
                           doc="""
                           Integration time per image pixel.
                           """)

        self.add_parameter('xstart',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='um')
        
        self.add_parameter('xstop',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='um')
        
        self.add_parameter('ystart',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='um')
        
        self.add_parameter('ystop',
                           type=types.FloatType,
                           flags=Instrument.FLAG_GETSET,
                           units='um')
        
        self.add_parameter('xsteps',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           units='')
        
        self.add_parameter('ysteps',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET,
                           units='')
        
        self.add_parameter('last_line_index',
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='',
                           doc="""
                           Returns the index of the last line of which data 
                           is available.
                           """)
        
        self.add_parameter('last_line',
                           type=types.ObjectType,
                           flags=Instrument.FLAG_GET,
                           units='cps',
                           doc="""
                           Returns the last line of the measured data.
                           """)
        
        self.add_parameter('counter',
                           type=types.IntType,
                           flags=Instrument.FLAG_GETSET)


        # relevant functions to be visible outside
        self.add_function('get_line')
        self.add_function('get_lines')
        self.add_function('get_x')
        self.add_function('get_y')
        self.add_function('get_data')
        self.add_function('setup_data')
        # self.add_function('move_abs_xy')

        # default params
        self.set_pixel_time(1.0)
        self.set_xstart(-2.0)
        self.set_xstop(2.0)
        self.set_ystart(-2.0)
        self.set_ystop(2.0)
        self.set_xsteps(11)
        self.set_ysteps(11)
        self.set_counter(1)  
          
        # more set up
        self.setup_data()        
        self._current_line = 0
        self._last_line = 0
        self._busy = False

        self._supported = {
            'get_running': True,
            'get_recording': False,
            'set_running': False,
            'set_recording': False,
            'save': True,
            }
开发者ID:AdriaanRol,项目名称:measurement,代码行数:102,代码来源:scan2d_demo.py


注:本文中的cyclopean_instrument.CyclopeanInstrument.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。