mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
Commandline (#66)
* WIP * WIP * removed status to string from defs * WIP * WIP * WIP removed unused functions in multi * WIP * print hex in a terrible way * WIP, loadconfig error * WIP, type to string * WIP * fix to conversion * WIP, hostname doesnt work * WIP * WIP * WIP * WIP, threshold * WIP, threshold * WIP * WIP, triggers * WIP, cycles to triggers * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * rx_udsocksize fx, WIP * WIP * WIP * WIP * file index (64 bit), WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * merge * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * New python mod
This commit is contained in:
@ -5,8 +5,6 @@ pybind11_add_module(_sls_detector
|
||||
src/experimental.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
target_link_libraries(_sls_detector PUBLIC
|
||||
slsDetectorShared
|
||||
slsReceiverShared
|
||||
@ -26,12 +24,12 @@ set( PYTHON_FILES
|
||||
dacs.py
|
||||
decorators.py
|
||||
detector_property.py
|
||||
detector.py
|
||||
eiger.py
|
||||
# detector.py
|
||||
# eiger.py
|
||||
errors.py
|
||||
experimental.py
|
||||
jungfrau_ctb.py
|
||||
jungfrau.py
|
||||
# jungfrau_ctb.py
|
||||
# jungfrau.py
|
||||
registers.py
|
||||
utils.py
|
||||
|
||||
|
@ -2,12 +2,9 @@ import os
|
||||
import sys
|
||||
import numpy as np
|
||||
sys.path.append(os.path.join(os.getcwd(), 'bin'))
|
||||
from sls_detector import Eiger, Jungfrau, Detector, defs
|
||||
from sls_detector import ExperimentalDetector
|
||||
|
||||
from _sls_detector.io import read_my302_file
|
||||
|
||||
# from sls_detector import Eiger, Jungfrau, Detector, defs
|
||||
from sls_detector import Detector
|
||||
from sls_detector import dacIndex
|
||||
d = Detector()
|
||||
e = ExperimentalDetector()
|
||||
j = Jungfrau()
|
||||
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
from .detector import Detector, DetectorError, free_shared_memory
|
||||
from .eiger import Eiger
|
||||
from .experimental import ExperimentalDetector
|
||||
from .jungfrau import Jungfrau
|
||||
from .jungfrau_ctb import JungfrauCTB
|
||||
from _sls_detector import DetectorApi
|
||||
# from .detector import Detector, DetectorError, free_shared_memory
|
||||
# from .eiger import Eiger
|
||||
from .experimental import Detector
|
||||
|
||||
# from .jungfrau import Jungfrau
|
||||
# from .jungfrau_ctb import JungfrauCTB
|
||||
# from _sls_detector import DetectorApi
|
||||
|
||||
import _sls_detector
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -54,7 +54,7 @@ def freeze(cls):
|
||||
|
||||
|
||||
@freeze
|
||||
class ExperimentalDetector(CppDetectorApi):
|
||||
class Detector(CppDetectorApi):
|
||||
"""
|
||||
This class is the base for detector specific
|
||||
interfaces. Most functions exists in two versions
|
||||
@ -425,54 +425,88 @@ class ExperimentalDetector(CppDetectorApi):
|
||||
def zmqip(self, ip):
|
||||
self.setClientZmqIp(ip)
|
||||
|
||||
#TODO! Change to dst
|
||||
|
||||
@property
|
||||
def rx_udpip(self):
|
||||
def udp_dstip(self):
|
||||
return element_if_equal(self.getDestinationUDPIP())
|
||||
|
||||
@rx_udpip.setter
|
||||
def rx_udpip(self, ip):
|
||||
@udp_dstip.setter
|
||||
def udp_dstip(self, ip):
|
||||
self.getDestinationUDPIP(ip)
|
||||
|
||||
@property
|
||||
def rx_udpip2(self):
|
||||
def udp_dstip2(self):
|
||||
return element_if_equal(self.getDestinationUDPIP2())
|
||||
|
||||
@rx_udpip2.setter
|
||||
def rx_udpip2(self, ip):
|
||||
@udp_dstip2.setter
|
||||
def udp_dstip2(self, ip):
|
||||
self.getDestinationUDPIP2(ip)
|
||||
|
||||
@property
|
||||
def rx_udpmac(self):
|
||||
def udp_dstmac(self):
|
||||
return element_if_equal(self.getDestinationUDPMAC())
|
||||
|
||||
@rx_udpmac.setter
|
||||
def rx_udpmac(self, mac):
|
||||
@udp_dstmac.setter
|
||||
def udp_dstmac(self, mac):
|
||||
self.getDestinationUDPMAC2(mac)
|
||||
|
||||
@property
|
||||
def rx_udpmac2(self):
|
||||
def udp_dstmac2(self):
|
||||
return element_if_equal(self.getDestinationUDPMAC2())
|
||||
|
||||
@rx_udpmac2.setter
|
||||
def rx_udpmac2(self, mac):
|
||||
@udp_dstmac2.setter
|
||||
def udp_dstmac2(self, mac):
|
||||
self.getDestinationUDPMAC2(mac)
|
||||
|
||||
|
||||
@property
|
||||
def detectormac(self):
|
||||
return element_if_equal(self.getSourceUDPMAC())
|
||||
def udp_dstport(self):
|
||||
return element_if_equal(self.getDestinationUDPPort())
|
||||
|
||||
@detectormac.setter
|
||||
def detectormac(self, mac):
|
||||
self.setSourceUDPMAC()
|
||||
@udp_dstport.setter
|
||||
def udp_dstport(self, port):
|
||||
self.setDestinationUDPPort(port)
|
||||
|
||||
@property
|
||||
def detectormac2(self):
|
||||
def udp_dstport2(self):
|
||||
return element_if_equal(self.getDestinationUDPPort2())
|
||||
|
||||
@udp_dstport2.setter
|
||||
def udp_dstport2(self, port):
|
||||
self.setDestinationUDPPort2(port)
|
||||
|
||||
@property
|
||||
def src_udpmac(self):
|
||||
return element_if_equal(self.getSourceUDPMAC())
|
||||
|
||||
@src_udpmac.setter
|
||||
def src_udpmac(self, mac):
|
||||
self.setSourceUDPMAC(mac)
|
||||
|
||||
@property
|
||||
def src_udpip2(self):
|
||||
return element_if_equal(self.getSourceUDPIP())
|
||||
|
||||
@src_udpip2.setter
|
||||
def src_udpip2(self, ip):
|
||||
self.setSourceUDPIP(ip)
|
||||
|
||||
@property
|
||||
def src_udpip(self):
|
||||
return element_if_equal(self.getSourceUDPIP())
|
||||
|
||||
@src_udpip.setter
|
||||
def src_udpip(self, ip):
|
||||
self.setSourceUDPIP(ip)
|
||||
|
||||
|
||||
@property
|
||||
def src_udpmac2(self):
|
||||
return element_if_equal(self.getSourceUDPMAC2())
|
||||
|
||||
@detectormac2.setter
|
||||
def detectormac2(self, mac):
|
||||
self.setSourceUDPMAC2()
|
||||
@src_udpmac2.setter
|
||||
def src_udpmac2(self, mac):
|
||||
self.setSourceUDPMAC2(mac)
|
||||
|
||||
@property
|
||||
def vhighvoltage(self):
|
||||
@ -487,12 +521,12 @@ class ExperimentalDetector(CppDetectorApi):
|
||||
return self.getUserDetails()
|
||||
|
||||
@property
|
||||
def settingsdir(self):
|
||||
return element_if_equal(self.getSettingsDir())
|
||||
def settingspath(self):
|
||||
return element_if_equal(self.getSettingsPath())
|
||||
|
||||
@settingsdir.setter
|
||||
def settingsdir(self, dir):
|
||||
self.setSettingsDir(dir)
|
||||
@settingspath.setter
|
||||
def settingspath(self, path):
|
||||
self.setSettingsPath(path)
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
|
@ -1,259 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Jungfrau detector class and support functions.
|
||||
Inherits from Detector.
|
||||
"""
|
||||
from .adcs import Adc, DetectorAdcs
|
||||
from .detector import Detector
|
||||
from .dacs import DetectorDacs
|
||||
from .utils import element_if_equal
|
||||
|
||||
|
||||
class JungfrauDacs(DetectorDacs):
|
||||
_dacs = [('vb_comp', 0, 4000, 1220),
|
||||
('vdd_prot', 0, 4000, 3000),
|
||||
('vin_com', 0, 4000, 1053),
|
||||
('vref_prech', 0, 4000, 1450),
|
||||
('vb_pixbuff', 0, 4000, 750),
|
||||
('vb_ds', 0, 4000, 1000),
|
||||
('vref_ds', 0, 4000, 480),
|
||||
('vref_comp', 0, 4000, 420),
|
||||
]
|
||||
_dacnames = [_d[0] for _d in _dacs]
|
||||
|
||||
class Jungfrau(Detector):
|
||||
"""
|
||||
Class used to control a Jungfrau detector. Inherits from the Detector class but a specialized
|
||||
class is needed to provide the correct dacs and unique functions.
|
||||
|
||||
"""
|
||||
_detector_dynamic_range = [4, 8, 16, 32]
|
||||
|
||||
_settings = ['dynamichg0',
|
||||
'dynamicgain',
|
||||
'fixgain1',
|
||||
'fixgain2',
|
||||
'forceswitchg1',
|
||||
'forceswitchg2']
|
||||
"""Available settings for Jungfrau"""
|
||||
|
||||
def __init__(self, multi_id=0):
|
||||
#Init on base calss
|
||||
super().__init__(multi_id)
|
||||
self._dacs = JungfrauDacs(self)
|
||||
|
||||
#Jungfrau specific temps, this can be reduced to a single value?
|
||||
self._temp = DetectorAdcs()
|
||||
self._temp.fpga = Adc('temp_fpga', self)
|
||||
# self._register = Register(self)
|
||||
|
||||
|
||||
@property
|
||||
def dacs(self):
|
||||
"""
|
||||
|
||||
An instance of DetectorDacs used for accessing the dacs of a single
|
||||
or multi detector.
|
||||
|
||||
Examples
|
||||
---------
|
||||
|
||||
::
|
||||
|
||||
#Jungfrau
|
||||
|
||||
|
||||
"""
|
||||
return self._dacs
|
||||
|
||||
@property
|
||||
def power_chip(self):
|
||||
"""Power on or off the ASICs, True for on False for off"""
|
||||
return self._api.isChipPowered()
|
||||
|
||||
@power_chip.setter
|
||||
def power_chip(self, value):
|
||||
self._api.powerChip(value)
|
||||
|
||||
@property
|
||||
def delay(self):
|
||||
"""Delay after trigger [s]"""
|
||||
return self._api.getDelay()/1e9
|
||||
|
||||
@delay.setter
|
||||
def delay(self, t):
|
||||
ns_time = int(t * 1e9)
|
||||
self._api.setDelay(ns_time)
|
||||
|
||||
@property
|
||||
def n_gates(self):
|
||||
return self._api.getNumberOfGates()
|
||||
|
||||
@n_gates.setter
|
||||
def n_gates(self, n):
|
||||
self._api.setNumberOfGates(n)
|
||||
|
||||
@property
|
||||
def n_probes(self):
|
||||
return self._api.getNumberOfProbes()
|
||||
|
||||
@n_probes.setter
|
||||
def n_probes(self, n):
|
||||
self._api.setNumberOfProbes(n)
|
||||
|
||||
@property
|
||||
def storagecell_start(self):
|
||||
"""
|
||||
First storage cell
|
||||
"""
|
||||
return self._api.getStoragecellStart()
|
||||
|
||||
@storagecell_start.setter
|
||||
def storagecell_start(self, value):
|
||||
self._api.setStoragecellStart(value)
|
||||
|
||||
|
||||
@property
|
||||
def n_storagecells(self):
|
||||
"""
|
||||
number of storage cells used for the measurements
|
||||
"""
|
||||
return self._api.getNumberOfStorageCells()
|
||||
|
||||
@n_storagecells.setter
|
||||
def n_storagecells(self, value):
|
||||
self._api.setNumberOfStorageCells(value)
|
||||
|
||||
@property
|
||||
def temp(self):
|
||||
"""
|
||||
An instance of DetectorAdcs used to read the temperature
|
||||
of different components
|
||||
|
||||
Examples
|
||||
-----------
|
||||
|
||||
::
|
||||
|
||||
detector.temp
|
||||
>>
|
||||
temp_fpga : 36.90°C, 45.60°C
|
||||
|
||||
a = detector.temp.fpga[:]
|
||||
a
|
||||
>> [36.568, 45.542]
|
||||
|
||||
|
||||
"""
|
||||
return self._temp
|
||||
|
||||
@property
|
||||
def temperature_threshold(self):
|
||||
"""Threshold for switching of chips"""
|
||||
return self._api.getThresholdTemperature()
|
||||
|
||||
@temperature_threshold.setter
|
||||
def temperature_threshold(self, t):
|
||||
self._api.setThresholdTemperature(t)
|
||||
|
||||
@property
|
||||
def temperature_control(self):
|
||||
"""
|
||||
Monitor the temperature of the detector and switch off chips if temperature_threshold is
|
||||
crossed
|
||||
|
||||
|
||||
Examples
|
||||
---------
|
||||
|
||||
::
|
||||
|
||||
#activate
|
||||
detector.temperature_control = True
|
||||
|
||||
#deactivate
|
||||
detector.temperature_control = False
|
||||
|
||||
|
||||
"""
|
||||
return self._api.getTemperatureControl()
|
||||
|
||||
@temperature_control.setter
|
||||
def temperature_control(self, v):
|
||||
self._api.setTemperatureControl(v)
|
||||
|
||||
@property
|
||||
def temperature_event(self):
|
||||
"""Have the temperature threshold been crossed?
|
||||
|
||||
Returns
|
||||
---------
|
||||
|
||||
:py:obj:`True` if the threshold have been crossed and temperature_control is active
|
||||
otherwise :py:obj:`False`
|
||||
|
||||
"""
|
||||
return self._api.getTemperatureEvent()
|
||||
|
||||
def reset_temperature_event(self):
|
||||
"""Reset the temperature_event. After reset temperature_event is False"""
|
||||
self._api.resetTemperatureEvent()
|
||||
|
||||
@property
|
||||
def rx_udpport(self):
|
||||
"""
|
||||
UDP port for the receiver. Each module have one port.
|
||||
Note! Eiger has two ports
|
||||
|
||||
::
|
||||
|
||||
[0:rx_udpport]
|
||||
|
||||
Examples
|
||||
-----------
|
||||
|
||||
::
|
||||
|
||||
d.rx_udpport
|
||||
>> [50010]
|
||||
|
||||
d.rx_udpport = [50010]
|
||||
|
||||
"""
|
||||
return self._api.getNetworkParameter('rx_udpport')
|
||||
|
||||
|
||||
@rx_udpport.setter
|
||||
def rx_udpport(self, ports):
|
||||
"""Requires iterating over elements two and two for setting ports"""
|
||||
for i, p in enumerate(ports):
|
||||
self._api.setNetworkParameter('rx_udpport', str(p), i)
|
||||
|
||||
@property
|
||||
def detector_mac(self):
|
||||
s = self._api.getNetworkParameter('detectormac')
|
||||
return element_if_equal(s)
|
||||
|
||||
|
||||
@detector_mac.setter
|
||||
def detector_mac(self, mac):
|
||||
if isinstance(mac, list):
|
||||
for i, m in enumerate(mac):
|
||||
self._api.setNetworkParameter('detectormac', m, i)
|
||||
else:
|
||||
self._api.setNetworkParameter('detectormac', mac, -1)
|
||||
|
||||
|
||||
@property
|
||||
def detector_ip(self):
|
||||
s = self._api.getNetworkParameter('detectorip')
|
||||
return element_if_equal(s)
|
||||
|
||||
@detector_ip.setter
|
||||
def detector_ip(self, ip):
|
||||
if isinstance(ip, list):
|
||||
for i, addr in enumerate(ip):
|
||||
self._api.setNetworkParameter('detectorip', addr, i)
|
||||
else:
|
||||
self._api.setNetworkParameter('detectorip', ip, -1)
|
@ -1,178 +0,0 @@
|
||||
from functools import partial
|
||||
from collections.abc import Iterable
|
||||
from collections import namedtuple
|
||||
import socket
|
||||
|
||||
from .detector import Detector
|
||||
from .utils import element_if_equal
|
||||
from .adcs import DetectorAdcs, Adc
|
||||
from .dacs import DetectorDacs
|
||||
from .detector_property import DetectorProperty
|
||||
from .registers import Register, Adc_register
|
||||
|
||||
class JungfrauCTBDacs(DetectorDacs):
|
||||
_dacs = [('dac0', 0, 4000, 1400),
|
||||
('dac1', 0, 4000, 1200),
|
||||
('dac2', 0, 4000, 900),
|
||||
('dac3', 0, 4000, 1050),
|
||||
('dac4', 0, 4000, 1400),
|
||||
('dac5', 0, 4000, 655),
|
||||
('dac6', 0, 4000, 2000),
|
||||
('dac7', 0, 4000, 1400),
|
||||
('dac8', 0, 4000, 850),
|
||||
('dac9', 0, 4000, 2000),
|
||||
('dac10', 0, 4000, 2294),
|
||||
('dac11', 0, 4000, 983),
|
||||
('dac12', 0, 4000, 1475),
|
||||
('dac13', 0, 4000, 1200),
|
||||
('dac14', 0, 4000, 1600),
|
||||
('dac15', 0, 4000, 1455),
|
||||
('dac16', 0, 4000, 0),
|
||||
('dac17', 0, 4000, 1000),
|
||||
]
|
||||
_dacnames = [_d[0] for _d in _dacs]
|
||||
|
||||
|
||||
|
||||
class JungfrauCTB(Detector):
|
||||
def __init__(self, id = 0):
|
||||
super().__init__(id)
|
||||
self._dacs = JungfrauCTBDacs(self)
|
||||
self._register = Register(self)
|
||||
self._adc_register = Adc_register(self)
|
||||
|
||||
@property
|
||||
def v_a(self):
|
||||
return self._api.getDac_mV('v_a', -1)
|
||||
|
||||
@v_a.setter
|
||||
def v_a(self, value):
|
||||
self._api.setDac_mV('v_a', -1, value)
|
||||
|
||||
@property
|
||||
def v_b(self):
|
||||
return self._api.getDac_mV('v_b', -1)
|
||||
|
||||
@v_b.setter
|
||||
def v_b(self, value):
|
||||
self._api.setDac_mV('v_b', -1, value)
|
||||
|
||||
|
||||
@property
|
||||
def v_c(self):
|
||||
return self._api.getDac_mV('v_c', -1)
|
||||
|
||||
@v_c.setter
|
||||
def v_c(self, value):
|
||||
self._api.setDac_mV('v_c', -1, value)
|
||||
|
||||
@property
|
||||
def v_d(self):
|
||||
return self._api.getDac_mV('v_d', -1)
|
||||
|
||||
@v_d.setter
|
||||
def v_d(self, value):
|
||||
self._api.setDac_mV('v_d', -1, value)
|
||||
|
||||
@property
|
||||
def v_io(self):
|
||||
return self._api.getDac_mV('v_io', -1)
|
||||
|
||||
@v_io.setter
|
||||
def v_io(self, value):
|
||||
self._api.setDac_mV('v_io', -1, value)
|
||||
|
||||
@property
|
||||
def v_limit(self):
|
||||
return self._api.getDac_mV('v_limit', -1)
|
||||
|
||||
@v_limit.setter
|
||||
def v_limit(self, value):
|
||||
self._api.setDac_mV('v_limit', -1, value)
|
||||
|
||||
@property
|
||||
def adc_register(self):
|
||||
return self._adc_register
|
||||
|
||||
# @property
|
||||
# def register(self):
|
||||
# return self._register
|
||||
|
||||
def adcOFF(self):
|
||||
"""Switch off the ADC"""
|
||||
self.adc_register[0x8] = 1
|
||||
|
||||
|
||||
|
||||
@property
|
||||
def dacs(self):
|
||||
"""
|
||||
|
||||
An instance of DetectorDacs used for accessing the dacs of a single
|
||||
or multi detector.
|
||||
|
||||
Examples
|
||||
---------
|
||||
|
||||
::
|
||||
|
||||
#JungfrauCTB
|
||||
|
||||
|
||||
"""
|
||||
return self._dacs
|
||||
|
||||
@property
|
||||
def dbitpipeline(self):
|
||||
return self._api.getDbitPipeline()
|
||||
|
||||
@dbitpipeline.setter
|
||||
def dbitpipeline(self, value):
|
||||
self._api.setDbitPipeline(value)
|
||||
|
||||
|
||||
@property
|
||||
def dbitphase(self):
|
||||
return self._api.getDbitPhase()
|
||||
|
||||
@dbitphase.setter
|
||||
def dbitphase(self, value):
|
||||
self._api.setDbitPhase(value)
|
||||
|
||||
@property
|
||||
def dbitclock(self):
|
||||
return self._api.getDbitClock()
|
||||
|
||||
@dbitclock.setter
|
||||
def dbitclock(self, value):
|
||||
self._api.setDbitClock(value)
|
||||
|
||||
@property
|
||||
def samples(self):
|
||||
return self._api.getJCTBSamples()
|
||||
|
||||
@samples.setter
|
||||
def samples(self, value):
|
||||
self._api.setJCTBSamples(value)
|
||||
|
||||
@property
|
||||
def readout_clock(self):
|
||||
"""
|
||||
Speed of the readout clock relative to the full speed
|
||||
|
||||
|
||||
Examples
|
||||
---------
|
||||
|
||||
::
|
||||
|
||||
|
||||
|
||||
|
||||
"""
|
||||
return self._api.getReadoutClockSpeed()
|
||||
|
||||
|
||||
@readout_clock.setter
|
||||
def readout_clock(self, value):
|
||||
self._api.setReadoutClockSpeed(value)
|
@ -1,992 +0,0 @@
|
||||
#ifndef DETECTOR_H
|
||||
#define DETECTOR_H
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "multiSlsDetector.h"
|
||||
#include "slsDetector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
class DetectorPythonInterface {
|
||||
public:
|
||||
DetectorPythonInterface(int i) : det(i), multi_detector_id(i) {
|
||||
// Disable output from std::cout
|
||||
// std::cout.setstate(std::ios_base::failbit);
|
||||
}
|
||||
|
||||
int getMultiDetectorId() { return multi_detector_id; }
|
||||
|
||||
|
||||
|
||||
|
||||
// blocking command, acquire set number of frames
|
||||
void acquire() { det.acquire(); }
|
||||
|
||||
// for Eiger check status of the module
|
||||
// true active false deactivated
|
||||
bool getActive(int i) { return det.activate(-1, i); }
|
||||
// activate or deactivate a module
|
||||
void setActive(int i, bool value) { det.activate(value, i); }
|
||||
|
||||
int getFramesCaughtByReceiver() {
|
||||
return det.getFramesCaughtByReceiver();
|
||||
// return det.getFramesCaughtByReceiver();
|
||||
}
|
||||
int getFramesCaughtByReceiver(int i) {
|
||||
return det.getFramesCaughtByReceiver(i);
|
||||
}
|
||||
|
||||
void setReceiverFifoDepth(int n_frames) {
|
||||
det.setReceiverFifoDepth(n_frames);
|
||||
}
|
||||
|
||||
void setNumberOfStorageCells(const int64_t num) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::STORAGE_CELL_NUMBER, num);
|
||||
}
|
||||
int getNumberOfStorageCells() {
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::STORAGE_CELL_NUMBER,
|
||||
-1);
|
||||
}
|
||||
|
||||
void setStoragecellStart(int cell) { det.setStoragecellStart(cell); }
|
||||
|
||||
int getStoragecellStart() { return det.setStoragecellStart(); }
|
||||
|
||||
int getReceiverFifoDepth() { return det.setReceiverFifoDepth(); }
|
||||
|
||||
void resetFramesCaught() { det.resetFramesCaught(); }
|
||||
|
||||
int getReceiverCurrentFrameIndex() {
|
||||
return det.getReceiverCurrentFrameIndex();
|
||||
}
|
||||
|
||||
std::string getReceiverHostname(int det_id = -1) const {
|
||||
return det.getReceiverHostname(det_id);
|
||||
}
|
||||
|
||||
void setReceiverHostname(std::string hostname, int det_id = -1) {
|
||||
det.setReceiverHostname(hostname, det_id);
|
||||
}
|
||||
|
||||
// std::string getReceiverUDPIP(int det_id = -1) const {
|
||||
// return det.getReceiverUDPIP(det_id);
|
||||
// }
|
||||
|
||||
// void setReceiverUDPIP(std::string ip, int det_id = -1) {
|
||||
// det.setReceiverUDPIP(ip, det_id);
|
||||
// }
|
||||
|
||||
// std::string getReceiverUDPMAC(int det_id = -1) {
|
||||
// return det.getReceiverUDPMAC(det_id);
|
||||
// }
|
||||
|
||||
// void setReceiverUDPMAC(std::string mac, int det_id = -1) {
|
||||
// det.setReceiverUDPMAC(mac, det_id);
|
||||
// }
|
||||
|
||||
void startReceiver() { det.startReceiver(); }
|
||||
void stopReceiver() { det.stopReceiver(); }
|
||||
|
||||
bool getTenGigabitEthernet() { return det.enableTenGigabitEthernet(); }
|
||||
void setTenGigabitEthernet(bool value) {
|
||||
det.enableTenGigabitEthernet(value);
|
||||
}
|
||||
|
||||
void setFileFormat(const std::string &format);
|
||||
std::string getFileFormat();
|
||||
|
||||
// std::string checkOnline() { return det.checkOnline(); }
|
||||
|
||||
bool isChipPowered() { return det.powerChip(); }
|
||||
void powerChip(const bool value) { det.powerChip(value); }
|
||||
|
||||
// read register from readout system, used for low level control
|
||||
uint32_t readRegister(const uint32_t addr) {
|
||||
return det.readRegister(addr);
|
||||
}
|
||||
|
||||
// directly write to register in readout system
|
||||
void writeRegister(const uint32_t addr, const uint32_t value) {
|
||||
det.writeRegister(addr, value);
|
||||
}
|
||||
|
||||
// directly write to the ADC register
|
||||
// should this also be unsigned? Probably...
|
||||
void writeAdcRegister(const int addr, const int value) {
|
||||
det.writeAdcRegister(addr, value);
|
||||
}
|
||||
|
||||
void setBitInRegister(const uint32_t reg_addr, const int bit_number) {
|
||||
det.setBit(reg_addr, bit_number);
|
||||
}
|
||||
void clearBitInRegister(const uint32_t reg_addr, const int bit_number) {
|
||||
det.clearBit(reg_addr, bit_number);
|
||||
}
|
||||
|
||||
bool getAcquiringFlag() { return det.getAcquiringFlag(); }
|
||||
|
||||
void setAcquiringFlag(const bool flag) { det.setAcquiringFlag(flag); }
|
||||
|
||||
bool getCounterBit() { return det.setCounterBit(); }
|
||||
void setCounterBit(bool b) { det.setCounterBit(b); }
|
||||
|
||||
slsDetectorDefs::dacIndex dacNameToEnum(std::string dac_name);
|
||||
|
||||
|
||||
|
||||
int getNumberOfDetectors() { return det.size(); }
|
||||
|
||||
std::string getRunStatus() {
|
||||
auto s = det.getRunStatus();
|
||||
return det.runStatusType(s);
|
||||
}
|
||||
|
||||
void startAcquisition() { det.startAcquisition(); }
|
||||
void stopAcquisition() { det.stopAcquisition(); }
|
||||
|
||||
std::string getHostname() { return det.getHostname(); }
|
||||
|
||||
void setHostname(std::string hostname) {
|
||||
det.setHostname(hostname.c_str());
|
||||
}
|
||||
|
||||
int getDynamicRange() { return det.setDynamicRange(-1); }
|
||||
void setDynamicRange(const int dr) { det.setDynamicRange(dr); }
|
||||
|
||||
void pulseChip(const int n) { det.pulseChip(n); }
|
||||
void pulseAllPixels(const int n);
|
||||
void pulseDiagonal(const int n);
|
||||
|
||||
void readConfigurationFile(std::string fname) {
|
||||
det.readConfigurationFile(fname);
|
||||
}
|
||||
void readParametersFile(std::string fname) {
|
||||
det.retrieveDetectorSetup(fname);
|
||||
}
|
||||
|
||||
int64_t getFirmwareVersion() {
|
||||
return det.getId(slsDetectorDefs::DETECTOR_FIRMWARE_VERSION);
|
||||
}
|
||||
int64_t getServerVersion() {
|
||||
return det.getId(slsDetectorDefs::DETECTOR_SOFTWARE_VERSION);
|
||||
}
|
||||
int64_t getClientVersion() {
|
||||
return det.getId(slsDetectorDefs::THIS_SOFTWARE_VERSION);
|
||||
}
|
||||
int64_t getReceiverVersion() {
|
||||
return det.getId(slsDetectorDefs::RECEIVER_VERSION);
|
||||
}
|
||||
|
||||
std::vector<int64_t> getDetectorNumber() { return det.getDetectorNumber(); }
|
||||
|
||||
int getReadoutClockSpeed() {
|
||||
return det.setSpeed(slsDetectorDefs::CLOCK_DIVIDER, -1);
|
||||
}
|
||||
void setReadoutClockSpeed(const int speed) {
|
||||
det.setSpeed(slsDetectorDefs::CLOCK_DIVIDER, speed);
|
||||
}
|
||||
|
||||
int getSyncClkSpeed(int det_id=-1){
|
||||
return det.setSpeed(slsDetectorDefs::SYNC_CLOCK, -1, 0, det_id);
|
||||
}
|
||||
|
||||
void setDbitPipeline(const int value) {
|
||||
det.setSpeed(slsDetectorDefs::DBIT_PIPELINE, value);
|
||||
}
|
||||
int getDbitPipeline() {
|
||||
return det.setSpeed(slsDetectorDefs::DBIT_PIPELINE, -1);
|
||||
}
|
||||
void setDbitPhase(const int value) {
|
||||
det.setSpeed(slsDetectorDefs::DBIT_PHASE, value);
|
||||
}
|
||||
int getDbitPhase() { return det.setSpeed(slsDetectorDefs::DBIT_PHASE, -1); }
|
||||
void setDbitClock(const int value) {
|
||||
det.setSpeed(slsDetectorDefs::DBIT_CLOCK, value);
|
||||
}
|
||||
int getDbitClock() { return det.setSpeed(slsDetectorDefs::DBIT_CLOCK, -1); }
|
||||
|
||||
int getReceiverPort() const { return det.getReceiverPort(); }
|
||||
|
||||
void setReceiverPort(int det_id, int value) {
|
||||
det.setReceiverPort(value, det_id);
|
||||
}
|
||||
|
||||
void setRateCorrection(std::vector<double> tau) {
|
||||
for (size_t i = 0; i < det.size(); ++i)
|
||||
det.setRateCorrection(tau[i], i);
|
||||
}
|
||||
|
||||
std::vector<double> getRateCorrection();
|
||||
|
||||
void setPatternLoops(int level, int start, int stop,
|
||||
int n, int detPos) {
|
||||
det.setPatternLoops(level, start, stop, n, detPos);
|
||||
}
|
||||
|
||||
|
||||
std::array<int, 3> getPatternLoops(int level, int detPos) {
|
||||
return det.getPatternLoops(level, detPos);
|
||||
}
|
||||
|
||||
void setPatternWord(int addr, uint64_t word, int detPos) {
|
||||
det.setPatternWord(addr, word, detPos);
|
||||
}
|
||||
|
||||
uint64_t getPatternWord(int addr, int detPos){
|
||||
return det.setPatternWord(addr, -1, detPos);
|
||||
}
|
||||
|
||||
uint64_t setPatternIOControl(uint64_t word, int detPos){
|
||||
return det.setPatternIOControl(word, detPos);
|
||||
}
|
||||
|
||||
uint64_t setPatternClockControl(uint64_t word, int detPos){
|
||||
return det.setPatternClockControl(word, detPos);
|
||||
}
|
||||
|
||||
void setPatternWaitAddr(int level, int addr, int detPos){
|
||||
det.setPatternWaitAddr(level, addr, detPos);
|
||||
}
|
||||
|
||||
int getPatternWaitAddr(int level, int detPos){
|
||||
return det.setPatternWaitAddr(level, -1, detPos);
|
||||
}
|
||||
|
||||
void setPatternWaitTime(int level, uint64_t duration, int detPos){
|
||||
det.setPatternWaitTime(level, duration, detPos);
|
||||
}
|
||||
|
||||
uint64_t getPatternWaitTime(int level, int detPos){
|
||||
return det.setPatternWaitTime(level, -1, detPos);
|
||||
}
|
||||
|
||||
bool getFlippedDataX(int i) {
|
||||
return det.getFlippedDataX(i);
|
||||
}
|
||||
|
||||
// bool getFlippedDataY(int i) {
|
||||
// return det.getFlippedData(slsDetectorDefs::dimension::Y, i);
|
||||
// }
|
||||
|
||||
void setFlippedDataX(int i, bool value) {
|
||||
det.setFlippedDataX(value, i);
|
||||
}
|
||||
|
||||
// void setFlippedDataY(int i, bool value) {
|
||||
// det.setFlippedData(slsDetectorDefs::dimension::Y, value, i);
|
||||
// }
|
||||
|
||||
/*** Frame and file settings ***/
|
||||
void setFileName(std::string fname) { det.setFileName(fname); }
|
||||
std::string getFileName() { return det.getFileName(); }
|
||||
void setFilePath(std::string path) { det.setFilePath(path); }
|
||||
void setFilePath(std::string path, int i) { det.setFilePath(path, i); }
|
||||
std::string getFilePath() { return det.getFilePath(); }
|
||||
std::string getFilePath(int i) { return det.getFilePath(i); }
|
||||
|
||||
std::string getUserDetails() { return det.getUserDetails(); }
|
||||
|
||||
void setFramesPerFile(const int n_frames) {
|
||||
det.setFramesPerFile(n_frames);
|
||||
}
|
||||
int getFramesPerFile() { return det.setFramesPerFile(); }
|
||||
|
||||
std::string getReceiverFrameDiscardPolicy() {
|
||||
return det.getReceiverFrameDiscardPolicy(
|
||||
det.setReceiverFramesDiscardPolicy());
|
||||
}
|
||||
void setReceiverFramesDiscardPolicy(std::string f) {
|
||||
auto fdp = det.getReceiverFrameDiscardPolicy(f);
|
||||
if (fdp == slsDetectorDefs::GET_FRAME_DISCARD_POLICY) {
|
||||
throw std::invalid_argument("Coult not decode policy: nodiscard, "
|
||||
"discardempty, discardpartial");
|
||||
}
|
||||
det.setReceiverFramesDiscardPolicy(fdp);
|
||||
}
|
||||
|
||||
void setPartialFramesPadding(bool padding) {
|
||||
det.setPartialFramesPadding(padding);
|
||||
}
|
||||
|
||||
bool getPartialFramesPadding() { return det.getPartialFramesPadding(); }
|
||||
|
||||
std::vector<double> getMeasuredPeriod() {
|
||||
std::vector<double> mp;
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
auto t = det.getTimeLeft(slsDetectorDefs::MEASURED_PERIOD, i);
|
||||
mp.push_back(static_cast<double>(t) * 1E-9);
|
||||
}
|
||||
return mp;
|
||||
}
|
||||
std::vector<double> getMeasuredSubPeriod() {
|
||||
std::vector<double> mp;
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
auto t = det.getTimeLeft(slsDetectorDefs::MEASURED_SUBPERIOD, i);
|
||||
mp.push_back(static_cast<double>(t) * 1E-9);
|
||||
}
|
||||
return mp;
|
||||
}
|
||||
|
||||
void checkDetectorVersionCompatibility() {
|
||||
det.checkDetectorVersionCompatibility();
|
||||
}
|
||||
void checkReceiverVersionCompatibility() {
|
||||
det.checkReceiverVersionCompatibility();
|
||||
}
|
||||
|
||||
/*** END Frame and file settings ***/
|
||||
|
||||
void loadTrimbitFile(std::string fname, const int idet) {
|
||||
det.loadSettingsFile(fname, idet);
|
||||
}
|
||||
|
||||
// Eiger: set the energies where the detector is trimmed
|
||||
void setTrimEnergies(std::vector<int> energy) { det.setTrimEn(energy); }
|
||||
|
||||
std::vector<int> getTrimEnergies() { return det.getTrimEn(); }
|
||||
|
||||
/*** Temperature control functions for Jungfrau ***/
|
||||
void setThresholdTemperature(float t) {
|
||||
det.setThresholdTemperature(static_cast<int>(t * 1000), -1);
|
||||
}
|
||||
|
||||
float getThresholdTemperature() {
|
||||
return static_cast<double>(det.setThresholdTemperature(-1, -1)) /
|
||||
1000.0;
|
||||
}
|
||||
|
||||
void setTemperatureControl(bool v) { det.setTemperatureControl(v); }
|
||||
bool getTemperatureControl() { return det.setTemperatureControl(); }
|
||||
|
||||
bool getTemperatureEvent() { return det.setTemperatureEvent(); }
|
||||
void resetTemperatureEvent() { det.setTemperatureEvent(0); }
|
||||
/*** END Temperature control functions for Jungfrau ***/
|
||||
|
||||
void setThresholdEnergy(const int eV) { det.setThresholdEnergy(eV); }
|
||||
|
||||
std::string getSettingsDir() { return det.getSettingsDir(); }
|
||||
void setSettingsDir(std::string dir) { det.setSettingsDir(dir); }
|
||||
|
||||
int getThresholdEnergy() { return det.getThresholdEnergy(); }
|
||||
|
||||
std::string getSettings() {
|
||||
return det.getDetectorSettings(det.getSettings());
|
||||
}
|
||||
|
||||
void setSettings(std::string s) {
|
||||
det.setSettings(det.getDetectorSettings(s));
|
||||
}
|
||||
|
||||
// name to enum translation on the c++ side
|
||||
// should we instead expose the enum to Python?
|
||||
int getDac(std::string dac_name, const int mod_id) {
|
||||
int val = -1;
|
||||
auto dac = dacNameToEnum(dac_name);
|
||||
return det.setDAC(val, dac, 0, mod_id);
|
||||
}
|
||||
|
||||
void setDac(std::string dac_name, const int mod_id, int val) {
|
||||
auto dac = dacNameToEnum(dac_name);
|
||||
det.setDAC(val, dac, 0, mod_id);
|
||||
}
|
||||
|
||||
int getDac_mV(std::string dac_name, const int mod_id) {
|
||||
int val = -1;
|
||||
auto dac = dacNameToEnum(dac_name);
|
||||
return det.setDAC(val, dac, 1, mod_id);
|
||||
}
|
||||
|
||||
void setDac_mV(std::string dac_name, const int mod_id, int value) {
|
||||
auto dac = dacNameToEnum(dac_name);
|
||||
det.setDAC(value, dac, 1, mod_id);
|
||||
}
|
||||
|
||||
// Intended for the JungfrauCTB should we name dacs instead
|
||||
int getDacFromIndex(const int index, const int mod_id) {
|
||||
int val = -1;
|
||||
auto dac = static_cast<slsDetectorDefs::dacIndex>(0);
|
||||
return det.setDAC(val, dac, 0, mod_id);
|
||||
}
|
||||
// Intended for the JungfrauCTB should we name dacs instead
|
||||
int setDacFromIndex(const int index, const int mod_id, int value) {
|
||||
auto dac = static_cast<slsDetectorDefs::dacIndex>(0);
|
||||
return det.setDAC(value, dac, 0, mod_id);
|
||||
}
|
||||
|
||||
// Calling multi do we have a need to lock/unlock a single det?
|
||||
bool getServerLock() { return det.lockServer(-1); }
|
||||
void setServerLock(const bool value) { det.lockServer(value); }
|
||||
bool getReceiverLock() { return det.lockReceiver(-1); }
|
||||
void setReceiverLock(const bool value) { det.lockReceiver(value); }
|
||||
|
||||
int getAdc(std::string adc_name, int mod_id) {
|
||||
auto adc = dacNameToEnum(adc_name);
|
||||
return det.getADC(adc, mod_id);
|
||||
}
|
||||
|
||||
// std::vector<std::string> getReadoutFlags();
|
||||
|
||||
// // note singular
|
||||
// void setReadoutFlag(const std::string flag_name);
|
||||
|
||||
// name to enum transltion of dac
|
||||
int getDacVthreshold() {
|
||||
int val = -1;
|
||||
auto dac = slsDetectorDefs::dacIndex::THRESHOLD;
|
||||
return det.setDAC(val, dac, 0, -1);
|
||||
}
|
||||
|
||||
void setDacVthreshold(const int val) {
|
||||
auto dac = slsDetectorDefs::dacIndex::THRESHOLD;
|
||||
det.setDAC(val, dac, 0, -1);
|
||||
}
|
||||
|
||||
void setFileIndex(const int i) { det.setFileIndex(i); }
|
||||
|
||||
int getFileIndex() { return det.getFileIndex(); }
|
||||
|
||||
// time in ns
|
||||
void setExposureTime(const int64_t t) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, t);
|
||||
}
|
||||
|
||||
// time in ns
|
||||
int64_t getExposureTime() {
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::ACQUISITION_TIME, -1);
|
||||
}
|
||||
|
||||
void setSubExposureTime(const int64_t t) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME, t);
|
||||
}
|
||||
|
||||
int64_t getSubExposureTime() {
|
||||
// time in ns
|
||||
return det.setTimer(
|
||||
slsDetectorDefs::timerIndex::SUBFRAME_ACQUISITION_TIME, -1);
|
||||
}
|
||||
|
||||
void setSubExposureDeadTime(const int64_t t) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_DEADTIME, t);
|
||||
}
|
||||
|
||||
int64_t getSubExposureDeadTime() {
|
||||
// time in ns
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::SUBFRAME_DEADTIME, -1);
|
||||
}
|
||||
|
||||
int64_t getCycles() {
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::CYCLES_NUMBER, -1);
|
||||
}
|
||||
|
||||
void setCycles(const int64_t n_cycles) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::CYCLES_NUMBER, n_cycles);
|
||||
}
|
||||
|
||||
|
||||
// int getNumberOfGates() {
|
||||
// return det.setTimer(slsDetectorDefs::timerIndex::GATES_NUMBER, -1);
|
||||
// }
|
||||
// void setNumberOfGates(const int t) {
|
||||
// det.setTimer(slsDetectorDefs::timerIndex::GATES_NUMBER, t);
|
||||
// }
|
||||
|
||||
// time in ns
|
||||
int64_t getDelay() {
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER,
|
||||
-1);
|
||||
}
|
||||
// time in ns
|
||||
void setDelay(const int64_t t) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER, t);
|
||||
}
|
||||
// time in ns
|
||||
int64_t getPeriod() {
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD, -1);
|
||||
}
|
||||
// time in ns
|
||||
void setPeriod(const int64_t t) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::FRAME_PERIOD, t);
|
||||
}
|
||||
|
||||
int64_t getNumberOfFrames() {
|
||||
return det.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER, -1);
|
||||
}
|
||||
|
||||
void setNumberOfFrames(const int64_t nframes) {
|
||||
det.setTimer(slsDetectorDefs::timerIndex::FRAME_NUMBER, nframes);
|
||||
}
|
||||
|
||||
// std::string getTimingMode() {
|
||||
// return det.externalCommunicationType(
|
||||
// det.setExternalCommunicationMode());
|
||||
// }
|
||||
// void setTimingMode(const std::string mode) {
|
||||
// det.setExternalCommunicationMode(det.externalCommunicationType(mode));
|
||||
// }
|
||||
|
||||
void freeSharedMemory() { det.freeSharedMemory(); }
|
||||
|
||||
std::vector<std::string> getDetectorType() {
|
||||
std::vector<std::string> detector_type;
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
detector_type.push_back(det.getDetectorTypeAsString(i));
|
||||
}
|
||||
return detector_type;
|
||||
}
|
||||
|
||||
void setFileWrite(bool value) { det.setFileWrite(value); }
|
||||
bool getFileWrite() { return det.getFileWrite(); }
|
||||
|
||||
void setFileOverWrite(bool value) { det.setFileOverWrite(value); }
|
||||
|
||||
bool getFileOverWrite() { return det.getFileOverWrite(); }
|
||||
|
||||
void setAllTrimbits(int tb) { det.setAllTrimbits(tb); }
|
||||
int getAllTrimbits() { return det.setAllTrimbits(-1); }
|
||||
bool getRxDataStreamStatus() {
|
||||
return det.enableDataStreamingFromReceiver();
|
||||
}
|
||||
|
||||
void setRxDataStreamStatus(bool state) {
|
||||
det.enableDataStreamingFromReceiver(state);
|
||||
}
|
||||
|
||||
// Get a network parameter for all detectors, looping over individual
|
||||
// detectors return a vector of strings
|
||||
std::vector<int> getReceiverStreamingPort() {
|
||||
std::vector<int> vec;
|
||||
vec.reserve(det.size());
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
vec.push_back(det.getReceiverStreamingPort(i));
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
void setReceiverStreamingPort(int value, int det_id) {
|
||||
det.setReceiverDataStreamingOutPort(value, det_id);
|
||||
}
|
||||
|
||||
// std::vector<int> getReceiverUDPPort() {
|
||||
// std::vector<int> vec;
|
||||
// vec.reserve(det.size());
|
||||
// for (size_t i = 0; i < det.size(); ++i) {
|
||||
// vec.push_back(det.getReceiverUDPPort(i));
|
||||
// }
|
||||
// return vec;
|
||||
// }
|
||||
|
||||
// std::vector<int> getReceiverUDPPort2() {
|
||||
// std::vector<int> vec;
|
||||
// vec.reserve(det.size());
|
||||
// for (size_t i = 0; i < det.size(); ++i) {
|
||||
// vec.push_back(det.getReceiverUDPPort2(i));
|
||||
// }
|
||||
// return vec;
|
||||
// }
|
||||
|
||||
// void setReceiverUDPPort(int port, int det_id) {
|
||||
// det.setReceiverUDPPort(port, det_id);
|
||||
// }
|
||||
// void setReceiverUDPPort2(int port, int det_id) {
|
||||
// det.setReceiverUDPPort2(port, det_id);
|
||||
// }
|
||||
|
||||
|
||||
std::string getLastClientIP() { return det.getLastClientIP(); }
|
||||
std::string getReceiverLastClientIP() {
|
||||
return det.getReceiverLastClientIP();
|
||||
}
|
||||
|
||||
// get frame delay of module (det_id) in ns
|
||||
int getDelayFrame(int det_id) {
|
||||
auto r = det.setDetectorNetworkParameter(
|
||||
slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_FRAME, -1,
|
||||
det_id);
|
||||
return r;
|
||||
}
|
||||
// set frame delay of module (det_id) in ns
|
||||
void setDelayFrame(int det_id, int delay) {
|
||||
// auto delay_str = std::to_string(delay);
|
||||
det.setDetectorNetworkParameter(
|
||||
slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_FRAME, delay,
|
||||
det_id);
|
||||
}
|
||||
|
||||
// get delay left of module (det_id) in ns
|
||||
int getDelayLeft(int det_id) {
|
||||
auto r = det.setDetectorNetworkParameter(
|
||||
slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_LEFT, -1,
|
||||
det_id);
|
||||
return r;
|
||||
}
|
||||
// set delay left of module (det_id) in ns
|
||||
void setDelayLeft(int det_id, int delay) {
|
||||
// auto delay_str = std::to_string(delay);
|
||||
det.setDetectorNetworkParameter(
|
||||
slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_LEFT, delay,
|
||||
det_id);
|
||||
}
|
||||
|
||||
// get delay right of module (det_id) in ns
|
||||
int getDelayRight(const int det_id) {
|
||||
auto r = det.setDetectorNetworkParameter(
|
||||
slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_RIGHT, -1,
|
||||
det_id);
|
||||
return r;
|
||||
}
|
||||
|
||||
// set delay right of module (det_id) in ns
|
||||
void setDelayRight(int det_id, int delay) {
|
||||
// auto delay_str = std::to_string(delay);
|
||||
det.setDetectorNetworkParameter(
|
||||
slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_RIGHT, delay,
|
||||
det_id);
|
||||
}
|
||||
|
||||
// Check if detector if filling in gap pixels in module
|
||||
// return true if so, currently only in developer
|
||||
bool getGapPixels() { return det.enableGapPixels(-1); }
|
||||
|
||||
// Set to true to have the detector filling in gap pixels
|
||||
// false to disable, currently only in developer
|
||||
void setGapPixels(bool val) { det.enableGapPixels(val); }
|
||||
|
||||
slsDetectorDefs::networkParameter networkNameToEnum(std::string par_name);
|
||||
|
||||
private:
|
||||
multiSlsDetector det;
|
||||
slsDetector *getSlsDetector(int i) const;
|
||||
int multi_detector_id = 0;
|
||||
};
|
||||
|
||||
void DetectorPythonInterface::setFileFormat(const std::string &format) {
|
||||
if (format == "binary") {
|
||||
det.setFileFormat(slsDetectorDefs::fileFormat::BINARY);
|
||||
} else if (format == "hdf5") {
|
||||
det.setFileFormat(slsDetectorDefs::fileFormat::HDF5);
|
||||
}
|
||||
}
|
||||
|
||||
std::string DetectorPythonInterface::getFileFormat() {
|
||||
auto format =
|
||||
det.setFileFormat(slsDetectorDefs::fileFormat::GET_FILE_FORMAT, -1);
|
||||
switch (format) {
|
||||
case slsDetectorDefs::fileFormat::BINARY:
|
||||
return "binary";
|
||||
case slsDetectorDefs::fileFormat::HDF5:
|
||||
return "hdf5";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
slsDetectorDefs::networkParameter
|
||||
DetectorPythonInterface::networkNameToEnum(std::string par_name) {
|
||||
|
||||
if (par_name == "detectormac") {
|
||||
return slsDetectorDefs::networkParameter::DETECTOR_MAC;
|
||||
} else if (par_name == "detectorip") {
|
||||
return slsDetectorDefs::networkParameter::DETECTOR_IP;
|
||||
} else if (par_name == "rx_hostname") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_HOSTNAME;
|
||||
} else if (par_name == "rx_udpip") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_UDP_IP;
|
||||
} else if (par_name == "rx_udpport") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_UDP_PORT;
|
||||
} else if (par_name == "rx_udpmac") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_UDP_MAC;
|
||||
} else if (par_name == "rx_udpport2") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_UDP_PORT2;
|
||||
} else if (par_name == "rx_udpsocksize") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_UDP_SCKT_BUF_SIZE;
|
||||
} else if (par_name == "rx_realudpsocksize") {
|
||||
return slsDetectorDefs::networkParameter::
|
||||
RECEIVER_REAL_UDP_SCKT_BUF_SIZE;
|
||||
} else if (par_name == "rx_jsonaddheader") {
|
||||
return slsDetectorDefs::networkParameter::ADDITIONAL_JSON_HEADER;
|
||||
} else if (par_name == "delay_left") {
|
||||
return slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_LEFT;
|
||||
} else if (par_name == "delay_right") {
|
||||
return slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_RIGHT;
|
||||
} else if (par_name == "delay_frame") {
|
||||
return slsDetectorDefs::networkParameter::DETECTOR_TXN_DELAY_FRAME;
|
||||
} else if (par_name == "flow_control_10g") {
|
||||
return slsDetectorDefs::networkParameter::FLOW_CONTROL_10G;
|
||||
} else if (par_name == "client_zmqport") {
|
||||
return slsDetectorDefs::networkParameter::CLIENT_STREAMING_PORT;
|
||||
} else if (par_name == "rx_zmqport") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_STREAMING_PORT;
|
||||
} else if (par_name == "rx_zmqip") {
|
||||
return slsDetectorDefs::networkParameter::RECEIVER_STREAMING_SRC_IP;
|
||||
} else if (par_name == "client_zmqip") {
|
||||
return slsDetectorDefs::networkParameter::CLIENT_STREAMING_SRC_IP;
|
||||
}
|
||||
|
||||
throw std::runtime_error("Could not decode network parameter");
|
||||
};
|
||||
|
||||
// slsDetectorDefs::fileFormat DetectorPythonInterface::file///
|
||||
|
||||
slsDetectorDefs::dacIndex DetectorPythonInterface::dacNameToEnum(std::string dac_name) {
|
||||
// to avoid uninitialised
|
||||
slsDetectorDefs::dacIndex dac = slsDetectorDefs::dacIndex::E_SvP;
|
||||
|
||||
if (dac_name == "vsvp") {
|
||||
dac = slsDetectorDefs::dacIndex::E_SvP;
|
||||
} else if (dac_name == "vtr") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vtr;
|
||||
} else if (dac_name == "vthreshold") {
|
||||
dac = slsDetectorDefs::dacIndex::THRESHOLD;
|
||||
} else if (dac_name == "vrf") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vrf;
|
||||
} else if (dac_name == "vrs") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vrs;
|
||||
} else if (dac_name == "vsvn") {
|
||||
dac = slsDetectorDefs::dacIndex::E_SvN;
|
||||
} else if (dac_name == "vtgstv") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vtgstv;
|
||||
} else if (dac_name == "vcmp_ll") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vcmp_ll;
|
||||
} else if (dac_name == "vcmp_lr") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vcmp_lr;
|
||||
} else if (dac_name == "vcall") {
|
||||
dac = slsDetectorDefs::dacIndex::E_cal;
|
||||
} else if (dac_name == "vcmp_rl") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vcmp_rl;
|
||||
} else if (dac_name == "rxb_rb") {
|
||||
dac = slsDetectorDefs::dacIndex::E_rxb_rb;
|
||||
} else if (dac_name == "rxb_lb") {
|
||||
dac = slsDetectorDefs::dacIndex::E_rxb_lb;
|
||||
} else if (dac_name == "vcmp_rr") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vcmp_rr;
|
||||
} else if (dac_name == "vcp") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vcp;
|
||||
} else if (dac_name == "vcn") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vcn;
|
||||
} else if (dac_name == "vis") {
|
||||
dac = slsDetectorDefs::dacIndex::E_Vis;
|
||||
} else if (dac_name == "iodelay") {
|
||||
dac = slsDetectorDefs::dacIndex::IO_DELAY;
|
||||
} else if (dac_name == "v_a") {
|
||||
dac = slsDetectorDefs::dacIndex::V_POWER_A;
|
||||
} else if (dac_name == "v_b") {
|
||||
dac = slsDetectorDefs::dacIndex::V_POWER_B;
|
||||
} else if (dac_name == "v_c") {
|
||||
dac = slsDetectorDefs::dacIndex::V_POWER_C;
|
||||
} else if (dac_name == "v_d") {
|
||||
dac = slsDetectorDefs::dacIndex::V_POWER_D;
|
||||
} else if (dac_name == "v_io") {
|
||||
dac = slsDetectorDefs::dacIndex::V_POWER_IO;
|
||||
} else if (dac_name == "v_chip") {
|
||||
dac = slsDetectorDefs::dacIndex::V_POWER_CHIP;
|
||||
} else if (dac_name == "v_limit") {
|
||||
dac = slsDetectorDefs::dacIndex::V_LIMIT;
|
||||
} else if (dac_name == "temp_fpga") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_FPGA;
|
||||
} else if (dac_name == "temp_fpgaext") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_FPGAEXT;
|
||||
} else if (dac_name == "temp_10ge") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_10GE;
|
||||
} else if (dac_name == "temp_dcdc") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_DCDC;
|
||||
} else if (dac_name == "temp_sodl") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_SODL;
|
||||
} else if (dac_name == "temp_sodr") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_SODR;
|
||||
} else if (dac_name == "temp_fpgafl") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_FPGA2;
|
||||
} else if (dac_name == "temp_fpgafr") {
|
||||
dac = slsDetectorDefs::dacIndex::TEMPERATURE_FPGA3;
|
||||
} else if (dac_name == "vhighvoltage") {
|
||||
dac = slsDetectorDefs::dacIndex::HIGH_VOLTAGE;
|
||||
} else if (dac_name == "vb_comp") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(0);
|
||||
} else if (dac_name == "vdd_prot") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(1);
|
||||
} else if (dac_name == "vin_com") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(2);
|
||||
} else if (dac_name == "vref_prech") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(3);
|
||||
} else if (dac_name == "vb_pixbuff") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(4);
|
||||
} else if (dac_name == "vb_ds") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(5);
|
||||
} else if (dac_name == "vref_ds") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(6);
|
||||
} else if (dac_name == "vref_comp") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(7);
|
||||
} else if (dac_name == "dac0") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(0);
|
||||
} else if (dac_name == "dac1") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(1);
|
||||
} else if (dac_name == "dac2") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(2);
|
||||
} else if (dac_name == "dac3") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(3);
|
||||
} else if (dac_name == "dac4") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(4);
|
||||
} else if (dac_name == "dac5") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(5);
|
||||
} else if (dac_name == "dac6") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(6);
|
||||
} else if (dac_name == "dac7") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(7);
|
||||
} else if (dac_name == "dac8") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(8);
|
||||
} else if (dac_name == "dac9") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(9);
|
||||
} else if (dac_name == "dac10") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(10);
|
||||
} else if (dac_name == "dac11") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(11);
|
||||
} else if (dac_name == "dac12") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(12);
|
||||
} else if (dac_name == "dac13") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(13);
|
||||
} else if (dac_name == "dac14") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(14);
|
||||
} else if (dac_name == "dac15") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(15);
|
||||
} else if (dac_name == "dac16") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(16);
|
||||
} else if (dac_name == "dac17") {
|
||||
dac = static_cast<slsDetectorDefs::dacIndex>(17);
|
||||
}
|
||||
|
||||
return dac;
|
||||
}
|
||||
|
||||
// enum readOutFlags {
|
||||
// GET_READOUT_FLAGS = -1, /**< return readout flags */
|
||||
// NORMAL_READOUT = 0, /**< no flag */
|
||||
// STORE_IN_RAM = 0x1, /**< data are stored in ram and sent only after end
|
||||
// of acquisition for faster frame rate */
|
||||
// READ_HITS = 0x2, /**< return only the number of the channel which
|
||||
// counted ate least one */
|
||||
// ZERO_COMPRESSION = 0x4, /**< returned data are 0-compressed */
|
||||
// PUMP_PROBE_MODE = 0x8, /**<pump-probe mode */
|
||||
// BACKGROUND_CORRECTIONS = 0x1000, /**<background corrections */
|
||||
// TOT_MODE = 0x2000, /**< pump-probe mode */
|
||||
// CONTINOUS_RO = 0x4000, /**< pump-probe mode */
|
||||
// PARALLEL = 0x10000, /**< eiger parallel mode */
|
||||
// NONPARALLEL = 0x20000, /**< eiger serial mode */
|
||||
// DIGITAL_ONLY = 0x80000, /** chiptest board read only digital bits (not
|
||||
// adc values)*/
|
||||
// ANALOG_AND_DIGITAL = 0x100000, /** chiptest board read adc values and
|
||||
// digital bits digital bits */
|
||||
// DUT_CLK = 0x200000, /** chiptest board fifo clock comes from device
|
||||
// under test */
|
||||
// SHOW_OVERFLOW = 0x400000, /** eiger 32 bit mode, show saturated for
|
||||
// overflow of single subframes */
|
||||
// NOOVERFLOW = 0x800000 /** eiger 32 bit mode, do not show saturated for
|
||||
// overflow of single subframes */
|
||||
// };
|
||||
|
||||
// std::vector<std::string> DetectorPythonInterface::getReadoutFlags() {
|
||||
// std::vector<std::string> flags;
|
||||
// auto r = det.setReadOutFlags();
|
||||
// if (r & slsDetectorDefs::readOutFlags::STORE_IN_RAM)
|
||||
// flags.push_back("storeinram");
|
||||
// if (r & slsDetectorDefs::readOutFlags::READ_HITS)
|
||||
// flags.push_back("readhits");
|
||||
// if (r & slsDetectorDefs::readOutFlags::ZERO_COMPRESSION)
|
||||
// flags.push_back("zerocompression");
|
||||
// if (r & slsDetectorDefs::readOutFlags::PUMP_PROBE_MODE)
|
||||
// flags.push_back("pumpprobe");
|
||||
// if (r & slsDetectorDefs::readOutFlags::BACKGROUND_CORRECTIONS)
|
||||
// flags.push_back("backgroundcorrections");
|
||||
// if (r & slsDetectorDefs::readOutFlags::TOT_MODE)
|
||||
// flags.push_back("tot");
|
||||
// if (r & slsDetectorDefs::readOutFlags::CONTINOUS_RO)
|
||||
// flags.push_back("continous");
|
||||
// if (r & slsDetectorDefs::readOutFlags::PARALLEL)
|
||||
// flags.push_back("parallel");
|
||||
// if (r & slsDetectorDefs::readOutFlags::NONPARALLEL)
|
||||
// flags.push_back("nonparallel");
|
||||
// if (r & slsDetectorDefs::readOutFlags::DIGITAL_ONLY)
|
||||
// flags.push_back("digital");
|
||||
// if (r & slsDetectorDefs::readOutFlags::ANALOG_AND_DIGITAL)
|
||||
// flags.push_back("analog_digital");
|
||||
// if (r & slsDetectorDefs::readOutFlags::DUT_CLK)
|
||||
// flags.push_back("dutclk");
|
||||
// if (r & slsDetectorDefs::readOutFlags::NOOVERFLOW)
|
||||
// flags.push_back("nooverflow");
|
||||
// if (r & slsDetectorDefs::readOutFlags::SHOW_OVERFLOW)
|
||||
// flags.push_back("overflow");
|
||||
// return flags;
|
||||
// }
|
||||
|
||||
// // note singular
|
||||
// void DetectorPythonInterface::setReadoutFlag(const std::string flag_name) {
|
||||
// if (flag_name == "none")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::NORMAL_READOUT);
|
||||
// else if (flag_name == "storeinram")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::STORE_IN_RAM);
|
||||
// else if (flag_name == "readhits")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::READ_HITS);
|
||||
// else if (flag_name == "zerocompression")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::ZERO_COMPRESSION);
|
||||
// else if (flag_name == "pumpprobe")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::PUMP_PROBE_MODE);
|
||||
// else if (flag_name == "backgroundcorrections")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::BACKGROUND_CORRECTIONS);
|
||||
// else if (flag_name == "tot")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::TOT_MODE);
|
||||
// else if (flag_name == "continous")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::CONTINOUS_RO);
|
||||
// else if (flag_name == "parallel")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::PARALLEL);
|
||||
// else if (flag_name == "nonparallel")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::NONPARALLEL);
|
||||
// else if (flag_name == "digital")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::DIGITAL_ONLY);
|
||||
// else if (flag_name == "analog_digital")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::ANALOG_AND_DIGITAL);
|
||||
// else if (flag_name == "dutclk")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::DUT_CLK);
|
||||
// else if (flag_name == "nooverflow")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::NOOVERFLOW);
|
||||
// else if (flag_name == "overflow")
|
||||
// det.setReadOutFlags(slsDetectorDefs::readOutFlags::SHOW_OVERFLOW);
|
||||
// else
|
||||
// throw std::runtime_error("Flag name not recognized");
|
||||
// }
|
||||
|
||||
std::vector<double> DetectorPythonInterface::getRateCorrection() {
|
||||
std::vector<double> rate_corr;
|
||||
for (size_t i = 0; i < det.size(); ++i) {
|
||||
rate_corr.push_back(det.getRateCorrection(i));
|
||||
}
|
||||
return rate_corr;
|
||||
}
|
||||
|
||||
void DetectorPythonInterface::pulseAllPixels(int n) {
|
||||
// int pulsePixelNMove(int n=0,int x=0,int y=0);
|
||||
// int pulsePixel(int n=0,int x=0,int y=0);
|
||||
|
||||
for (int j = 0; j < 8; ++j) {
|
||||
det.pulsePixel(0, -255 + j, 0);
|
||||
for (int i = 0; i < 256; ++i) {
|
||||
det.pulsePixelNMove(n, 0, 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
void DetectorPythonInterface::pulseDiagonal(int n) {
|
||||
// int pulsePixelNMove(int n=0,int x=0,int y=0);
|
||||
// int pulsePixel(int n=0,int x=0,int y=0);
|
||||
|
||||
for (int j = 20; j < 232; j += 16) {
|
||||
det.pulsePixel(0, -255, j);
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
det.pulsePixelNMove(n, 1, 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
#endif // DETECTOR_H
|
@ -10,7 +10,7 @@ namespace py = pybind11;
|
||||
void init_enums(py::module &m) {
|
||||
py::class_<slsDetectorDefs> Defs(m, "slsDetectorDefs");
|
||||
py::class_<slsDetectorDefs::xy> xy(m, "xy");
|
||||
xy.def(py::init());
|
||||
xy.def(py::init());
|
||||
xy.def(py::init<int,int>());
|
||||
xy.def_readwrite("x", &slsDetectorDefs::xy::x);
|
||||
xy.def_readwrite("y", &slsDetectorDefs::xy::y);
|
||||
@ -32,7 +32,7 @@ py::enum_<slsDetectorDefs::timerIndex>(Defs, "timerIndex")
|
||||
.value("ACQUISITION_TIME", slsDetectorDefs::timerIndex::ACQUISITION_TIME)
|
||||
.value("FRAME_PERIOD", slsDetectorDefs::timerIndex::FRAME_PERIOD)
|
||||
.value("DELAY_AFTER_TRIGGER", slsDetectorDefs::timerIndex::DELAY_AFTER_TRIGGER)
|
||||
.value("CYCLES_NUMBER", slsDetectorDefs::timerIndex::CYCLES_NUMBER)
|
||||
.value("TRIGGER_NUMBER", slsDetectorDefs::timerIndex::TRIGGER_NUMBER)
|
||||
.value("ACTUAL_TIME", slsDetectorDefs::timerIndex::ACTUAL_TIME)
|
||||
.value("MEASUREMENT_TIME", slsDetectorDefs::timerIndex::MEASUREMENT_TIME)
|
||||
.value("PROGRESS", slsDetectorDefs::timerIndex::PROGRESS)
|
||||
@ -217,6 +217,20 @@ py::enum_<slsDetectorDefs::dacIndex>(Defs, "dacIndex")
|
||||
.value("M_cas", slsDetectorDefs::dacIndex::M_cas)
|
||||
.value("M_vIcin", slsDetectorDefs::dacIndex::M_vIcin)
|
||||
.value("M_vIpreOut", slsDetectorDefs::dacIndex::M_vIpreOut)
|
||||
.value("VREF_H_ADC", slsDetectorDefs::dacIndex::VREF_H_ADC)
|
||||
.value("VB_COMP_FE", slsDetectorDefs::dacIndex::VB_COMP_FE)
|
||||
.value("VB_COMP_ADC", slsDetectorDefs::dacIndex::VB_COMP_ADC)
|
||||
.value("VCOM_CDS", slsDetectorDefs::dacIndex::VCOM_CDS)
|
||||
.value("VREF_RESTORE", slsDetectorDefs::dacIndex::VREF_RESTORE)
|
||||
.value("VB_OPA_1ST", slsDetectorDefs::dacIndex::VB_OPA_1ST)
|
||||
.value("VREF_COMP_FE", slsDetectorDefs::dacIndex::VREF_COMP_FE)
|
||||
.value("VCOM_ADC1", slsDetectorDefs::dacIndex::VCOM_ADC1)
|
||||
.value("VREF_PRECH", slsDetectorDefs::dacIndex::VREF_PRECH)
|
||||
.value("VREF_L_ADC", slsDetectorDefs::dacIndex::VREF_L_ADC)
|
||||
.value("VREF_CDS", slsDetectorDefs::dacIndex::VREF_CDS)
|
||||
.value("VB_CS", slsDetectorDefs::dacIndex::VB_CS)
|
||||
.value("VB_OPA_FD", slsDetectorDefs::dacIndex::VB_OPA_FD)
|
||||
.value("VCOM_ADC2", slsDetectorDefs::dacIndex::VCOM_ADC2)
|
||||
.value("V_POWER_A", slsDetectorDefs::dacIndex::V_POWER_A)
|
||||
.value("V_POWER_B", slsDetectorDefs::dacIndex::V_POWER_B)
|
||||
.value("V_POWER_C", slsDetectorDefs::dacIndex::V_POWER_C)
|
||||
|
@ -99,8 +99,10 @@ void init_experimental(py::module &m) {
|
||||
|
||||
// ACQUISITION
|
||||
.def("acquire", &Detector::acquire)
|
||||
.def("startAcquisition", &Detector::startAcquisition)
|
||||
.def("stopAcquisition", &Detector::stopAcquisition)
|
||||
.def("startDetector", &Detector::startDetector)
|
||||
.def("stopDetector", &Detector::stopDetector)
|
||||
.def("startReceiver", &Detector::startReceiver)
|
||||
.def("stopReceiver", &Detector::stopReceiver)
|
||||
.def("clearAcquiringFlag", &Detector::clearAcquiringFlag)
|
||||
.def("getDetectorStatus", &Detector::getDetectorStatus,
|
||||
py::arg() = Positions{})
|
||||
@ -412,11 +414,11 @@ void init_experimental(py::module &m) {
|
||||
.def("setThresholdEnergy", &Detector::setThresholdEnergy, py::arg(),
|
||||
py::arg() = defs::STANDARD, py::arg() = true,
|
||||
py::arg() = Positions{})
|
||||
.def("getSettingsDir", &Detector::getSettingsDir,
|
||||
.def("getSettingsPath", &Detector::getSettingsPath,
|
||||
py::arg() = Positions{})
|
||||
.def("setSettingsDir", &Detector::setSettingsDir, py::arg(),
|
||||
.def("setSettingsPath", &Detector::setSettingsPath, py::arg(),
|
||||
py::arg() = Positions{})
|
||||
.def("loadTrimbits", &Detector::setSettingsDir, py::arg(),
|
||||
.def("loadTrimbits", &Detector::loadTrimbits, py::arg(),
|
||||
py::arg() = Positions{})
|
||||
.def("getRxAddGapPixels", &Detector::getRxAddGapPixels,
|
||||
py::arg() = Positions{})
|
||||
|
@ -4,7 +4,6 @@
|
||||
#include <pybind11/stl.h>
|
||||
|
||||
#include "Detector.h"
|
||||
#include "DetectorPythonInterface.h"
|
||||
#include "Result.h"
|
||||
#include "mythenFileIO.h"
|
||||
#include <chrono>
|
||||
@ -12,14 +11,6 @@
|
||||
|
||||
#include "typecaster.h"
|
||||
|
||||
// // Add type_typecaster to pybind for our wrapper type
|
||||
// namespace pybind11 {
|
||||
// namespace detail {
|
||||
// template <typename Type, typename Alloc>
|
||||
// struct type_caster<sls::Result<Type, Alloc>>
|
||||
// : list_caster<sls::Result<Type, Alloc>, Type> {};
|
||||
// } // namespace detail
|
||||
// } // namespace pybind11
|
||||
|
||||
using ds = std::chrono::duration<double>;
|
||||
|
||||
@ -39,303 +30,6 @@ PYBIND11_MODULE(_sls_detector, m) {
|
||||
|
||||
init_enums(m);
|
||||
init_experimental(m);
|
||||
|
||||
py::class_<DetectorPythonInterface> DetectorApi(m, "DetectorApi", R"pbdoc(
|
||||
Interface to the multiSlsDetector class through Detector.h These functions
|
||||
are used by the python classes Eiger and Jungfrau and normally it is better
|
||||
to use them than to directly access functions here.
|
||||
|
||||
However it is possible to access these functions...
|
||||
|
||||
::
|
||||
|
||||
#Using the python class
|
||||
from sls_detector import Eiger
|
||||
d = Eiger()
|
||||
d._api.getThresholdEnergy()
|
||||
|
||||
from _sls_detector import DetectorApi
|
||||
api = DetectorApi(0)
|
||||
api.getNumberOfFrames()
|
||||
|
||||
#But the Pythonic way is almost alway simpler
|
||||
d = Eiger()
|
||||
d.n_frames
|
||||
>> 10
|
||||
|
||||
)pbdoc");
|
||||
DetectorApi.def(py::init<int>())
|
||||
.def("freeSharedMemory", &DetectorPythonInterface::freeSharedMemory)
|
||||
.def("getMultiDetectorId", &DetectorPythonInterface::getMultiDetectorId)
|
||||
.def("acq", &DetectorPythonInterface::acquire)
|
||||
.def("getAcquiringFlag", &DetectorPythonInterface::getAcquiringFlag)
|
||||
.def("setAcquiringFlag", &DetectorPythonInterface::setAcquiringFlag)
|
||||
|
||||
.def("setAllTrimbits", &DetectorPythonInterface::setAllTrimbits)
|
||||
.def("getAllTrimbits", &DetectorPythonInterface::getAllTrimbits)
|
||||
.def("setCounterBit", &DetectorPythonInterface::setCounterBit)
|
||||
.def("getCounterBit", &DetectorPythonInterface::getCounterBit)
|
||||
|
||||
.def("getAdc", &DetectorPythonInterface::getAdc)
|
||||
.def("getDac", &DetectorPythonInterface::getDac)
|
||||
.def("getDac_mV", &DetectorPythonInterface::getDac_mV)
|
||||
.def("setDac", &DetectorPythonInterface::setDac)
|
||||
.def("setDac_mV", &DetectorPythonInterface::setDac_mV)
|
||||
.def("getDacFromIndex", &DetectorPythonInterface::getDacFromIndex)
|
||||
.def("setDacFromIndex", &DetectorPythonInterface::setDacFromIndex)
|
||||
|
||||
.def("getDbitPipeline", &DetectorPythonInterface::getDbitPipeline)
|
||||
.def("setDbitPipeline", &DetectorPythonInterface::setDbitPipeline)
|
||||
.def("getDbitPhase", &DetectorPythonInterface::getDbitPhase)
|
||||
.def("setDbitPhase", &DetectorPythonInterface::setDbitPhase)
|
||||
.def("getDbitClock", &DetectorPythonInterface::getDbitClock)
|
||||
.def("setDbitClock", &DetectorPythonInterface::setDbitClock)
|
||||
|
||||
.def("setThresholdEnergy", &DetectorPythonInterface::setThresholdEnergy)
|
||||
.def("getThresholdEnergy", &DetectorPythonInterface::getThresholdEnergy)
|
||||
|
||||
.def("getSettings", &DetectorPythonInterface::getSettings)
|
||||
.def("setSettings", &DetectorPythonInterface::setSettings)
|
||||
.def("getSettingsDir", &DetectorPythonInterface::getSettingsDir)
|
||||
.def("setSettingsDir", &DetectorPythonInterface::setSettingsDir)
|
||||
|
||||
.def("loadTrimbitFile", &DetectorPythonInterface::loadTrimbitFile)
|
||||
.def("setTrimEnergies", &DetectorPythonInterface::setTrimEnergies)
|
||||
.def("getTrimEnergies", &DetectorPythonInterface::getTrimEnergies)
|
||||
|
||||
.def("pulseChip", &DetectorPythonInterface::pulseChip)
|
||||
.def("pulseAllPixels", &DetectorPythonInterface::pulseAllPixels)
|
||||
.def("pulseDiagonal", &DetectorPythonInterface::pulseDiagonal)
|
||||
.def("getRunStatus", &DetectorPythonInterface::getRunStatus)
|
||||
.def("readConfigurationFile",
|
||||
&DetectorPythonInterface::readConfigurationFile)
|
||||
.def("readParametersFile", &DetectorPythonInterface::readParametersFile)
|
||||
// .def("checkOnline", &DetectorPythonInterface::checkOnline)
|
||||
.def("setReadoutClockSpeed",
|
||||
&DetectorPythonInterface::setReadoutClockSpeed)
|
||||
.def("getReadoutClockSpeed",
|
||||
&DetectorPythonInterface::getReadoutClockSpeed)
|
||||
.def("getSyncClkSpeed", &DetectorPythonInterface::getSyncClkSpeed)
|
||||
.def("getHostname", &DetectorPythonInterface::getHostname)
|
||||
.def("setHostname", &DetectorPythonInterface::setHostname)
|
||||
|
||||
.def("getReceiverPort", &DetectorPythonInterface::getReceiverPort)
|
||||
.def("setReceiverPort", &DetectorPythonInterface::setReceiverPort)
|
||||
|
||||
.def("isChipPowered", &DetectorPythonInterface::isChipPowered)
|
||||
.def("powerChip", &DetectorPythonInterface::powerChip)
|
||||
|
||||
.def("readRegister", &DetectorPythonInterface::readRegister)
|
||||
.def("writeRegister", &DetectorPythonInterface::writeRegister)
|
||||
.def("writeAdcRegister", &DetectorPythonInterface::writeAdcRegister)
|
||||
.def("setBitInRegister", &DetectorPythonInterface::setBitInRegister)
|
||||
.def("clearBitInRegister", &DetectorPythonInterface::clearBitInRegister)
|
||||
|
||||
.def("setDynamicRange", &DetectorPythonInterface::setDynamicRange)
|
||||
.def("getDynamicRange", &DetectorPythonInterface::getDynamicRange)
|
||||
.def("getFirmwareVersion", &DetectorPythonInterface::getFirmwareVersion)
|
||||
.def("getServerVersion", &DetectorPythonInterface::getServerVersion)
|
||||
.def("getClientVersion", &DetectorPythonInterface::getClientVersion)
|
||||
.def("getReceiverVersion", &DetectorPythonInterface::getReceiverVersion)
|
||||
.def("getDetectorNumber", &DetectorPythonInterface::getDetectorNumber)
|
||||
.def("getRateCorrection", &DetectorPythonInterface::getRateCorrection)
|
||||
.def("setRateCorrection", &DetectorPythonInterface::setRateCorrection)
|
||||
|
||||
.def("startAcquisition", &DetectorPythonInterface::startAcquisition)
|
||||
.def("stopAcquisition", &DetectorPythonInterface::stopAcquisition)
|
||||
.def("startReceiver", &DetectorPythonInterface::startReceiver)
|
||||
.def("stopReceiver", &DetectorPythonInterface::stopReceiver)
|
||||
|
||||
.def("getFilePath",
|
||||
(std::string(DetectorPythonInterface::*)()) &
|
||||
DetectorPythonInterface::getFilePath,
|
||||
"Using multiSlsDetector")
|
||||
.def("getFilePath",
|
||||
(std::string(DetectorPythonInterface::*)(int)) &
|
||||
DetectorPythonInterface::getFilePath,
|
||||
"File path for individual detector")
|
||||
.def("setFilePath", (void (DetectorPythonInterface::*)(std::string)) &
|
||||
DetectorPythonInterface::setFilePath)
|
||||
|
||||
.def("setFileName", &DetectorPythonInterface::setFileName)
|
||||
.def("getFileName", &DetectorPythonInterface::getFileName)
|
||||
.def("setFileIndex", &DetectorPythonInterface::setFileIndex)
|
||||
.def("getFileIndex", &DetectorPythonInterface::getFileIndex)
|
||||
.def("getNumberOfDetectors", &DetectorPythonInterface::getNumberOfDetectors)
|
||||
|
||||
.def("setExposureTime", &DetectorPythonInterface::setExposureTime)
|
||||
.def("getExposureTime", &DetectorPythonInterface::getExposureTime)
|
||||
.def("setSubExposureTime", &DetectorPythonInterface::setSubExposureTime)
|
||||
.def("getSubExposureTime", &DetectorPythonInterface::getSubExposureTime)
|
||||
.def("setPeriod", &DetectorPythonInterface::setPeriod)
|
||||
.def("getPeriod", &DetectorPythonInterface::getPeriod)
|
||||
.def("setSubExposureDeadTime", &DetectorPythonInterface::setSubExposureDeadTime)
|
||||
.def("getSubExposureDeadTime", &DetectorPythonInterface::getSubExposureDeadTime)
|
||||
|
||||
.def("getCycles", &DetectorPythonInterface::getCycles)
|
||||
.def("setCycles", &DetectorPythonInterface::setCycles)
|
||||
// .def("getNumberOfGates", &DetectorPythonInterface::getNumberOfGates)
|
||||
// .def("setNumberOfGates", &DetectorPythonInterface::setNumberOfGates)
|
||||
.def("getDelay", &DetectorPythonInterface::getDelay)
|
||||
.def("setDelay", &DetectorPythonInterface::setDelay)
|
||||
|
||||
.def("setStoragecellStart", &DetectorPythonInterface::setStoragecellStart)
|
||||
.def("getStoragecellStart", &DetectorPythonInterface::getStoragecellStart)
|
||||
.def("setNumberOfStorageCells", &DetectorPythonInterface::setNumberOfStorageCells)
|
||||
.def("getNumberOfStorageCells", &DetectorPythonInterface::getNumberOfStorageCells)
|
||||
|
||||
// .def("getTimingMode", &DetectorPythonInterface::getTimingMode)
|
||||
// .def("setTimingMode", &DetectorPythonInterface::setTimingMode)
|
||||
|
||||
.def("getDetectorType", &DetectorPythonInterface::getDetectorType)
|
||||
|
||||
.def("setThresholdTemperature", &DetectorPythonInterface::setThresholdTemperature)
|
||||
.def("getThresholdTemperature", &DetectorPythonInterface::getThresholdTemperature)
|
||||
.def("setTemperatureControl", &DetectorPythonInterface::setTemperatureControl)
|
||||
.def("getTemperatureControl", &DetectorPythonInterface::getTemperatureControl)
|
||||
.def("getTemperatureEvent", &DetectorPythonInterface::getTemperatureEvent)
|
||||
.def("resetTemperatureEvent", &DetectorPythonInterface::resetTemperatureEvent)
|
||||
|
||||
.def("getRxDataStreamStatus", &DetectorPythonInterface::getRxDataStreamStatus)
|
||||
.def("setRxDataStreamStatus", &DetectorPythonInterface::setRxDataStreamStatus)
|
||||
|
||||
// Network stuff
|
||||
.def("getReceiverHostname",
|
||||
&DetectorPythonInterface::getReceiverHostname,
|
||||
py::arg("det_id") = -1)
|
||||
.def("setReceiverHostname",
|
||||
&DetectorPythonInterface::setReceiverHostname, py::arg("hostname"),
|
||||
py::arg("det_id") = -1)
|
||||
.def("getReceiverStreamingPort",
|
||||
&DetectorPythonInterface::getReceiverStreamingPort)
|
||||
.def("setReceiverStreamingPort",
|
||||
&DetectorPythonInterface::setReceiverStreamingPort)
|
||||
// .def("getReceiverUDPPort", &DetectorPythonInterface::getReceiverUDPPort)
|
||||
// .def("getReceiverUDPPort2",
|
||||
// &DetectorPythonInterface::getReceiverUDPPort2)
|
||||
// .def("setReceiverUDPPort", &DetectorPythonInterface::setReceiverUDPPort)
|
||||
// .def("setReceiverUDPPort2",
|
||||
// &DetectorPythonInterface::setReceiverUDPPort2)
|
||||
// .def("setReceiverUDPIP", &DetectorPythonInterface::setReceiverUDPIP)
|
||||
// .def("getReceiverUDPIP", &DetectorPythonInterface::getReceiverUDPIP)
|
||||
// .def("getReceiverUDPMAC", &DetectorPythonInterface::getReceiverUDPMAC)
|
||||
// .def("setReceiverUDPMAC", &DetectorPythonInterface::setReceiverUDPMAC)
|
||||
|
||||
.def("getReceiverPort", &DetectorPythonInterface::getReceiverPort)
|
||||
.def("setReceiverPort", &DetectorPythonInterface::setReceiverPort)
|
||||
|
||||
.def("getDelayFrame", &DetectorPythonInterface::getDelayFrame)
|
||||
.def("setDelayFrame", &DetectorPythonInterface::setDelayFrame)
|
||||
.def("getDelayLeft", &DetectorPythonInterface::getDelayLeft)
|
||||
.def("setDelayLeft", &DetectorPythonInterface::setDelayLeft)
|
||||
.def("getDelayRight", &DetectorPythonInterface::getDelayRight)
|
||||
.def("setDelayRight", &DetectorPythonInterface::setDelayRight)
|
||||
.def("getLastClientIP", &DetectorPythonInterface::getLastClientIP)
|
||||
.def("getReceiverLastClientIP",
|
||||
&DetectorPythonInterface::getReceiverLastClientIP)
|
||||
|
||||
.def("setFramesPerFile", &DetectorPythonInterface::setFramesPerFile)
|
||||
.def("getFramesPerFile", &DetectorPythonInterface::getFramesPerFile)
|
||||
.def("setReceiverFifoDepth",
|
||||
&DetectorPythonInterface::setReceiverFifoDepth)
|
||||
.def("getReceiverFifoDepth",
|
||||
&DetectorPythonInterface::getReceiverFifoDepth)
|
||||
|
||||
.def("getReceiverFrameDiscardPolicy",
|
||||
&DetectorPythonInterface::getReceiverFrameDiscardPolicy)
|
||||
.def("setReceiverFramesDiscardPolicy",
|
||||
&DetectorPythonInterface::setReceiverFramesDiscardPolicy)
|
||||
.def("setPartialFramesPadding",
|
||||
&DetectorPythonInterface::setPartialFramesPadding)
|
||||
.def("getPartialFramesPadding",
|
||||
&DetectorPythonInterface::getPartialFramesPadding)
|
||||
|
||||
.def("getUserDetails", &DetectorPythonInterface::getUserDetails)
|
||||
.def("checkDetectorVersionCompatibility",
|
||||
&DetectorPythonInterface::checkDetectorVersionCompatibility)
|
||||
.def("checkReceiverVersionCompatibility",
|
||||
&DetectorPythonInterface::checkReceiverVersionCompatibility)
|
||||
.def("getMeasuredPeriod", &DetectorPythonInterface::getMeasuredPeriod)
|
||||
.def("getMeasuredSubPeriod",
|
||||
&DetectorPythonInterface::getMeasuredSubPeriod)
|
||||
|
||||
.def("setFileWrite", &DetectorPythonInterface::setFileWrite)
|
||||
.def("getFileWrite", &DetectorPythonInterface::getFileWrite)
|
||||
.def("setFileOverWrite", &DetectorPythonInterface::setFileOverWrite)
|
||||
.def("getFileOverWrite", &DetectorPythonInterface::getFileOverWrite)
|
||||
.def("getDacVthreshold", &DetectorPythonInterface::getDacVthreshold)
|
||||
.def("setDacVthreshold", &DetectorPythonInterface::setDacVthreshold)
|
||||
.def("setNumberOfFrames", &DetectorPythonInterface::setNumberOfFrames)
|
||||
.def("getNumberOfFrames", &DetectorPythonInterface::getNumberOfFrames)
|
||||
|
||||
// Overloaded calls
|
||||
.def("getFramesCaughtByReceiver",
|
||||
(int (DetectorPythonInterface::*)()) &
|
||||
DetectorPythonInterface::getFramesCaughtByReceiver)
|
||||
.def("getFramesCaughtByReceiver",
|
||||
(int (DetectorPythonInterface::*)(int)) &
|
||||
DetectorPythonInterface::getFramesCaughtByReceiver)
|
||||
|
||||
.def("resetFramesCaught", &DetectorPythonInterface::resetFramesCaught)
|
||||
.def("getReceiverCurrentFrameIndex",
|
||||
&DetectorPythonInterface::getReceiverCurrentFrameIndex)
|
||||
.def("getGapPixels", &DetectorPythonInterface::getGapPixels)
|
||||
.def("setGapPixels", &DetectorPythonInterface::setGapPixels)
|
||||
.def("getFlippedDataX", &DetectorPythonInterface::getFlippedDataX)
|
||||
// .def("getFlippedDataY", &DetectorPythonInterface::getFlippedDataY)
|
||||
.def("setFlippedDataX", &DetectorPythonInterface::setFlippedDataX)
|
||||
// .def("setFlippedDataY", &DetectorPythonInterface::setFlippedDataY)
|
||||
|
||||
.def("getServerLock", &DetectorPythonInterface::getServerLock)
|
||||
.def("setServerLock", &DetectorPythonInterface::setServerLock)
|
||||
.def("getReceiverLock", &DetectorPythonInterface::getReceiverLock)
|
||||
.def("setReceiverLock", &DetectorPythonInterface::setReceiverLock)
|
||||
|
||||
// .def("getReadoutFlags", &DetectorPythonInterface::getReadoutFlags)
|
||||
// .def("setReadoutFlag", &DetectorPythonInterface::setReadoutFlag)
|
||||
|
||||
.def("setFileFormat", &DetectorPythonInterface::setFileFormat)
|
||||
.def("getFileFormat", &DetectorPythonInterface::getFileFormat)
|
||||
|
||||
.def("getActive", &DetectorPythonInterface::getActive)
|
||||
.def("setActive", &DetectorPythonInterface::setActive)
|
||||
|
||||
.def("getTenGigabitEthernet",
|
||||
&DetectorPythonInterface::getTenGigabitEthernet)
|
||||
.def("setTenGigabitEthernet",
|
||||
&DetectorPythonInterface::setTenGigabitEthernet)
|
||||
|
||||
.def("getPatternLoops", &DetectorPythonInterface::getPatternLoops,
|
||||
py::arg("level"), py::arg("det_id") = -1)
|
||||
.def("setPatternLoops", &DetectorPythonInterface::setPatternLoops,
|
||||
py::arg("level"), py::arg("start"), py::arg("stop"), py::arg("n"),
|
||||
py::arg("det_id") = -1)
|
||||
.def("setPatternWord", &DetectorPythonInterface::setPatternWord,
|
||||
py::arg("addr"), py::arg("word"), py::arg("det_id") = -1)
|
||||
.def("getPatternWord", &DetectorPythonInterface::getPatternWord,
|
||||
py::arg("addr"), py::arg("det_id") = -1)
|
||||
|
||||
.def("setPatternIOControl",
|
||||
&DetectorPythonInterface::setPatternIOControl, py::arg("word"),
|
||||
py::arg("det_id") = -1)
|
||||
.def("setPatternClockControl",
|
||||
&DetectorPythonInterface::setPatternClockControl, py::arg("word"),
|
||||
py::arg("det_id") = -1)
|
||||
|
||||
.def("setPatternWaitAddr", &DetectorPythonInterface::setPatternWaitAddr,
|
||||
py::arg("level"), py::arg("addr"), py::arg("det_id") = -1)
|
||||
.def("getPatternWaitAddr", &DetectorPythonInterface::getPatternWaitAddr,
|
||||
py::arg("level"), py::arg("det_id") = -1)
|
||||
|
||||
.def("setPatternWaitTime", &DetectorPythonInterface::setPatternWaitTime,
|
||||
py::arg("level"), py::arg("duration"), py::arg("det_id") = -1)
|
||||
|
||||
.def("getPatternWaitTime", &DetectorPythonInterface::getPatternWaitTime,
|
||||
py::arg("level"), py::arg("det_id") = -1);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
py::module io = m.def_submodule("io", "Submodule for io");
|
||||
|
Reference in New Issue
Block a user