Example #1
0
def get_control(espia_dev_nb = '0',config_path='', config_name='', reconstruction_active='true', **keys) :
    #properties are passed here as string
    global _MaxipixAcq
    global _MaxipixInterface

    if reconstruction_active.lower() == 'true': active = True
    else: active  = False
    if _MaxipixAcq is None:
        _MaxipixAcq = MpxAcq(int(espia_dev_nb), config_path, config_name, active)
        _MaxipixInterface = _MaxipixAcq.getInterface()
        
    return Core.CtControl(_MaxipixInterface)
Example #2
0
def get_control(espia_dev_nb = '0',config_path='', config_name='', reconstruction_active='true', **keys) :
    #properties are passed here as string
    global _MaxipixAcq
    global _MaxipixInterface

    if reconstruction_active.lower() == 'true': active = True
    else: active  = False
    if _MaxipixAcq is None:
        _MaxipixAcq = MpxAcq(int(espia_dev_nb), config_path, config_name, active)
        _MaxipixInterface = _MaxipixAcq.getInterface()
        
    return Core.CtControl(_MaxipixInterface)
def get_control(
    espia_dev_nb_m1="0",
    espia_dev_nb_m2="0",
    meta_config="2x1",
    config_path_m1="",
    config_path_m2="",
    config_name_m1="",
    config_name_m2="",
    reconstruction_active="true",
    **keys
):
    # properties are passed here as string
    global _MaxipixAcqM1
    global _MaxipixAcqM2
    global _MaxipixInterfaceM1
    global _MaxipixInterfaceM2
    global _MetaInterface

    if reconstruction_active.lower() == "true":
        active = True
    else:
        active = False
    if _MaxipixAcqM1 is None and _MaxipixAcqM2 is None:
        _MaxipixAcqM1 = MpxAcq(int(espia_dev_nb_m1), config_path_m1, config_name_m1, active)
        _MaxipixAcqM2 = MpxAcq(int(espia_dev_nb_m2), config_path_m2, config_name_m2, active)

        _MaxipixInterfaceM1 = _MaxipixAcqM1.getInterface()
        _MaxipixInterfaceM2 = _MaxipixAcqM2.getInterface()
        _MetaInterface = Meta.Interface()
        if meta_config == "2x1":
            _MetaInterface.addInterface(0, 0, _MaxipixInterfaceM1)
            _MetaInterface.addInterface(1, 0, _MaxipixInterfaceM2)

        elif meta_config == "1x2":
            _MetaInterface.addInterface(0, 0, _MaxipixInterfaceM1)
            _MetaInterface.addInterface(0, 1, _MaxipixInterfaceM2)
        else:
            raise Exception, "Invalid value for property meta_config: " + meta_config

    return Core.CtControl(_MetaInterface)
Example #4
0
def get_control(espia_dev_nb_m1='0',
                espia_dev_nb_m2='0',
                meta_config='2x1',
                config_path_m1='',
                config_path_m2='',
                config_name_m1='',
                config_name_m2='',
                reconstruction_active='true',
                **keys):
    #properties are passed here as string
    global _MaxipixAcqM1
    global _MaxipixAcqM2
    global _MaxipixInterfaceM1
    global _MaxipixInterfaceM2
    global _MetaInterface

    if reconstruction_active.lower() == 'true': active = True
    else: active = False
    if _MaxipixAcqM1 is None and _MaxipixAcqM2 is None:
        _MaxipixAcqM1 = MpxAcq(int(espia_dev_nb_m1), config_path_m1,
                               config_name_m1, active)
        _MaxipixAcqM2 = MpxAcq(int(espia_dev_nb_m2), config_path_m2,
                               config_name_m2, active)

        _MaxipixInterfaceM1 = _MaxipixAcqM1.getInterface()
        _MaxipixInterfaceM2 = _MaxipixAcqM2.getInterface()
        _MetaInterface = Meta.Interface()
        if meta_config == '2x1':
            _MetaInterface.addInterface(0, 0, _MaxipixInterfaceM1)
            _MetaInterface.addInterface(1, 0, _MaxipixInterfaceM2)

        elif meta_config == '1x2':
            _MetaInterface.addInterface(0, 0, _MaxipixInterfaceM1)
            _MetaInterface.addInterface(0, 1, _MaxipixInterfaceM2)
        else:
            raise Exception("Invalid value for property meta_config: " +
                            meta_config)

    return Core.CtControl(_MetaInterface)
Example #5
0
def get_control(espia_dev_nb='0', **keys):
    #properties are passed here as string
    global _MaxipixAcq
    if _MaxipixAcq is None:
        _MaxipixAcq = MpxAcq(int(espia_dev_nb))
    return _MaxipixAcq.getControl()
Example #6
0
def get_control(espia_dev_nb = '0',**keys) :
    #properties are passed here as string
    global _MaxipixAcq
    if _MaxipixAcq is None:
        _MaxipixAcq = MpxAcq(int(espia_dev_nb))
    return _MaxipixAcq.getControl()