Exemple #1
0
    def __init__(self, name, data_queue):
        Logger.__init__(self, name + ' AcqPipeline')
        self.info('Initializing pipeline')
        self._stages = []

        self._data_queue = data_queue

        self._running = False
Exemple #2
0
    def __init__(self, spidr_ctrl, device_num):
        Logger.__init__(self, SpidrDevice.__name__)
        self._ctrl = weakref.proxy(spidr_ctrl)
        self._dev_num = device_num

        self.info("Device {} with id {} created".format(self._dev_num, self.deviceId))

        self.clearPixelConfig()
Exemple #3
0
    def __init__(self, stage, num_processes=1):
        Logger.__init__(self, 'AcqStage-{}'.format(stage))
        self._stage_number = stage

        self._pipeline_objects = []
        self._pipeline_klass = None
        self._num_processes = num_processes
        self._running = False
        self._input_queue = None
        self._output_queue = None

        self._args = []
        self._kwargs = {}
Exemple #4
0
    def __init__(self, spidr_address, src_ip_port=('192.168.1.1', 0)):
        Logger.__init__(self, 'Pymepix')
        self._spidr = SPIDRController(spidr_address, src_ip_port)

        self._timepix_devices = []

        self._data_queue = Queue()
        self._createTimepix()
        self._spidr.setBiasSupplyEnable(True)
        self.biasVoltage = 50
        self.enablePolling()
        self._data_thread = threading.Thread(target=self.data_thread)
        self._data_thread.daemon = True
        self._data_thread.start()

        self._running = False
Exemple #5
0
    def __init__(self, filename):
        Logger.__init__(self, SophyConfig.__name__)
        self.__filename = filename

        self._dac_codes = {
            "Ibias_Preamp_ON": 1,
            "Ibias_Preamp_OFF": 2,
            "VPreamp_NCAS": 3,
            "Ibias_Ikrum": 4,
            "Vfbk": 5,
            "Vthreshold_fine": 6,
            "Vthreshold_coarse": 7,
            "Ibias_DiscS1_ON": 8,
            "Ibias_DiscS1_OFF": 9,
            "Ibias_DiscS2_ON": 10,
            "Ibias_DiscS2_OFF": 11,
            "Ibias_PixelDAC": 12,
            "Ibias_TPbufferIn": 13,
            "Ibias_TPbufferOut": 14,
            "VTP_coarse": 15,
            "VTP_fine": 16,
            "Ibias_CP_PLL": 17,
            "PLL_Vcntrl": 18,
        }

        self._dac_values = {
            "Ibias_Preamp_ON": 128,
            "Ibias_Preamp_OFF": 8,
            "VPreamp_NCAS": 128,
            "Ibias_Ikrum": 10,
            "Vfbk": 128,
            "Vthreshold_fine": 150,
            "Vthreshold_coarse": 6,
            "Ibias_DiscS1_ON": 128,
            "Ibias_DiscS1_OFF": 8,
            "Ibias_DiscS2_ON": 128,
            "Ibias_DiscS2_OFF": 8,
            "Ibias_PixelDAC": 150,
            "Ibias_TPbufferIn": 128,
            "Ibias_TPbufferOut": 128,
            "VTP_coarse": 128,
            "VTP_fine": 256,
            "Ibias_CP_PLL": 128,
            "PLL_Vcntrl": 128,
        }
        self.loadFile(self.__filename)
Exemple #6
0
    def __init__(self, dst_ip_port, src_ip_port=('192.168.1.1', 0)):
        Logger.__init__(self, SPIDRController.__name__)

        self.info('Connecting to {}:{}'.format(*dst_ip_port))

        self._sock = socket.create_connection(dst_ip_port,
                                              source_address=src_ip_port)
        self._request_lock = threading.Lock()
        self._req_buffer = np.ndarray(shape=(512, ), dtype=np.uint32)
        self._reply_buffer = bytearray(4096)
        self._reply_view = memoryview(self._reply_buffer)

        self._vec_htonl = np.vectorize(self.convertHtonl)
        self._vec_ntohl = np.vectorize(self.convertNtohl)

        self._pixel_config = np.ndarray(shape=(256, 256), dtype=np.uint8)
        # self.resetModule(SpidrReadoutSpeed.Default)
        self._devices = []
        self._initDevices()
    def __init__(self,
                 spidr_address="default",
                 src_ip_port="default",
                 pipeline_class=PixelPipeline):
        Logger.__init__(self, "Pymepix")
        if spidr_address == "default":
            spidr_address = (cfg.default_cfg["timepix"]["tpx_ip"], 50000)
        if src_ip_port == "default":
            src_ip_port = (cfg.default_cfg["timepix"]["pc_ip"], 0)
        self._spidr = SPIDRController(spidr_address, src_ip_port)

        self._timepix_devices: list[TimepixDevice] = []

        self._data_queue = Queue()
        self._createTimepix(pipeline_class)
        self._spidr.setBiasSupplyEnable(True)
        self.biasVoltage = 50
        self.enablePolling()
        self._data_thread = threading.Thread(target=self.data_thread)
        self._data_thread.daemon = True
        self._data_thread.start()

        self._running = False